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

How to clear the OccupancyGrid map

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

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:

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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

look into "", there is a sevice called reset, hope it helps!

edit flag offensive delete link more

Question Tools



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

Seen: 627 times

Last updated: May 30 '18