Skip to content
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

Reading Force and Torque #228

Open
hai-h-nguyen opened this issue May 12, 2023 · 2 comments
Open

Reading Force and Torque #228

hai-h-nguyen opened this issue May 12, 2023 · 2 comments

Comments

@hai-h-nguyen
Copy link

hai-h-nguyen commented May 12, 2023

Hi,

I am trying to read out the force (Fx, Fy) and the torque (Mx, My) when inserting a square peg into a hole. The idea is to insert the peg into the hole using the force and torque feedback. The peg is controlled by setting the velocity along the X and Y axes.

When I print out peg.torque while I manually control the peg (randomly driving it using a keyboard left/right), the torque is always 0, which seems wrong. Can you explain what I should do in this case?

Also, getting the force when the peg moves left/right and collides with the ground and the hole seems complicated. The property force, according to the documentation, is not the total force applied to the body (unlike the torque). Do you have any pointers for me?

Thank you!

@viblo
Copy link
Owner

viblo commented May 12, 2023

A basic question to start, how do you move the peg? Just settings its position, which is sort of like teleporting in the real world (if was possible), or something else?

I also wonder if you looked at arbiter.total_impulse and/or arbiter.total_ke instead?

@hai-h-nguyen
Copy link
Author

Hi, thanks for replying. Currently, we directly set the force vector of the peg body to make it move based on the input vx vy. I can look into that, can you give a high-level idea of how they can help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants