Search code examples
pythonphysicsscientific-computing

How to use pybullet createConstraint for constraining world frame position of an object


createConstraint method in pybullet allows to constrain one joint position w.r.t. another. Is there a way to use this function in order to prevent an object moving e.g. outside of a sphere?

So far I am checking the object position every timestep and change the position manually in case of violated constraints.


Solution

  • In fact there is a working example in the file examples/pybullet/constraint.py of pybullet.