ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Laser scan to point cloud to octomap - strange result

asked 2013-02-12 05:23:37 -0600

madmax gravatar image

updated 2013-02-13 02:12:21 -0600

AHornung gravatar image


I have a laser scanner mounted on an arm. With laser_pipeline and pcl_assembler, I build a point cloud and pass it to the octomap_server. The pcl_assembler runs every 3 seconds.

My problem is, in simulation and Gazebo all works fine.
But on the real system, the octomap is completely wrong.

What could be the problem here, or is there anything that works better?

Made 2 screenshots, first is just the laser scans, looks great. TF should also be ok. The 2nd one is the assembled_cloud.
The 3rd one is the octomap.

Laser scans image description octomap

<?xml version="1.0"?>

<include file="$(find powerball_peak_start)/launch/powerball.launch" />

<!--<include file="$(find powerball_vscom_start)/launch/powerball.launch" />-->

<!-- Laser Scanner -->
<node ns="LMS100" name="lms100" pkg="LMS1xx" type="LMS100" > 

    <param name="host" value=""/>
    <param name="frame_id" value="/laser_link"/>


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

<!-- Point cloud publisher -->
<node name="periodic_snapshotter" pkg="pcl_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" />

    <param name="frame_id" type="string" value="base_link" />

    <param name="max_sensor_range" value="20.0" />

    <param name="latch" value="false" />
    <remap from="cloud_in" to="assembled_cloud" />


<!-- Rviz -->
<node name="rviz" pkg="rviz" type="rviz" respawn="false" output="screen" />
edit retag flag offensive close merge delete


Which version of octomap_server is that, and which ROS distribution?

AHornung gravatar image AHornung  ( 2013-02-12 05:27:40 -0600 )edit

Also: What does the assembled PointCloud2 look like in the fixed frame "base_link"?

AHornung gravatar image AHornung  ( 2013-02-12 09:01:01 -0600 )edit

I am on fuerte and the octomap version is 1.4.3-0precise. Added a l of the PointCloud2.

madmax gravatar image madmax  ( 2013-02-12 20:41:01 -0600 )edit

What is the version of octomap_mapping (ros-fuerte-octomap-mapping)? I ask since there was a bug that could have caused this, but that got fixed some time ago. The current version should be 0.4.5 or 0.4.6.

AHornung gravatar image AHornung  ( 2013-02-12 21:15:10 -0600 )edit

octomap_point_cloud_centers will essentially show the same as the MarkerArray, without the spatial extents. What would help would be to see assembled_cloud in the base_link frame, since that is what gets inserted into the octomap.

AHornung gravatar image AHornung  ( 2013-02-12 21:16:59 -0600 )edit

Ok, I think the problem is the assembled_cloud. It doesn't look like a Point Cloud, it's just 3D data mapped to 2D data. But why is this working in simulation?

madmax gravatar image madmax  ( 2013-02-13 02:05:55 -0600 )edit

@AHornung, so, how do I improve the result of the octomap?

Gazer gravatar image Gazer  ( 2013-07-10 14:31:57 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-02-13 04:54:49 -0600

madmax gravatar image

Stupid mistake by me:

fixed_frame in the laser pipeline was laser_link and should be base_link.

edit flag offensive delete link more

answered 2015-05-29 21:55:20 -0600

blueskyhanh gravatar image

i 'm new member,could you help me step by step to make 3D mapping by laser ? my mail: thanks!!

edit flag offensive delete link more

Question Tools



Asked: 2013-02-12 05:23:37 -0600

Seen: 2,679 times

Last updated: Feb 13 '13