Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to ignore error frames #362

Conversation

mathias-luedtke
Copy link
Member

@mathias-luedtke mathias-luedtke commented Oct 23, 2019

Alternative to #264 with proper interface definition
Parameter parsing is not implemented yet.

ToDo:

  • implement parameter parsing for ROS packages
  • supppress CAN_ERR_LOSTARB by default
  • test, test, test

@mathias-luedtke mathias-luedtke force-pushed the ignore-error-frames branch 4 times, most recently from d2433ba to c047a2e Compare July 7, 2020 14:10
@mathias-luedtke mathias-luedtke marked this pull request as ready for review July 7, 2020 22:01
@mathias-luedtke
Copy link
Member Author

@yanick-douven, @Timple: I have refactored this now, please give it a try.

It features an element-wise mask setting (like #388), but for the entries of the mask, not to ignore them.

CAN_ERR_LOSTARB is part of the default error mask (gets reported to ROS), but it is not fatal anymore.
The behavior can be changed by setting error_mask/CAN_ERR_LOSTARB to false or fatal_error_mask/CAN_ERR_LOSTARB to true.
Either from ROS or in a SettingsMap.

@Timple
Copy link

Timple commented Jul 9, 2020

Code looks good. It's good to have the option tot ignore, inform and error.

From a code perspective it's approved. We will have an opportunity to test this friday.

@MCFurry
Copy link

MCFurry commented Jul 9, 2020

Thanks for the effort @ipa-mdl
Indeed codewise looks good, we'll try to verify tomorrow on our hardware!

@Timple
Copy link

Timple commented Jul 10, 2020

Running the code with default settings we noticed a lot of errors:

[W 0:29:07:407] Received frame is error: 20000002#0f00000000000000
[W 0:29:07:615] Received frame is error: 20000002#1100000000000000
[W 0:29:07:633] Received frame is error: 20000002#0900000000000000

We know now that these are arbitration errors because of the 2 before the #. But the error description could be more clear I guess.

@mathias-luedtke
Copy link
Member Author

We know now that these are arbitration errors because of the 2 before the #. But the error description could be more clear I guess.

This is how socketcan_bridge reports error frames.
Which output would you like to get?

In general I do not recommend socketcan_bridge for production anyway..

@Timple
Copy link

Timple commented Jul 11, 2020

Which output would you like to get?

The outcomes of this function seem quite readable. But this is a nice to have, not blocking.

In general I do not recommend socketcan_bridge for production anyway..

In the prototype phase it is very convenient to have all canbus messages in the bagfiles instead of setting up a seperate can logging system :)

@mathias-luedtke
Copy link
Member Author

@ipa-hsd: Do you have time to test this PR with the robot in our lab?

@hsd-dev
Copy link
Contributor

hsd-dev commented Jul 16, 2020

@ipa-mdl I could do this next week.

@mathias-luedtke
Copy link
Member Author

@ipa-hsd: That's fine! Just check if the robot still moves properly :)

@Timple
Copy link

Timple commented Jul 27, 2020

plan is to have a solution ready (merged..) until World ROS-Industrial day (July 7) :)

We came a long way, so a subtle ping to not let this fall asleep...

@hsd-dev
Copy link
Contributor

hsd-dev commented Jul 28, 2020

I tried out the PR today with pilz robot with:

roslaunch prbt_moveit_config moveit_planning_execution.launch sim:=false pipeline:=ompl

It "works". But I get the following error message (it is the case even on melodic-devel branch of ros_canopen though):

[ERROR] [1595944295.136523793]: EMCY received: 83#0000000000000000
[ERROR] [1595944295.140129373]: EMCY received: 84#0000000000000000
[ERROR] [1595944295.143812940]: EMCY received: 85#0000000000000000
[ERROR] [1595944295.148101649]: EMCY received: 86#0000000000000000
[ERROR] [1595944295.151605465]: EMCY received: 87#0000000000000000
[ERROR] [1595944295.155340520]: EMCY received: 88#0000000000000000

@jschleicher
Copy link

@ipa-hsd Those aren't errors (all zeros) - the message is an Error (was stdout) since #286.

@mathias-luedtke
Copy link
Member Author

@ipa-hsd: Thanks!

As already pointed out, these "errors" can be ignored (tracked in new issue #396)

@mathias-luedtke mathias-luedtke merged commit dc3e3c9 into ros-industrial:melodic-devel Jul 28, 2020
@mathias-luedtke mathias-luedtke deleted the ignore-error-frames branch July 28, 2020 14:57
@Timple
Copy link

Timple commented Jul 28, 2020

Great! I'll make sure we test the debian release as well before the sync

@mathias-luedtke
Copy link
Member Author

I pushed a new release: ros/rosdistro#26275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants