Programmatically set the revolute (hinge) joint limits?

Official Python bindings with a focus on reinforcement learning and robotics.
Post Reply
mcarr
Posts: 3
Joined: Sun Feb 02, 2020 9:33 pm
Location: Oxford, UK

Programmatically set the revolute (hinge) joint limits?

Post by mcarr » Sun Apr 12, 2020 4:01 pm

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()?

adipandas
Posts: 1
Joined: Sun Nov 03, 2019 11:29 pm

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

Post by adipandas » Thu May 21, 2020 2:14 am

Hello @mcar,
Were you able to find solution to this? Is it possible to set joint limits using createMultiBody?
Thanks.

beichun
Posts: 1
Joined: Sun May 31, 2020 8:03 am

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

Post by beichun » Sun May 31, 2020 8:15 am

I'm looking for a solution to this as well. Has anyone been able to solve it?

mcarr
Posts: 3
Joined: Sun Feb 02, 2020 9:33 pm
Location: Oxford, UK

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

Post by mcarr » Mon Jun 29, 2020 2:30 pm

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.

User avatar
Erwin Coumans
Site Admin
Posts: 4223
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

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

Post by Erwin Coumans » Wed Jul 08, 2020 12:08 am

This is currently not exposed/supported.
See https://github.com/bulletphysics/bullet3/issues/2810 for progress/updates.

User avatar
Erwin Coumans
Site Admin
Posts: 4223
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

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

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


Post Reply