-
Notifications
You must be signed in to change notification settings - Fork 21
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
Report rcl/rclc errors #306
base: main
Are you sure you want to change the base?
Conversation
ea328fd
to
4c4d0d3
Compare
I would phrase it slightly more positive: users would lookup alarms raised by MotoROS2 in the troubleshooting documentation already, so this is just one more to look up. It's just that in this case, it's as-if there's an additional sub code (a sub-sub code?), which happens to correspond to the |
Yeah that's a good point |
I was updating the troubleshooting guide to add information for the new error code, but the suggestion here says to include information on user-serviceable errors. I am not sure which errors are user serviceable and which ones are not. For now I just have a link to the types.h file referenced in our most recent build but I know that isn't sufficient. Also, while I agree that the previous approach with the "shadow codes" would require maintenance in case there are changes to Also, unrelated, but I was having trouble figuring out why the alarm linter was upset. Then I figured out that it didn't like me using |
it's true we'd have to keep an eye on it in any case. The hope is we've reduced the amount of maintenance to a minimum by not also introducing a new enum on our side (whose sole purpose is to shadow an already existing enum in the RCL(C) code base).
it looks like it's unhappy because the file it was parsing (ErrorHandling.h) referenced an undefined type before your edit in 59f9582 (this version):
that's because all I've wanted/tried to switch to an IWYU style before, but the MotoPlus SDK VS integration isn't happy if we do that (see #44). |
I think this is ok for the sake of simplicity. |
Fix for #128. RCL(C) API errors get reported to the user now. It just notifies the user that an RCL(C) API error occurred and gives the integer value of the
rcl_ret_t
value associated with that error that the user has to look up themselves.motoRos_RCLAssertOK_withMsg()
checks thatthe rcl_ret_t
value that is passed in is OK, and if it is not, it not only sets an alarm indicating that, but it also sets an alarm indicating where it went wrong, likemotoRos_Assert_withMsg()
does. It's a bit ugly, something like what I described in the last paragraph of this comment may be prettier/do a better job of separating functionality/not duplicating code, but that would increase complexity a bit. It would require either a global "problems" struct, or several local "problems" structs in different files that get passed around that the hypotheticalRaiseAlarms()
function could reference.This is a draft for now because I would like advice on what to do with
motoRos_RCLAssertOK_withMsg()
. I can squash the commits afterwards and rebase on main.