-
Notifications
You must be signed in to change notification settings - Fork 163
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
Make rcl_lifecycle transition errors more readable #991
Comments
Can I ask what the context of your transition error is? I know there are two methods which return the first message of "No transition matching 3", this is the method |
@CursedRock17 i think @alsora just wants the message like [rcl_lifecycle]: No transition matching "activate" (ID:3) found for current state unconfigured i think that this is label and id map can be referred to but i am not convinced for not major enhancement with breaking API... and it is easy to look it up with https://github.com/ros2/rcl_interfaces/blob/rolling/lifecycle_msgs/msg/Transition.msg#L22 We do not want to move the warning message either for this. |
yes exactly. That error gets printed whenever you attempt an invalid lifecycle transition (for example the node is already active and you try to activate again or the node is active and you try to cleanup, skipping deactivation). Having a nicer log would simplify the identification of the bug. |
Oh I understand, I was thinking that the current state listed was the one being invoked, that makes much more sense.
Since this would be used for identification of bugs, this would be a solid reason to wait, but I see the value in creating messages like how @alsora wants. I agree that we could pass a
Maybe I'm thinking of the incorrect usage of this function still, but this would allow us to avoid breaking API until we want to phase out the old types and prevent us from having to pass a state machine. I guess one caveat is if the user doesn't have both pieces of information, but it could kind of resort back to the old method and only use one if that's the case. |
Feature request
Currently rcl_lifecycle transition errors are printed as follows in a C++ application
It would be very helpful if rather than a number
3
there was the actual name of the transition being invoked, to avoid developers a constant lookup into the message definition (which is not even linked, so this error may seem extremely confusing for not-experienced people)The text was updated successfully, but these errors were encountered: