Rosanswers logo

I am testing the arm_navigation's collision detection for a virtual object added to the planning scene and a virtual object attached to the robot. When using CYLINDER models, the collision detection fails; the results are OK when using BOX models. Using CYLINDER models is better in my case, so if somebody knows the reason, please tell me.

Here is the detail:

First, I added a virtual CYLINDER object to the planning scene through the /environment_server/set_planning_scene_diff service. Also, I attached a virtual CYLINDER object to the robot's left gripper. Then, I checked the collision during moving the robot's arm through the planning_scene_validity_server/get_state_validity service.

It could detect collisions between 1. the robot's body and the virtual scene object, and 2. the virtual robot's object and the robot's body. However, it could not detect collisions between the virtual robot's object and the virtual scene object. I tested to change the SetPlanningSceneDiffRequest.operations.collision_operations parameter, but it did not work.

Here is a video to show this problem: http://youtu.be/oRmfEwKrD9s (CYLINDER case)

By changing the objects to BOX models, it works as I expected.

The video is here: http://youtu.be/YH-MAvbKm9M (BOX case)

Many thanks!

Update: Combinations of (CYLINDER and BOX) or (BOX and CYLINDER) work well. Only the (CYLINDER and CYLINDER) case is weird.

Originally posted by akihiko on ROS Answers with karma: 113 on 2014-09-16

Post score: 2

Original comments

Comment by David Lu on 2014-09-17:
I know this was a bug I reported way back in the day. No idea what became of it or even where I reported it.

Comment by akihiko on 2014-09-17:
Thanks for the information.


1 Answer 1


Rosanswers logo

The collision detection of planning_environment ( http://wiki.ros.org/planning_environment ) seems to be using the collision checker of ODE (open dynamics engine). The codes are not available online now, but they are:

  • /opt/ros/groovy/stacks/arm_navigation/planning_environment
  • src/models/collision_models.cpp
  • src/models/collision_models_interface.cpp
  • include/planning_environment/models/collision_models.h
  • include/planning_environment/models/collision_models_interface.h
  • /opt/ros/groovy/stacks/arm_navigation/collision_space
  • include/collision_space/environmentODE.h
  • src/environmentODE.cpp

Anyway, unless fixing this bug, collision detection between two cylinder models does not work.

Hence, a better solution is using other collision detection library, such as:

Though MoveIt! is an integrated planning tool, we can use it as a collision detection library (and it is easy to use on ROS).

The following videos are the similar situations where we are using MoveIt! as a collision checker. No problem is happening in the collision detection between two cylinder models case.

Originally posted by akihiko with karma: 113 on 2015-03-10

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.