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

2D map with velodyne and octomap_server

asked 2017-05-19 11:51:18 -0500

mmy227 gravatar image

Hi, I have a Velodyne VLP-16 on a robot and I am trying to build a 2D map from the velodyne point clouds using octomap_server. The velodyne point clouds are published on topic velodyne_points. I have odometry from a transform from world -> base_link frames. Since octomap_server requires a transform from sensor data frame to global map frame, I published a static transform from base_link -> velodyne and then remapped the cloud_in topic to velodyne_points as follows:

<node pkg="tf" type="static_transform_publisher" name="velodyne_tf" args="0 0 0 0 0 0 base_link velodyne 100" /> 
<node pkg="octomap_server" type="octomap_server_node" name="octomap_server">
     <param name="resolution" value="0.05" />
     <param name="frame_id" type="string" value="world" />
     <param name="sensor_model/max_range" value="15.0" />
     <param name="occupancy_min_z" value="0.05" />
     <param name="occupancy_max_z" value="0.5" />
     <remap from="cloud_in" to="velodyne_points" />

However, no map is published. When I view the tf tree it is world -> base_link -> velodyne. Any ideas as to why this isn't working?

Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-24 10:29:31 -0500

mmy227 gravatar image

It turns out the time stamps on the velodyne point clouds were off by about 600 seconds from the time stamps on the odometry messages. Subscribing to velodyne_points, changing the time stamps to ros::Time::now(), republishing the clouds on a new topic and using octomap_server with that new topic worked.

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

1 follower


Asked: 2017-05-19 11:51:18 -0500

Seen: 836 times

Last updated: May 24 '17