ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

is there a way to recover from collision for jog arm or in the move group?

asked 2021-10-15 08:22:37 -0500

robotdelta gravatar image

hello, i'm new to ROS and moveit. I'm trying to make a teleoperated 7 dof robotic arm using moveit servo and the move group to plan the return to "home" and "standby" position. I use the ROS1 Noetic system with moveit (on python 3.8).

I can move the arm with moveit servo but because of the springiness of some joints, in some case it's possible that the parts of the arm come into contact with an obstacle even with the safety of the moveit servo parameters. But in this case the security made moveit servo to stop the actuators. I searched a bit to find something useful for this problem but I did not find anything useful for this case. Especially with the poor documentation of moveit servo (the only documentation that I found useful on this subject is this post there and the github there).

is there any plugin or pkg useful to perform collision recovery? I saw something like this in ROS but it seem to be for wheel bases. I was thinking of another way which would be to recover a position before the collision and return to it. would something like that be possible?

edit retag flag offensive close merge delete


Do the motors physically need to reset? Does something need to be unlocked, like a protective stop? Or are you asking how to switch between controlling via moveit_servo and "regular" MoveIt motions?

fvd gravatar image fvd  ( 2021-10-15 10:14:05 -0500 )edit

For now I only work on simulated robot but theoricaly the motors were still be online and running. I know how to change controller to provide commands from move group or servo but they not plan(for movegroup) or send command (for servo) if the robot is in collision (with himself or with the world). I need to make the robot return to a non collision state to be able to plan or use servo. My problem is: I don't know how make that append.

robotdelta gravatar image robotdelta  ( 2021-10-15 16:31:52 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-10-18 08:25:07 -0500

AndyZe gravatar image

updated 2021-10-18 08:26:34 -0500

This is a good idea and you're not the first person to want it!

The reason it hasn't been done yet is, there's no convenient collision checking API to determine the direction to the nearest collision. There might also be some edge cases that would be hard to handle, like what if two collision bodies are touching the robot on opposite sides?

Here are links to the MoveIt collision checking options:

I'd be happy to review a PR for this! But, like I said, I'm not sure how to handle the edge cases.

If you really dig into the API, it looks like there is "pos" and "normal" data that you could use to get the direction to nearest object.

edit flag offensive delete link more


If you had to, you could run a collision check and get the colliding link names. Then disable them in the allowed collision matrix to allow your robot to move again. I'm not saying it's a great idea but it would work.

AndyZe gravatar image AndyZe  ( 2021-10-18 08:37:49 -0500 )edit

thank you for your answer, I did not know that it had already been asked. I think I will try something very basic: making an historic on few second and if in collision return in lasts poses to be able to restart from a free collision state. It's a dirty way to do it I think but I'm not sufficiently experienced to do something better

robotdelta gravatar image robotdelta  ( 2021-10-18 09:44:11 -0500 )edit

Question Tools

1 follower


Asked: 2021-10-15 08:22:37 -0500

Seen: 157 times

Last updated: Oct 18 '21