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

How to clear the OccupancyGrid map

asked 2018-05-30 22:13:02 -0500

DanielTANG gravatar image

Hi, I am using rviz to show real time OccupancyGrid map that is converted through pointcloud. The pointcloud is generated by current frame,but OccupancyGrid maps are constantly produced. Now, I just need to show OccupancyGrid of two consecutive frames.Therefore,other OccupancyGrid of outdated frames need to be cleared,otherwise the OccupancyGrid is getting bigger and bigger

This is my launch file:

<launch>
  <node pkg="octomap_server" type="octomap_server_node" name="octomap_server">

    <!-- resolution in meters per pixel -->
    <param name="resolution" value="0.1" />

    <!-- name of the fixed frame, needs to be "/map" for SLAM -->
    <param name="frame_id" type="string" value="/sensor_frame" />

    <!-- max range / depth resolution of the kinect in meter -->
    <param name="sensor_model/max_range" value="50.0" />
    <param name="latch" value="false" />

    <!-- max/min height for occupancy map, should be in meters -->
    <param name="pointcloud_max_z" value="1000" />
    <param name="pointcloud_min_z" value="0" />

    <!-- topic from where pointcloud2 messages are subscribed -->
    <remap from="cloud_in" to="/cloud" />

  </node>
</launch>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-07-29 22:23:07 -0500

look into "http://wiki.ros.org/octomap_server", there is a sevice called reset, hope it helps!

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-05-30 22:09:36 -0500

Seen: 645 times

Last updated: May 30 '18