Ensure that force sensor stays rigid

Typically: "How do I... ", "How can I... " questions
Post Reply
RalfR
Posts: 18
Joined: 28 May 2019, 09:18

Ensure that force sensor stays rigid

Post by RalfR »

I have a problem with a force sensor that acts as a wobbly spring joint, so I assume I do something wrong.
The scenario is a heavy manipulator moving around as a dynamic model. I want to get the forces and torques at the base, so I included a force sensor between the base and the first robot joint. The object chain looks like this:
Base model (static) -> Force sensor -> Disc plate(dynamic but minimal values) -> Joint0 -> ...

The problem I get is that the force sensor doesn't stay rigid, as I get a very noticeable wobble between the base and the disc object when the robot is moving. The force sensor doesn't seem broken, as the robot stays attached and even reduces the wobble after a while. I have also deactivated all threshold triggers for the force sensor. I also ensured that the objects don't touch each other, and have tried different physics engines. The behaviour stayed the same.

From the behaviour, the force sensor seems to act like a spring joint. However, I need it to be totally rigid.
What do I need to do ? Is there a sample scenario where a force sensor is used between joints ?

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

Re: Ensure that force sensor stays rigid

Post by coppelia »

Hello,

with most physics engines, the force/torque sensor is operating as a simple 6DoF constraint: if acting forces are large because of large masses/velocity, you will see some wobbling. On top of that, some engines do not support well having adjacent masses/inertias with a too large ratio (say more than 5 or 10). So you can try to distribute the total mass or inertias somewhat.

At the same time, the MuJoCo engine should not show any wobbling. Is that correct?

Cheers

RalfR
Posts: 18
Joined: 28 May 2019, 09:18

Re: Ensure that force sensor stays rigid

Post by RalfR »

I tried the different physics engines:
- Bullet and ODE show a wobble when using the force sensor
- Vortex needs a license
- MuJoCo seems to have a problem with the dynamics controller, as the robot gets into a swinging state during motion and doesn't reach the target. The force sensor stays rigid, though.
- Newton works and has a rigid force sensor ! So I will use this engine for now.

I also get quite a few crashes to desktop due to memory problems (typically some problem with free() e.g. double free, invalid next size ) when the robot motions are getting unstable, swingy or otherwise complicated.

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

Re: Ensure that force sensor stays rigid

Post by coppelia »

If you can, try using MuJoCo, since it is a state-of-the-art physics engine. You will probably have to adjust a few engine specific parameters, notable, e.g. when using joints in position control, try increasing the armature parameter for the joints involved. Refer also to similar robot models from the model library that appear to be working fine with MuJoCo.

Cheers

RalfR
Posts: 18
Joined: 28 May 2019, 09:18

Re: Ensure that force sensor stays rigid

Post by RalfR »

Yeah, I noticed that there is the recommendation to use a high armature for the MuJoCo engine (a value of ~20 is mentioned in another thread). How do I actually access this parameter ? I checked Simulation settings/Engine properties, but the armature is not there (and should probably refer to a specific joint anyways). The scene object properties for the joints also do not include them. The Mujoco docu mentions it, but seem to do a full joint definition when using it. As you seem to have experience with using the parameter, what is the best way to actually set it in CoppeliaSim ?

RalfR
Posts: 18
Joined: 28 May 2019, 09:18

Re: Ensure that force sensor stays rigid

Post by RalfR »

I found the settings now. I had to:
- Select the joint
- Open the scene Object properties
- Open the Dynamic properties dialog
- There is an "engine properties" button to access the joint-specific settings

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

Re: Ensure that force sensor stays rigid

Post by coppelia »

You can also access all those engine parameters via their setter/getter functions

Cheers

Post Reply