ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I found my own solution.
When defining a publisher, if you're trying to publish to the top level you must add a '/' to the front of the path. For example;
nh.advertise<diagnostic_msgs::DiagnosticArray>("/diagnostics", 10);
publishes to the topic;
/diagnostics
While
nh.advertise<diagnostic_msgs::DiagnosticArray>("diagnostics", 10);
publishes to the
node_name/diagnostics