Environment Representation in the Planning Scene

1,288 views
Skip to first unread message

fernan...@gmail.com

unread,
Jul 29, 2014, 3:18:32 AM7/29/14
to moveit...@googlegroups.com
Hi all,

I'm working with moveit for manipulation task that requires collision avoidance and I would like to know how to add the representation of the environment to my planning scene, because when I visualized the planning scene from Rviz, I only see the robot. The world is composed by several objects that are defined as meshes.

Any and all help is appreciated. 

Thanks

Ane


Yoan Mollard

unread,
Jul 29, 2014, 4:48:35 AM7/29/14
to fernan...@gmail.com, moveit...@googlegroups.com
Hi Ane,


What you're looking for is adding new Collision Objects to the planning scene. They can be part of the environment and also attached/detached to the manipulator :

C++ : http://moveit.ros.org/wiki/Environment_Representation/ROS_API#Add_a_CollisionObject_into_the_Environment
Python through the moveit_commander API: http://docs.ros.org/hydro/api/pr2_moveit_tutorials/html/planning/scripts/doc/move_group_python_interface_tutorial.html#adding-removing-objects-and-attaching-detaching-objects

These tutorials assume you represent the world with boxes but you can also import meshes, eg in python:

self.scene = moveit_commander.PlanningSceneInterface()
self.leg_mesh = "/path/to/meshes/chair_leg.stl" # or better, use find_package()
self.scene.add_mesh("LEG_1", pose, self.leg_mesh)
# And if you want to attach objects to the robot see the methods scene.attach_mesh(...) and scene.remove_attached_object(...)

Here is an example about how to create a Collision Object from a mesh in C++: http://answers.ros.org/question/11408/ros-electric-arm-navigation-programmatically-adding-collision-object/?answer=16912#post-id-16912

I don't find any better [complete] tutorial than these but have a look to these keywords: planning scene, collision object, environment

Cheers,
Yoan

Yoan Mollard
Research engineer – 3rd hand project

INRIA Research center, Flowers lab



Dave Coleman

unread,
Jul 31, 2014, 2:53:58 AM7/31/14
to Yoan Mollard, fernan...@gmail.com, moveit-users
Also, moveit_visual_tools provides lots of helper functions for adding collision objects to MoveIt!.

:: dave | +1.325.261.3283 c

Carlos Maestre

unread,
Aug 4, 2014, 5:11:02 AM8/4/14
to moveit...@googlegroups.com
Hi Ane,

Maybe it is quite obvious what I am going to say, but in RViz to "view" the objects (meshes) that I guess you have in Gazebo you have in RViz to select the topic called /move_group/monitored_planning_scene (In Motion planning -> Planning scene topic). Afterwards, if you want to add some collision you just make as Yoan told you.

I hope this helps,
Carlos
Reply all
Reply to author
Forward
0 new messages