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:
hmm, that's strange. Are there any effort limits on the joints?
Sorry for the delay, but replacing
ros2_controller
with a custom implementation solved the issue. Thanks!