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

voxel_grid visualization in rviz

asked 2012-02-10 03:48:06 -0500

jrcapriles gravatar image

updated 2014-01-28 17:11:19 -0500

ngrennan gravatar image

Hi all!

I'm working with the navigation stacks, I made a costmap_2d/VoxelGrid with all my sensor data in it and I use this to navigate through the environment. I can see the laser and all my sensor in rviz but it would be nice to just visualize my costamp (VoxelGrid data type) instead of all the sensor separately. Is it possible to visualize the costamp_2d in rviz?? of is there any plug-in to convert my costmap in a data type that rviz can plot??

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
8

answered 2012-02-13 02:11:12 -0500

joq gravatar image

I have not used it lately, but the costmap_2d_cloud utility included in the costmap_2d package can publish your grid contents as sensor_msgs::PointCloud.

edit flag offensive delete link more
8

answered 2014-09-04 12:37:26 -0500

Daniel Stonier gravatar image

updated 2014-09-04 12:37:52 -0500

For reference, put it alongside rviz in a launcher like this:

<launch>
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find gopher)/rviz/view_navigation.rviz">
    <remap from="initialpose" to="/initialpose"/>
  </node>
  <node name="voxel_grid_2_point_cloud" pkg="costmap_2d" type="costmap_2d_cloud">
    <remap from="voxel_grid" to="/move_base/local_costmap/obstacle_layer/voxel_grid"/>
    <remap from="voxel_marked_cloud" to="/move_base/local_costmap/obstacle_layer/marked_cloud"/>
    <remap from="voxel_unknown_cloud" to="/move_base/local_costmap/obstacle_layer/unknown_cloud"/>
  </node>
</launch>

Voxel clouds are of 'PointCloud' type (not PointCloud2).

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-02-10 03:48:06 -0500

Seen: 3,404 times

Last updated: Sep 04 '14