Ros2 Control JointTrajectoryController drifting under gravity?
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.
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.