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

How can two nodelets in one process publish diagnostics?

asked 2012-02-27 10:18:26 -0500

joq gravatar image

Thomas Moulard and I recently added diagnostic monitoring to the camera1394 driver.

It seems to work, but he discovered that when two instances of the driver nodelet are running in the same process, only one gets its diagnostics published.

I believe this is because information in the /diagnositics topic is prefixed by the node name, which seems to come from the nodelet manager process, not the driver nodelet.

Is there some way to make this work correctly?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-02-27 10:31:57 -0500

Daniel Stonier gravatar image

updated 2012-02-27 10:33:53 -0500

This is not really a solution. I worked around the same issue last week by ensuring that each of my nodelets stored a unique string identifier coming from the name under which it was launched. e.g. "goo_base" in

<node pkg="nodelet" type="nodelet" name="goo_base" args="load goo/GooNodelet robot_core" output="screen">

We pulled that name from the nodehandle and then simple applied that to the name when adding a task to the diagnostic_updater:

this->diagnostic_updater.add("firmware [") + unresolved_name + std::string("]"), this, &GooNodelet::firmwareDiagnostic);

It would be nice if diagnostics pulled that unresolved name directly.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-02-27 10:18:26 -0500

Seen: 477 times

Last updated: Feb 27 '12