ros2 / ros2cli

ROS 2 command line interface tools
Apache License 2.0
173 stars 159 forks source link

[ros2lifecycle] Hangs on get_transitions if target service never becomes available #853

Closed oysstu closed 11 months ago

oysstu commented 11 months ago

https://github.com/ros2/ros2cli/blob/2a2534277e993639e4b2f81098057dc908511d37/ros2lifecycle/ros2lifecycle/api/__init__.py#L100-L111

Not sure about the exact conditions in the underlying middleware that led to the service not becoming available. It resolved itself after terminating and restarting. For some reason the service never became available, leading to ros2lifecycle hanging on setting the state.

Is this the expected behavior, or should the CLI exit after some time?

fujitatomoya commented 11 months ago

This is the current implementation behavior. if the lifecycle node is online, then ros2lifecycle tries to wait for the service to be online, and once that is available, it requests the available transition state to the server and waits forever until it can gets all expected number of results.

oysstu commented 11 months ago

I see, expected behavior then. I will close this issue 👍