leave m_useGlobalVelocities to false, until enabled, for backward compatibility

use URDF_GLOBAL_VELOCITIES_MB flag in PyBullet loadURDF.
fix robot_bases.py due to new fields in getJointInfo.
backward compabitibility: BulletMJCFImporter, keep creating btMultiSphereShape for MJCF capsules with fromto, instead of shifted btCapsuleShapeZ, unless if CUF_USE_IMPLICIT_CYLINDER is used.
This commit is contained in:
erwincoumans
2018-01-10 11:16:50 -08:00
parent c4b1b84687
commit 22b4809891
11 changed files with 61 additions and 47 deletions

View File

@@ -344,9 +344,9 @@ void ConvertURDF2BulletInternal(
bool isFixedBase = (mass==0);//todo: figure out when base is fixed
int totalNumJoints = cache.m_totalNumJoints1;
cache.m_bulletMultiBody = creation.allocateMultiBody(urdfLinkIndex, totalNumJoints,mass, localInertiaDiagonal, isFixedBase, canSleep);
if (flags & CUF_NO_GLOBAL_VELOCITIES_MB)
if (flags & CUF_GLOBAL_VELOCITIES_MB)
{
cache.m_bulletMultiBody->useGlobalVelocities(false);
cache.m_bulletMultiBody->useGlobalVelocities(true);
}
if (flags & CUF_USE_MJCF)
{

View File

@@ -24,7 +24,7 @@ enum ConvertURDFFlags {
CUF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS=32,
CUF_RESERVED=64,
CUF_USE_IMPLICIT_CYLINDER=128,
CUF_NO_GLOBAL_VELOCITIES_MB=256,
CUF_GLOBAL_VELOCITIES_MB=256,
};
void ConvertURDF2Bullet(const URDFImporterInterface& u2b,