Ask Your Question

Moveit import scene from text automatically

asked 2018-04-03 11:12:05 -0500

hansolo gravatar image

updated 2018-04-04 05:58:38 -0500

We can export and import Moveit scene objects to/from a text file (*.scene) using the RViz GUI (picture below). I would like to do the same automatically, so that the scene will be loaded on start. I am aware of the option of creating collision objects by code, however I want to have a more maintainable approach (data over code).

Is there a way to save/load Moveit planning scene objects to/from text, using C++ API or using an existing ros node/service?

System: Ubuntu 16.04, ROS-Kinetic

image description

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-07 20:34:34 -0500

skipPant gravatar image

There is a node under moveit_ros_planning_type pkg, where you can pass argument and publish scene. Just add this to your launch file:

<arg name="scene_file" default="$(find project_name)/config/file.scene"/> 
<node name = "moveit_publish_scene_from_text" pkg= "moveit_ros_planning" type = "moveit_publish_scene_from_text" args= "$(arg scene_file)"/>
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



Asked: 2018-04-03 11:12:05 -0500

Seen: 1,195 times

Last updated: Apr 07 '18