Ask Your Question
1

diagnostics during hardware failure

asked 2011-12-02 05:11:45 -0600

Aditya gravatar image

I am trying to find out best practice for using ROS diagnostics in hardware drivers. For example, say I am writing a driver to communicate with a device over serial port. When device node is launched, assume that the serial port could not be opened. In such a case, should the device node keep running with diagnostics updates or should it end the process? I would choose diagnostics updates over abort. Any comments are appreciated!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-12-02 06:14:55 -0600

DimitriProsser gravatar image

I'd assume that it's really different for every system. It will come down to how you want to handle it. I know that on our project, when a hardware device cannot be connected, we have set up a "watchdog" process that monitors the status of the hardware devices and restarts any device that's malfunctioning.

edit flag offensive delete link more
2

answered 2011-12-05 13:37:17 -0600

joq gravatar image

I use a similar approach to @DimitriProsser, while gradually evolving my drivers to publish driver_base style states. When a device open fails, the driver publishes a CLOSED state, but continues to (slowly) poll the device in case it starts working. When successful, the state changes to OPENED or RUNNING, as appropriate. That allows other nodes to provide useful fall-back behavior in some situations.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-12-02 05:11:45 -0600

Seen: 252 times

Last updated: Dec 05 '11