Search code examples
c++rospoint-clouds

Nothing to publish, octree is empty


I am a publishing a PointCloud (Type: sensor_msgs/PointCloud2) in topic pc_pub. I have remapped "cloud_in" topic to the according pointcloud topic and the fixed frame in the launch file corresponds to the fixed frame in rviz (map) . Running ran "rostopic echo pc_pub" verifies that the pointcloud is indeed being published to this topic and octomap_server is Subscribing into the topic too. However, "Nothing to publish, octree is empty" appears. What could the problem be?

<!-- fixed map frame (set to 'map' if SLAM or localization running!) -->
<param name="frame_id" type="string" value="map" />

<!-- maximum range to integrate (speedup!) -->
<param name="sensor_model/max_range" value="100.0" />

<!-- data source to integrate (PointCloud2) -->
<remap from="cloud_in" to="/pc_pub" />


Solution

  • If error message is only showing up at the startup and program continues to work properly afterwards, there is nothing to worry about. Most likely first pointcloud message is not arriving early enough at the startup, since it is not a lightweight message type.
    However, if your ros/gazebo crashes after the error message, your setup needs to be examined further to find the cause.

    About "Fixed Frame [map] does not exist" message, error message is saying that there is not a frame called "map". Check which of your custom nodes or built-in packages supposed to publish map frame. Also, you can view tf frames as shown here: wiki.ros.org/tf2_tools.