JOINT_PLANAR/SPHERICAL problem

Official Python bindings with a focus on reinforcement learning and robotics.
Post Reply
lopas
Posts: 2
Joined: Thu Dec 12, 2019 7:37 am

JOINT_PLANAR/SPHERICAL problem

Post by lopas »

Hello, just registered on this forum :) I was trying to integrate pybullet into a game engine i'm developing mainly in python. I have read that planar/spherical joints are currently supported by pybullet, however, i have problems when i create a multibody using the pybullet.createMultiBody(...) method. JOINT_PRISMATIC/JOINT_REVOLUTE/JOINT_FIXED are being setted correctly but JOINT_SPHERICAL/JOINT_PLANAR are setted as JOINT_POINT2POINT.
I have attached a .zip file containing the .py if someone would like test it ..
Attachments
planar_spherical_joints_test.zip
(1.25 KiB) Downloaded 411 times
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: JOINT_PLANAR/SPHERICAL problem

Post by Erwin Coumans »

We only tested spherical joints in deep_mimic through URDF, not programmatically.
Have you tried that?

Here is a patch that enables spherical joint creation through the API (instead of URDF):
https://github.com/bulletphysics/bullet3/pull/2551
Attached is an example that works after applying this patch.

(ignore planar joints, we don't use/support them)
Attachments
spherical_example.zip
(1.32 KiB) Downloaded 435 times
lopas
Posts: 2
Joined: Thu Dec 12, 2019 7:37 am

Re: JOINT_PLANAR/SPHERICAL problem

Post by lopas »

Hi Erwin, I had seen the deep_mimic example, but i really needed to be able to recreate the spherical joint programmatically because I am trying to use pybullet as a physical engine for a game engine where I have the setParent and removeParent functions similar to those that you could find in the blender game engine (if you know) where it's possible to specify the type of joint also, and you know, spherical joint are needed for the procedurally generated ragdolls, so thank you very much for taking the time to add this option, you saved me a lot of time. cheers
Post Reply