Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulating Flexible Joints #1991

Closed
milutter opened this issue Nov 14, 2018 · 3 comments
Closed

Simulating Flexible Joints #1991

milutter opened this issue Nov 14, 2018 · 3 comments

Comments

@milutter
Copy link

Can one simulate flexible joints using Pybullet? More concretely can one simulate two joints that are coupled by a massless spring? Therefore, the torque for the coupled joint would be modelled as

\tau_{motor} = J_{motor} qdd_{motor} + K (q_{joint} - q_{motor})
\tau_{joint} = K (q_{joint} - q_{motor})

where \tau is the motor / joint torque and q, qd, qdd are the joint / motor positions, velocities and accelerations. One could simulate the motor outside of PyBullet, but this risks that the integration of qdd_{motor} and qdd_{joint} would diverge and yield "unrealistic" simulations.

@erwincoumans
Copy link
Member

No, we do this motor modeling outside of PyBullet.

@erwincoumans
Copy link
Member

erwincoumans commented Feb 26, 2019

Now I realize you can simulate flexible joints using PyBullet.createUserConstraint.

You can create a 'fixed' constraint with a limited force, to mimic a flexible joint.
Here is some example how to do it:
#2100 (comment)
If the maximum torque is not enough to model the spring, we can expose the stiffness and damping (which gets converted into CFM and ERP internally) to model a the spring force.

In addition to the fixed constraint, you can also model 'gears', which couple joint angles between joints. As you set a small maximal torque, those connections become flexible.

Please let me know if that helps or not.

@ac-93
Copy link

ac-93 commented Apr 22, 2020

If the maximum torque is not enough to model the spring, we can expose the stiffness and damping (which gets converted into CFM and ERP internally) to model a the spring force.

I'd like to adjust the stiffness and damping coefficients for a project I'm working on, would it be possible to expose these using something like the p.changeConstraint()? or is this already exposed through the erp parameter?

Thanks

@bulletphysics bulletphysics locked and limited conversation to collaborators Apr 26, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants