Ask Your Question

Octomap not available in MoveIt

asked 2019-05-31 10:29:36 -0500

Krebsileinchen gravatar image

updated 2019-06-03 03:51:41 -0500

I want to represent my robots environment (available as a point cloud) as Octomap in MoveIt (ROS Kinetic) to make it available for collision checking. Therefore I mainly followed the Perception Pipeline Tutorial ( Since I don't have an operating sensor I used a topic constantly publishing the point cloud. I created a pointcloud.yaml

  - sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater
    point_cloud_topic: /fakesensor/pointcloud
    max_range: 5.0
    point_subsample: 1
    padding_offset: 0.1
    padding_scale: 1.0
    max_update_rate: 1.0
    filtered_cloud_topic: filtered_cloud

And added this to my launch file:

    <rosparam command="load" file="$(find robot_registration)/config/pointcloud.yaml" />
    <param name="octomap_frame" type="string" value="world" />
    <param name="octomap_resolution" type="double" value="0.05" />
    <param name="max_range" type="double" value="15.0" />

Starting RViz I can observe the point cloud I am publishing but there is no Octomap available. Any ideas what I am missing?

I also tried to use the octomap_server. My .launch file looked like this:

        <node pkg="octomap_server" type="octomap_server_node" name="octomap_server">
                <param name="resolution" value="0.5" />

                <!--common frame id fixed map frame (set to 'map' if SLAM or localization running!) -->
                <param name="frame_id" type="string" value="world" />

                <!-- maximum range to integrate (speedup!) -->
                <param name="sensor_model/max_range" value="5.0" />

                    <!-- data source to integrate (PointCloud2) -->
                    <remap from="cloud_in" to="/fakesensor/pointcloud"/>

I don't get any errors. In RViz I can add by topic the PointCloud2 /octomap_point_cloud_centers and the Marker Array /occupied_cells_vis_array. However in both cases there is nothing displayed in RViz. As far as I can see the topics are communicating fine. /octomap_point_cloud_centers Point Cloud in RViz is receiving messages. Echoing the /octomap_point_cloud_centers the data seems to be empty. Thank you in advance for all ideas!

So far my only idea is having isues with the tf frames: the pointcloud that i am sending has its own "sensor_frame" but i am also publishing the transformation between /sensor_frame and /world. Do I have to pay special attention to sth at this point. Do I have to use tf::TransformBroadcaster or tf2_ros::StaticTransformBroadcaster for the transformation to the sensor_frame?

edit retag flag offensive close merge delete


Did you try to change the value from world to odom?

S.Yildiz gravatar image S.Yildiz  ( 2019-06-03 02:47:48 -0500 )edit

I actually don't have an /odom frame

Krebsileinchen gravatar image Krebsileinchen  ( 2019-06-03 03:45:12 -0500 )edit

I can share you my experience: I had the similiar problem and when I changed the frame to odom it worked. So maybe you have to change the world frame to another frame

S.Yildiz gravatar image S.Yildiz  ( 2019-06-03 03:59:46 -0500 )edit

And you could check, if you get proper point cloud data

S.Yildiz gravatar image S.Yildiz  ( 2019-06-03 04:59:00 -0500 )edit

I played around a bit with different frames but so far not successful. Did you work with the percepton pipeline or with the octomap server? I can display the point cloud I am trying to process but I don't see any points when trying to display /filtered_cloud or /octomap_point_cloud_centers

Krebsileinchen gravatar image Krebsileinchen  ( 2019-06-03 06:21:57 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-03 06:43:52 -0500

Krebsileinchen gravatar image

updated 2019-09-18 04:23:54 -0500

For everyone who's interested: In the end I found the solution and it was very simple. I just increased the sensor_model/max_range to 50.

Update 18.09.2019: Actually my answer given before was not my main problem as I found out today. At that point I had just lost track of the different things I tried. The real error was that at first I added the parameter definitions and especially the load config definition just to my main launch file starting the visualization. Instead it needs to be added (at least the load config) to the repective sensor_manager.launch file of the robot.

edit flag offensive delete link more


Was this because the environment in the static cloud you have extends beyond the 5 m range initially configured?

gvdhoorn gravatar image gvdhoorn  ( 2019-06-03 06:53:37 -0500 )edit

the environment itself was not bigger but it was displaced from the world frame and therefore out of range

Krebsileinchen gravatar image Krebsileinchen  ( 2019-06-05 04:41:31 -0500 )edit

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: 2019-05-31 10:29:36 -0500

Seen: 301 times

Last updated: Sep 18 '19