bulletphysics / bullet3

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
http://bulletphysics.org
Other
12.54k stars 2.87k forks source link

Can't control joints #2663

Closed Jingjinganhao closed 4 years ago

Jingjinganhao commented 4 years ago

Hi, my robotic arm has 4 degrees of freedom, but it has 8 joint. When I let it move, some joints broke apart。How can I fix it? Is there some API can make them move as other moving joints。 a

my urdf is as follow: uarm.txt

Thanks!

erwincoumans commented 4 years ago

URDF doesn't support closed looks, so you need to add constraints to connect parts. This is a bit more complicated. See the dobot.py example how to do this: https://github.com/bulletphysics/pybullet_robots/blob/master/dobot.py

Jingjinganhao commented 4 years ago

Thank you very much I did what you said but it didn't work I did as follow: I want to build joint1 and jointtype is revolute c = p.createConstraint(uarmId,3,uarmId,2,jointType=p.JOINT_POINT2POINT,jointAxis =[0,1,0], parentFramePosition=[0.0274502,0.0165272,0.02698], childFramePosition=[-0.1587598,0.0165272,-0.00006]) parentFramePosition = joint1-joint3 childFramePosition = joint1-joint2 Is this wrong? What does p.JOINT_POINT2POINT mean? it means revolute?