Delay with JointTrajectoryController and trajectory execution in Gazebo

asked 2023-02-13 11:36:42 -0500

gsisinna gravatar image

Good morning everyone, I am having a problem with executing trajectories in Gazebo and in particular I noticed by plotting the trajectories for each joint with plotjuggler that they are out of phase by a constant delay of about 500ms, so a big error if using controller frequencies above 100Hz.

I'm sending velocity commands via custom plugins in C++, operating directly with the JointVelocityCmd component. Even setting the maximum speed allowed by the joint, and then staying at the limit, I still notice the same phase shift in rapid position changes. I also tried a PID implementation and preliminary tuning of gains so as to see if the problem depended on that, but even in the best case I always get the same delay.

Are there any additional limits imposed by Gazebo for calculating acceleration or maximum speed when using JointVelocityCmd?

Here is a sample plot: image description

edit retag flag offensive close merge delete


hmm, that's strange. Are there any effort limits on the joints?

azeey gravatar imageazeey ( 2023-03-03 20:37:33 -0500 )edit

Sorry for the delay, but replacing ros2_controller with a custom implementation solved the issue. Thanks!

gsisinna gravatar imagegsisinna ( 2023-07-10 05:00:53 -0500 )edit