ros-industrial / ros_canopen

CANopen driver framework for ROS (http://wiki.ros.org/ros_canopen)
GNU Lesser General Public License v3.0
332 stars 270 forks source link

Refine fatal error configuration. #423

Open windelbouwman opened 3 years ago

windelbouwman commented 3 years ago

This refines selection of fatal en non-fatal errors.

There was no way to select BUSOFF as non fatal. My use case would be to select BUSOFF as non fatal and configure the can device with a restart-ms.

mathias-luedtke commented 3 years ago

There was no way to select BUSOFF as non fatal.

It was written this way on purpose ;)

My use case would be to select BUSOFF as non fatal and configure the can device with a restart-ms

Does this really work with this fix? (I did not have a chance to test it)

windelbouwman commented 3 years ago

It was written this way on purpose ;)

Why would the BUS_OFF error be a special case? I think it's fair to treat it as the other errors. What will happen with BUS_OFF, is that the output queue will fill up, and eventually the send asio call will fail / block.

mathias-luedtke commented 3 years ago

What will happen with BUS_OFF, is that the output queue will fill up, and eventually the send asio call will fail / block.

In our usecase, the output queue will fill up immediately and then the kernel driver would close the socket..

Why would the BUS_OFF error be a special case? I think it's fair to treat it as the other errors

Agreed. Again, I did not test this special case.