Robotics StackExchange | Archived questions

joint trajectory controller erratic behaviour in gazebo

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

Asked by Sietse on 2018-10-26 08:50:37 UTC

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?

Asked by PeteBlackerThe3rd on 2018-10-27 15:12:31 UTC

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.

Asked by Sietse on 2018-10-28 02:55:48 UTC

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 ..

Asked by gvdhoorn on 2018-10-28 04:59:57 UTC

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

Also:

I already have asked this question on gazebo-answers

where is the link?

Asked by gvdhoorn on 2018-10-28 05:00:57 UTC

Link now in my question.

Asked by Sietse on 2018-10-28 11:02:21 UTC

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.

Asked by PeteBlackerThe3rd on 2018-10-28 12:23:21 UTC

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.

Asked by Sietse on 2018-10-29 16:54:49 UTC

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.

Asked by gvdhoorn on 2018-10-30 02:59:03 UTC

Answers