Contact force and torque inaccurate

Typically: "How do I... ", "How can I... " questions
Post Reply
Niyi
Posts: 6
Joined: 25 Nov 2024, 08:49

Contact force and torque inaccurate

Post by Niyi »

Hello,

When I was simulating, I had the robot end press an object as follows:
https://www.imghippo.com/i/mpRM8816rsQ.png
https://www.imghippo.com/i/zgR3792pk.png
https://www.imghippo.com/i/KYM7214OoM.png
Theoretically, this situation should only have forces in the Z direction and torques in the x direction. But in fact forces and torques in other directions are measured. I've tried several engines, the same problem happens.
I want to know how these forces and torques are generated and what parameters should be set to be closer to the theoretical values?

Cheers
coppelia
Site Admin
Posts: 10747
Joined: 14 Dec 2012, 00:25

Re: Contact force and torque inaccurate

Post by coppelia »

Try to also visualize contact points/forces using the add-on [Modules > Tools > Contact display].

My understanding is that the cube causes a slight (unwanted) horizontal motion of the robot, which leads to additional, non-vertical forces.

Cheers
Niyi
Posts: 6
Joined: 25 Nov 2024, 08:49

Re: Contact force and torque inaccurate

Post by Niyi »

Hello,
The trajectory of the robot is vertically downward, but there are still non vertical forces. How should I set the robot and the simulation to avoid horizontal motion?
coppelia
Site Admin
Posts: 10747
Joined: 14 Dec 2012, 00:25

Re: Contact force and torque inaccurate

Post by coppelia »

Please record a short video that illustrates this, by using the mentioned contact force add-on. Or better: post a minimalistic, self-contained scene that allows us to test this.

Cheers
Niyi
Posts: 6
Joined: 25 Nov 2024, 08:49

Re: Contact force and torque inaccurate

Post by Niyi »

Hello,

I've made a demo scene to illustrate this issue. The target dummy is set to move downward to reach the target force using a simple P control. The code could be find in the child script associated with the target dummy.

Here is the link of the scene:
https://drive.google.com/file/d/1aNVvds ... sp=sharing

Cheers
coppelia
Site Admin
Posts: 10747
Joined: 14 Dec 2012, 00:25

Re: Contact force and torque inaccurate

Post by coppelia »

There is no place for compliance in your robot. If you however reduce the force/torque each joint is able to exert, then you should be able to see the contact point jump, or several contact points appear.

How Mujoco handles contact and collision response internally is out of our domain of competence.

See also my reply to your other similar question.

Cheers
Post Reply