Closed tpbarron closed 7 years ago
We don't support a floating, spherical or planar joints at the moment. We only have a motorized prismatic and revolute joint. We should fix a crash for unsupported joints though. You could try to apply forces/torques instead? Alternatively, you could try to add 3 prismatic joints and 3 revolute joints (with additional links with small masses (don't make the mass extremely small).
crash fixed here:: https://github.com/bulletphysics/bullet3/pull/1149 it will create a fixed joint instead of crashing. Bullet/pybullet will automatically create a floating base, unless the object has zero mass (fixed) or attached to the world using a prismatic or revolute joint.
Can you explain what you try to achieve? If you want to control the linear and/or angular velocity of the sphere, with respect to a fixed world frame, we could introduce some kind of special motor constraint. (that you can create using pybullet.addConstraint(...).
I'm trying to create a simple maze-like RL environment and was going to start with a spherical agent for simplicity. I'd like to be able to control the linear velocity of the sphere with respect to the world frame. So it should work work to use a motor constraint between the sphere and a fixed point on a plane, right? Thanks for your help.
It probably makes most sense to control only the angular velocity, and leave the friction transfer that to linear velocity etc. Since we don't have this constraint, you may want to use applyTorque instead. Then, you need to use 'setRealTimeSimulation(0), and apply this torque before each call to stepSimulation. When I have some time, I may create some example using 'createConstraint', it may require some additions in the pybullet bindings.
I'm trying to load a sphere with a floating joint so that velocity control can be used. Pybullet gives an error on loadURDF:
If I switch to a fixed joint everything loads fine. Here is basic code to reproduce:
I am using newly updated pybullet 1.0.8. Is there a simple fix for this? Thanks.
sphere2_rolling_friction_jointed.urdf.txt