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

Revision history [back]

You have a mistake

ros :: Publisher octomap_pub = n.advertise <octomap_msgs ::="" octomap=""> ("octomap_loaded", 1);

When you publish, it must have the same name as the publisher

pub_octomap.publish (octomap);

In this case you use different name: octomap_pub and pub_octomap

Fix

octomap_pub.publish (octomap);