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

react on diagnostics (eg shutdown on low battery)

asked 2012-04-26 05:37:41 -0600

felix k gravatar image

I saw the diagnostics stack, but is there a package that actually reacts on those diagnostic messages in terms of issuing a given message or shell command?

I'd like to shutdown the robot PC if the battery goes low (which the OS isn't aware of), and thought using diagnostics would be the right way.

Is there a prepared solution to that, or do I have to write a special node?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
6

answered 2012-04-26 14:07:27 -0600

mjcarroll gravatar image

What I do on my project is have a backing message format (just a few strings and integers) to represent system state for things like power and temperature.

I then have a separate node that bridges these messages into the diagnostics message format, so that I can get a human readable log of robot diagnostics.

To make decisions based on battery capacity or state, I can use the backing message.

edit flag offensive delete link more
1

answered 2012-04-26 09:15:17 -0600

joq gravatar image

updated 2012-05-10 03:54:36 -0600

You can use the diagnostic_aggregator with the robot_monitor to display that and other diagnostic information in a human-readable format. For hardware status monitoring, those packages are quite good.

The ROS diagnostic tools are for human notification (see: REP-0107). Automatically shutting things down should probably be handled differently.

edit flag offensive delete link more

Comments

why use a separate channel? Why not create a not that would listen to the diagnostic messages, filter them based on their data, and take action when appropriate? I've read before that it's not recommended (maybe from you) but I can't see why. Could you elaborate?

brice rebsamen gravatar image brice rebsamen  ( 2012-05-09 22:29:36 -0600 )edit

I was merely paraphrasing the REP-0107 recommendation. The link to that document provides more details, with reasons.

joq gravatar image joq  ( 2012-05-10 03:59:53 -0600 )edit

When operating a robot being aware that all the parts are running correctly is important. [REP] That's difficult when it gets to autonomous robots. Maybe the core problem is that the diagnostics uses weakly typed information [REP] that needs complex parsing no one really wants to do.

felix k gravatar image felix k  ( 2012-05-15 04:02:44 -0600 )edit

The parsing could be skipped, though, when reacting solely on the level flag..

felix k gravatar image felix k  ( 2012-05-15 04:05:45 -0600 )edit

Question Tools

Stats

Asked: 2012-04-26 05:37:41 -0600

Seen: 525 times

Last updated: May 10 '12