Robotics StackExchange | Archived questions

Delay with JointTrajectoryController and trajectory execution in Gazebo

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

Asked by gsisinna on 2023-02-13 12:36:42 UTC

Comments

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

Asked by azeey on 2023-03-03 21:37:33 UTC

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

Asked by gsisinna on 2023-07-10 05:00:53 UTC

Answers