ros-industrial / ros_canopen

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

Add functions to disable specific error types in SocketCANInterface #302

Closed redkite closed 4 years ago

redkite commented 5 years ago

Similar to #264, but so far limited to the SocketCANInterface only.

Saves the state of the CAN error mask within the object and provides two functions to disable lost arbitration and controller problems. These two have been added explicitly in order to not disable other errors by accident. A private function within SocketCANInterface still provides an internal, generic interface.

Could also be added to the socketcan bridge. I cannot test it though, because we are using the SocketCANInterface only.

redkite commented 5 years ago

Sorry for the late reply, I was busy during the last week. I will have a look at possibilities to implement the changes and come back to you this week.

redkite commented 5 years ago

@ipa-mdl Is this more along the lines what you would expect? One could then inherit from SocketCANInterface and replace the error handler.

I am still not entirely sure, if the error mask should be hidden in the init function. If I would like to add CAN_ERR_BUSERROR as a handled error, I still would have to replace the complete init function. Could you imagine merging a PR whith a virtual function genErrorMask() to work around such issues, or do you deem this completely unnecessary?

redkite commented 5 years ago

@ipa-mdl Do you have any feedback on these changes?

redkite commented 4 years ago

Closing this, no PR response for a year.

Timple commented 4 years ago

Still a valid PR. I think the discussion is meanly happening here: https://github.com/ros-industrial/ros_canopen/pull/264

But so far it the conversation seems to come to halt every time :(. Feel free to chip in there!