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

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" />
</node>

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
1

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

Question Tools

1 follower

Stats

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

Seen: 900 times

Last updated: May 24 '17