Closed mirsking closed 3 years ago
Can you fork the latest bullet3 repo and modify/add a demo with your grasp sim + URDF file, and provide a link? Please make it build out-of-the-box similar to the existing Bullet demos, using either premake or cmake. Thanks!
Hi, I've push my codes here https://github.com/mirsking/bullet3/tree/graspit_demo and there are two commits. The first one is without btMultiBodyJointLimitConstraint in URDFRevoluteJoint, and I've modify URDF2Bullet.cpp to add btMultiBodyJointLimitConstraint for URDFRevoluteJoint in the other commit. Thank you for your help!
I had a look at your example, thanks for sharing. There are many issues, here are a couple: 1) First of all, the collision meshes are way too detailed, and should be simplified a lot (don't reuse visual mesh for collision mesh) 2) You should disable self-collision for the btMultiBody (this could be one of the reasons for torque) 3) It is best to not rely on constraint limits until grasping works well. Just use 'continuous' joints without limits (one more reason to get undesired torques). Use motors instead. 4) It is best to use joint motors to drive the fingers, at least in the beginning. See ImportURDF demo how to do this. Once that works nicely, then consider using other control methods (computed torque + inverse dynamics, or PID control etc) 5) The masses and inertias are extremely small and this will lead to instability. It is best to use larger masses/inertias first, until the grasp works nicely. Once grasping an object works well, then you can adjust to more realistic masses, use double precision, better constraint solver etc.
What is the license of the grasp example and the URDF file? Can it be added to Bullet? I consider creating a working grasp demo, and this seems a nice starting point.
Thank you for your help. And I'll try with these instructions. I have not decided the license right now. But it can be used freely and in any way you like, and also can be added into Bullet.
Mirsking: Does your gripper work now? In case it is working, we could make an example from it and make a pull request to include it into the Bullet Example Browser. Just tell us when you are ready.
Sorry, it's not ready yet. since I'm now using baxter gripper for the simulation, I'm not focusing on this gripper. But I think I will try this gripper later, and when it's ok, I will reply here. Thanks for the attentation.
Hi, I'm now working on grasp physics simulation using the kinova kg3 gripper.(This gripper has 6 dof, 2 in each finger.) I import the gripper's urdf into bullet ExampleBrower by URDF2Bullet.cpp. Howerer, the simulation is just doesn't make sense. I got things like this.
Then I find in URDF2Bullet.cpp file, URDFRevoluteJoint just doesn't have btMultiBodyJointLimitConstraint, which can have lower and upper limit of joint value.
When I add the constraint in the same way as that in URDFPrismaticJoint, the problem doesn't happy. I don't whether this is a bug.
However, when I add torque into each finger joint by
m_multiBody->addJointTorque(joint, force);
in stepSimulation. The joint only move a little, while there still are torque add to every joint. The scene is like And the torque is still not zero like thisThank you for your help.