From 9c7e6d6a48bfc0749b2d5e9a58d55c6d63b3c38f Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 19 Dec 2019 16:56:09 -0800 Subject: [PATCH 1/2] enable programmatic creation of spherical joint --- examples/SharedMemory/PhysicsServerCommandProcessor.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp index 9b0b3e089..3b1f30f81 100644 --- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp +++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp @@ -2363,7 +2363,12 @@ struct ProgrammaticUrdfInterface : public URDFImporterInterface jointType = URDFFixedJoint; break; } - //case eSphericalType: + case eSphericalType: + { + isValid = true; + jointType = URDFSphericalJoint; + break; + } //case ePlanarType: //case eFixedType: //case ePoint2PointType: From 7a4023430aafe6edb374b589a96f9e7671b7f314 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Thu, 19 Dec 2019 18:05:41 -0800 Subject: [PATCH 2/2] fix pybullet.submitProfileTiming --- examples/SharedMemory/PhysicsClientC_API.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/SharedMemory/PhysicsClientC_API.cpp b/examples/SharedMemory/PhysicsClientC_API.cpp index b629ffe5e..ac863421d 100644 --- a/examples/SharedMemory/PhysicsClientC_API.cpp +++ b/examples/SharedMemory/PhysicsClientC_API.cpp @@ -5481,18 +5481,16 @@ B3_SHARED_API b3SharedMemoryCommandHandle b3ProfileTimingCommandInit(b3PhysicsCl b3Assert(command); int len = name ? strlen(name) : 0; + command->m_type = CMD_PROFILE_TIMING; if (len > 0 && len < (MAX_FILENAME_LENGTH + 1)) { - command->m_type = CMD_PROFILE_TIMING; + strcpy(command->m_profile.m_name, name); command->m_profile.m_name[len] = 0; } else { - const char* invalid = "InvalidProfileTimingName"; - int len = strlen(invalid); - strcpy(command->m_profile.m_name, invalid); - command->m_profile.m_name[len] = 0; + command->m_profile.m_name[0] = 0; } command->m_profile.m_type = -1; command->m_profile.m_durationInMicroSeconds = 0;