Ros2 Control JointTrajectoryController drifting under gravity?

asked 2023-06-18 18:05:30 -0500

mkern0477 gravatar image

Hi all,

I'm trying to implement a JointTrajectoryController into a robotic arm that I have modeled in Gazebo. When I load the arm without any controllers, the arm flops down (as expected). However, when I try to load my joint trajectory controller, the robot starts at its initial position, but some joints begin to dislocate and start drifting until the robot goes completely nuts. I have noticed that this only happens under gravity, and when I set the gravity to 0 in gazebo this problem goes away. I'd like to model the arm in gravity, so if anyone knows what is going on and/or can point me in the right direction, I would appreciate that a lot. I'll include my python launch file, the yaml configuration file and my urdf file below, as well as a video of the behavior I'm seeing with my robot. I am currently using ros2 humble on ubuntu 22.04. The urdf file is from this ros1 control repository, but I have tried converting everything to be compatible with ros2. I have also tried multiple urdfs with the same parameter and launch file, but I saw the same drifting as in the video. Please let me know if there's anything else that I should include, if need be.

Thanks in advance.

Files on Dropbox

edit retag flag offensive close merge delete

Comments

Shortly after making this post I stumbled across this github link which appears to be the same issue I'm describing. I will likely check it out tomorrow to see if answers from the link resolve my issue.

mkern0477 gravatar image mkern0477  ( 2023-06-18 21:11:11 -0500 )edit