Ask Your Question
1

Unexpected Link Position Reset When Launching Controllers

asked 2015-04-25 22:30:24 -0600

ColinG gravatar image

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!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-04-25 23:58:37 -0600

ColinG gravatar image

I believe I tracked down the issue. I overlooked that "setCommand" was running at first without the command variables initialized to any value, so I assume they were just some unpredictable junk number. It seems like this explains the inconsistent behavior. In any case, initializing those in the init function appears to have resolved the issue.

If anyone has more insight as to what exactly was happening on the hardware_interface end, I would be glad to hear it. Thanks to anyone that read this.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-04-25 22:30:24 -0600

Seen: 119 times

Last updated: Apr 25 '15