Simulation quality, solver settings and jumpy motion


#1

As mentioned in linked thread I am experiencing problems with my robot ‘jumping’ occasionally and have investigated a bit.

As per suggestion by Luc I have set the gzbridgesettings in my exc file but I can’t tell if or how much that helped. From the Gazebo forum I’ve found instead that it may be related to my MOI’s have 2+ orders of magnitude difference ( Answer by Hsu at http://answers.gazebosim.org/question/12327/inertia-matrices-and-double-precision-ode/)
He is talking about a need for more inner iterations.

This I have understood to be related to the various settings for the physics solver ( http://gazebosim.org/tutorials?tut=preset_manager&cat=physics ) which can have both a solver_type=quick with iters ranging from 70 to 500, as well as a demanding yet more precise solver_type=world ( http://answers.gazebosim.org/question/232/gazebo-physics-solver-type-quick-vs-world/ )

Does low inner iterations appear as a reasonable culprit for my issues with jerky motion?

If so, I have not been able to find any documentation for how to properly set either iters or solver type through NRP so I would appreciate any hints?

Thanks in advance

Continuing the discussion from NRP simulation appears non-deterministic?:


#2

Hi Jakob,

A short theoretical contribution to the discussion, as I unfortunately am not sure if you can indeed change the gazebo iteration steps.

  1. One of the culprits could be indeed the big timestep,The reason is that if the bodies are moving with high velocities and the timestep is big, then within a timestep they would have moved long distance, with the possibility of collisions. If such collisions do indeed happen, then the forces that are applied to handle the collisions could be creating this “jumping effect”. The solution in this case would be indeed to decrease the timestep, thus increasing the accuracy

  2. Another possible reason would be that the collision shapes of your robot are not closely attached to the actual shapes. You can check that by right clicking on the robot, then clicking inspect and checking the box that says show bounding boxes. If the shapes are too vague, you might need to refine them a bit. Of course that would make the simulation slower.

To confirm you could run your simulation and at the same time launch a gazebo GUI client to see if you can observe a different behaviour between gazebo and the NRP. To launch a gazebo client you just write gzclient from a terminal. I hope it helps somehow!

Regards,
Manos


#3

Hi Manos and thank you for your notes.

However, I checked and as far as I can tell, the culprit is unlikely to be either of your suggestions.
My robot is moving really slow and there are no collisions, as it is merely a vertical robot arm moving its end effector around.
And the behavior in Gazebo vs. NRP seemed quite the same, though I did have some problems with the SDF file going a little crazy when launched in Gazebo standalone… Now that I mention this for myself I guess it could be related :slight_smile:

However, I would still like to know if there is a way to increase precision, also sub-sample precision, when simulating in NRP.
At least based on the Gazebo forum conversation, there may be situations where their solver does not manage to converge within the default iterations, which could cause similar jumpy motion.