Unexpected Link Position Reset When Launching Controllers
Hello everyone,
I am simulating a simple manipulator in Gazebo, and controlling joints via ros_control using a simplified version of this controller class. The robot model spawns normally in Gazebo every time, and sometimes the controllers function as expected.
My problem is that I sometimes see unexpected behavior, occurring instantly after launching the controller nodes: 1) Roughly half the time, the Gazebo link states all instantly become zero, and all the robot pieces jumble together at the origin, motionless. The rostopic /gazebo/link_states shows all links at exactly x, y, z = 0.
2) Rarely, the robot links appear to fly around, cycling rapidly through many random positions in space.
I notice that the issues never occur if the controller gains are set to zero, so they seem to depend on sending a nonzero input to the setCommand member function of hardware_interface::JointHandle.
Does anyone have any ideas about what might be the issue, or where I should focus troubleshooting?
I'm using ROS Indigo on Ubuntu 14.04.
Thanks in advance for any help!