Home | Tutorials | Wiki | Issues
Ask Your Question

Simulation of pendulum not working as expected using ODE physics

asked 2016-06-14 19:52:19 -0600

john123 gravatar image

I am evaluating the physics engine of Gazebo and am having a strange problem getting a simple rotary inverted pendulum to work. My analytical solution shows that the natural period should be less than 1 second, but in the simulation it has a period of around of 5 seconds. The horizontal support arm is not moving in reaction to the pendulum swinging. I am applying a moment to the pendulum using the GUI to cause it to swing to observe the period. I have placed the SDF file on pastebin:


Note that the meshes have been replaced with basic geometry for simplicity. The inertial parameters were generated using a rough Solidworks model of a brass pendulum with an aluminum arm.

Is there a problem with the SDF file causing the weird simulation result?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-06-18 08:23:12 -0600

mrslvgg gravatar image

This is mainly a singularity problem since the body's moments of inertia are highly unequal and the inertia matrix is poorly conditioned. In this case, the integration error is very high resulting in unrealistic behaviour. This is particularly evident for long thin bodies rotating about their longer axis. For this reason, the user guide states that the user should avoid using long thin bodies.

In your case, by setting Izz=Ixx=Iyy the problem is solved and the natural period turns out to be approximately 0.7 seconds.

edit flag offensive delete link more


Thank, that makes sense. Are there any plans to make DART Sim part of the default binary distribution?

john123 gravatar imagejohn123 ( 2016-06-18 10:10:02 -0600 )edit

I have no idea, but you can find the gazebo project status and the future release schedule here: http://gazebosim.org/

mrslvgg gravatar imagemrslvgg ( 2016-06-27 05:10:29 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-06-14 19:52:19 -0600

Seen: 548 times

Last updated: Jun 18 '16