joint trajectory controller erratic behaviour in gazebo

asked 2018-10-26 08:50:37 -0500

Sietse gravatar image

updated 2018-10-28 11:01:46 -0500

Hello list,

I have a simple model, consisting of 4 boxes/cylinders and 3 revolute joints, very basic. It is controlled using the joint trajectory controller with a simple python script trajectory_1.py. It is not connected to ground, it effectively is a box that can push itself along the ground with the rest of the model.

Here a short video, exported from gazebo, that show's it in action.

And here the complete project.

After 3 second (in the video) the model starts to "oscillate" violently. The joints suddenly don't seem to be revolute anymore. This happens most of the tries. This smells like a bug.

This is using melodic with different version of gazebo (7, 9 and 10), and different versions of linux (ubuntu bionic and debian testing) I already have asked this question on gazebo-answers, but the problem only occurs when the trajectory controller is running.

Anybody an idea? Thanks in advance, Sietse

edit retag flag offensive close merge delete

Comments

The joints always behave as revolute joints, but the control of them seems to be all over the place. Have you tried tuning the joint controllers, and putting some force limits on them?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-10-27 15:12:31 -0500 )edit

Thanks for the reply. After 3 seconds, for a few frames, the black box changes in 3 axes, and not in only one as specified in the urdf. I cannot find a force limit setting in the trajectory controller, is there one? In the urdf/sdf the limit in the joint element is set to a sane value I think.

Sietse gravatar image Sietse  ( 2018-10-28 02:55:48 -0500 )edit

These kinds of problems are typically caused by missing or incorrect inertias (and not "incorrect" as in: no physically possible, but not leading to a numerically stable simulation) or by other physical properties of the simulated objects not agreeing with the way Gazebo implements its ..

gvdhoorn gravatar image gvdhoorn  ( 2018-10-28 04:59:57 -0500 )edit

.. physics simulation. My first check would be those properties.

Also:

I already have asked this question on gazebo-answers

where is the link?

gvdhoorn gravatar image gvdhoorn  ( 2018-10-28 05:00:57 -0500 )edit

Link now in my question.

Sietse gravatar image Sietse  ( 2018-10-28 11:02:21 -0500 )edit

I recommend producing another video with the centres of gravity and inertia boxes shown so we can gen an idea if the physical properties have be set correctly as @gvdhoorn suggested.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-10-28 12:23:21 -0500 )edit

Thanks! That did the trick! Problem solved! The origin element in the inertial element was not the same as in the collision and visual elements.

There still is a strange thing. After correcting this, not all the inertial links are visualised anymore in the proper view setting. But everything works.

Sietse gravatar image Sietse  ( 2018-10-29 16:54:49 -0500 )edit

So in the end this was a Gazebo issue. The fact that it manifested more clearly with the controller running doesn't really change that.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-30 02:59:03 -0500 )edit