rename loadUrdf -> loadMultiBodyFromUrdf in lua script

remove unused m_usrd2mblink
This commit is contained in:
erwin
2015-05-14 09:16:13 -07:00
parent e196ed1edb
commit c9a630e7c6
5 changed files with 8 additions and 11 deletions

View File

@@ -20,7 +20,7 @@ MyMultiBodyCreator::MyMultiBodyCreator(GUIHelperInterface* guiHelper)
class btMultiBody* MyMultiBodyCreator::allocateMultiBody(int /* urdfLinkIndex */, int totalNumJoints,btScalar mass, const btVector3& localInertiaDiagonal, bool isFixedBase, bool canSleep, bool multiDof)
{
m_urdf2mbLink.resize(totalNumJoints+1,-2);
// m_urdf2mbLink.resize(totalNumJoints+1,-2);
m_mb2urdfLink.resize(totalNumJoints+1,-2);
m_bulletMultiBody = new btMultiBody(totalNumJoints,mass,localInertiaDiagonal,isFixedBase,canSleep,multiDof);
@@ -50,7 +50,7 @@ class btGeneric6DofSpring2Constraint* MyMultiBodyCreator::allocateGeneric6DofSpr
void MyMultiBodyCreator::addLinkMapping(int urdfLinkIndex, int mbLinkIndex)
{
m_urdf2mbLink[urdfLinkIndex] = mbLinkIndex;
// m_urdf2mbLink[urdfLinkIndex] = mbLinkIndex;
m_mb2urdfLink[mbLinkIndex] = urdfLinkIndex;
}

View File

@@ -19,7 +19,6 @@ class MyMultiBodyCreator : public MultiBodyCreationInterface
public:
btAlignedObjectArray<int> m_urdf2mbLink;
btAlignedObjectArray<int> m_mb2urdfLink;

View File

@@ -269,7 +269,7 @@ static int gCreateRigidBody (lua_State *L)
if (!lua_isuserdata(L,2))
{
std::cerr << "error: second argument to b3CreateRigidbody should be world";
std::cerr << "error: second argument to b3CreateRigidbody should be collision shape";
return 0;
}
@@ -291,7 +291,6 @@ static int gCreateRigidBody (lua_State *L)
}
btRigidBody* body = new btRigidBody(mass,0,colShape,inertia);
body->getWorldTransform().setOrigin(pos);
body->getWorldTransform().setRotation(orn);
@@ -409,7 +408,8 @@ void LuaPhysicsSetup::initPhysics()
lua_register(L, "deleteDynamicsWorld", gDeleteDynamicsWorld);
lua_register(L, "createCubeShape", gCreateCubeShape);
lua_register(L, "createSphereShape", gCreateSphereShape);
lua_register(L, "loadUrdf",gLoadMultiBodyFromUrdf);
lua_register(L, "loadMultiBodyFromUrdf",gLoadMultiBodyFromUrdf);
lua_register(L, "createRigidBody", gCreateRigidBody);
lua_register(L, "setBodyPosition", gSetBodyPosition);
lua_register(L, "setBodyOrientation", gSetBodyOrientation);