ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Point cloud to Octomap? No map received

asked 2012-12-24 04:29:53 -0600

madmax gravatar image

updated 2014-01-28 17:14:39 -0600

ngrennan gravatar image


I am trying to build a map out of a point cloud but somehow I don't receive a map. The point cloud is build from a tilting laser scanner and I pass this point cloud to the octomap server.

roswtf warned me that /octomap_server: /cloud_in is not connected but I did as you can see in my launch file.

rxlog just shows me that:

Incoming queue full for topic "/clock".  Discarding oldest message (current queue size [0])

Time jumped forward by [0.011000] for timer of period [0.010000], resetting timer (current=766.595000, next_expected=766.584000)

I set sim_time to true because I simulate in Gazebo.
Could that be a problem?

Launch File (last 2 nodes are interesting):

<?xml version="1.0"?>


<!-- upload script server parameters -->
<rosparam command="load" ns="/script_server/arm" file="$(find schunk_default_config)/config/powerball_joint_configurations.yaml"/>

<param name="use_sim_time" type="bool" value="true" />

<!-- launch an empty world -->
<include file="$(find gazebo_worlds)/launch/office_world.launch" />

<!-- send powerball urdf to param server -->
<include file="$(find schunk_hardware_config)/powerball/urdf/upload_powerball.launch" />

<!-- push robot_description to factory and spawn robot in gazebo -->
<node name="spawn_gazebo_model" pkg="gazebo" type="spawn_model" args="-urdf -param robot_description -model powerball -z 0.01 " respawn="false" output="screen" />

<!-- controller manager -->
<include file="$(find cob_controller_configuration_gazebo)/ros/launch/controller_manager.launch" />

<!-- powerball controllers -->
<include file="$(find schunk_controller_configuration_gazebo)/ros/launch/powerball_controller.launch" />

<!-- start command_gui -->
<node ns="command_gui" pkg="cob_command_gui" type="" name="$(anon command_gui_node)" cwd="node" respawn="false" output="screen" >
    <!-- upload button parameters, but delete the old ones before -->
    <rosparam command="load" ns="control_buttons" file="$(find schunk_default_config)/config/command_gui_buttons_powerball.yaml"/>

<!-- Laser Pipeline -->
<node type="laser_scan_assembler" pkg="laser_assembler" name="my_assembler">
    <remap from="scan" to="powerball_scanner"/>
    <param name="max_scans" type="int" value="400" />
    <param name="fixed_frame" type="string" value="base_link" />

<!-- Point cloud publisher -->
<node name="periodic_snapshotter" pkg="laser_assembler" type="periodic_snapshotter" respawn="false" output="screen" />

<!-- Octomap Server -->
<node pkg="octomap_server" type="octomap_server_node" name="octomap_server">
    <param name="resolution" value="0.05" />

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

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

    <param name="latch" value="false" />
    <!-- data source to integrate (PointCloud2) -->
    <remap from="assembled_cloud" to="/narrow_stereo/points_filtered2" />



Or is there another easy way to just get a 3D map from pint clouds for testing?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-12-26 07:04:00 -0600

AHornung gravatar image

It seems that you remapped your topics in the wrong order. The last line should be:

 <remap from="cloud_in" to="/assembled_cloud" />

(assuming that the topic name of your assembled cloud is "assembled_cloud" in a global namespace, otherwise change it accordingly).

This will work as long as your robot does not move, i.e., it builds a local map with the laser scans in the base_link frame.

edit flag offensive delete link more


Ok, that did the trick ! But now I have the problem of publishing a PointCloud and Octomap wanting a PointCloud2 ;)

madmax gravatar image madmax  ( 2012-12-27 01:27:57 -0600 )edit

You definitely need a PointCloud2 for almost anything nowadays. If laser_assembler doesn't provide that, I would submit a bug report.

AHornung gravatar image AHornung  ( 2012-12-28 00:49:27 -0600 )edit

There may be a converter node somewhere, otherwise there are conversion functions in sensor_msgs:

AHornung gravatar image AHornung  ( 2012-12-28 00:49:55 -0600 )edit

Yes, I added the conversion in the periodic_snapshotter.cpp and now it works.

madmax gravatar image madmax  ( 2012-12-28 04:59:32 -0600 )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: 2012-12-24 04:29:53 -0600

Seen: 3,556 times

Last updated: Dec 26 '12