Search code examples
ros

Force ros diagnostic_updater to publish on other topics


I am using the ros diagnostic_updater class (http://wiki.ros.org/diagnostic_updater) to publish diagnostic messages and found that it publishes to /diagnostics by default. Is there any way to force it to publish to another topic instead?


Solution

  • As with any ROS node you can make use of a the remap tag in a roslaunch file. For example this will remap the topic to /some_new_topic:

    <launch>
      <node pkg="diagnostic_updater" type="diagnostic_updater" name="diagnostic_updater" output="screen">
        <remap from="diagnostics" to="/some_new_topic" />
      </node>
    </launch>