Page 1 of 1

Programmatically set the revolute (hinge) joint limits?

Posted: Sun Apr 12, 2020 4:01 pm
by mcarr
Hey, thanks again for this great module. There are a number of robotics examples featuring a hinge joint with limits. In the URDF files these are easily implemented, like for example:

<joint axis="0 0 1" name="hip_1" pos="0.0 0.0 0.0" range="-40 40" type="hinge"/>

Here, the hinge joint in implemented in Bullet as a revolute joint with a restricted angular range of (-40, 40) degrees. When I make similar joints programmatically with pb.createMultiBody(), I can't see any way to specify the limits on the revolute. You can query them with pb.getJointInfo(), with these settings mapping to the jointLowerLimit, and jointUpperLimit variables. But there doesn't appear to be an equivalent pb.setJointInfo() function.

Is there a way to programmatically set the revolute (hinge) joint limits when creating a robot with pb.createMultiBody()?

Re: Programmatically set the revolute (hinge) joint limits?

Posted: Thu May 21, 2020 2:14 am
by adipandas
Hello @mcar,
Were you able to find solution to this? Is it possible to set joint limits using createMultiBody?
Thanks.

Re: Programmatically set the revolute (hinge) joint limits?

Posted: Sun May 31, 2020 8:15 am
by beichun
I'm looking for a solution to this as well. Has anyone been able to solve it?

Re: Programmatically set the revolute (hinge) joint limits?

Posted: Mon Jun 29, 2020 2:30 pm
by mcarr
Unfortunately I haven't found a solution yet. From what I can see the functionality we need is in the C API but not exported to pyBullet. It is however supported through the URDF interface. So as long as you are prepared to monkey around with URDF files, you can get around this issue.

Re: Programmatically set the revolute (hinge) joint limits?

Posted: Wed Jul 08, 2020 12:08 am
by Erwin Coumans
This is currently not exposed/supported.
See https://github.com/bulletphysics/bullet3/issues/2810 for progress/updates.

Re: Programmatically set the revolute (hinge) joint limits?

Posted: Wed Jul 08, 2020 6:06 pm
by Erwin Coumans

Re: Programmatically set the revolute (hinge) joint limits?

Posted: Thu Jul 23, 2020 1:00 am
by adipandas
Erwin Coumans wrote: Wed Jul 08, 2020 6:06 pm I implemented it now: See https://github.com/bulletphysics/bullet3/pull/2919
Awesome.
Thank you.

Re: Programmatically set the revolute (hinge) joint limits?

Posted: Mon Aug 17, 2020 8:47 pm
by mcarr
Erwin Coumans wrote: Wed Jul 08, 2020 6:06 pm I implemented it now: See https://github.com/bulletphysics/bullet3/pull/2919
Thank you!