ros2clifecycle_set and ros2service_call_change_state in lifecycle management is too slow.
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start by reproducing the reported ros2 lifecycle set and ros2 service call /drive_base/change_state timings with the linked simple lifecycle node. Trace the lifecycle and service-call CLI entry points to determine where the wait occurs; done means identifying and addressing the delay while preserving successful transition behavior.
Written by the indexing model from the issue text.
Description
Bug report
Required Info:
- Operating System:
- ubuntu22.04
- Installation type:
- binary
- Version or commit hash:
- Humble
- DDS implementation:
- rmw_fastrtps_cpp
- Client library (if applicable):
- ros2cli
Steps to reproduce issue
the simple lifecycle node can be seen in https://github.com/micro-ROS/system_modes/tree/master/system_modes_examples
time ros2 lifecycle set /drive_base activate
Transitioning successful
real 0m2.030s
user 0m0.334s
sys 0m0.113s
time ros2 lifecycle set /drive_base deactivate
Transitioning successful
real 0m2.089s
user 0m0.419s
sys 0m0.083s
time ros2 service call /drive_base/change_state lifecycle_msgs/ChangeState "{transition: {id: 3, label: activate}}"
waiting for service to become available...
requester: making request: lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=3, label='activate'))
response:
lifecycle_msgs.srv.ChangeState_Response(success=True)
real 0m2.128s
user 0m0.379s
sys 0m0.082s
time ros2 service call /drive_base/change_state lifecycle_msgs/ChangeState "{transition: {id: 4, label: deactivate}}"
waiting for service to become available...
requester: making request: lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=4, label='deactivate'))
response:
lifecycle_msgs.srv.ChangeState_Response(success=True)
real 0m2.776s
user 0m0.343s
sys 0m0.096s
Additional information
repeated test of the same cmd can make it quicker, see the complete test log below
zs@zs-vm-2204:~/zs_ws/ga_ros$ time ros2 service call /drive_base/change_state lifecycle_msgs/ChangeState "{transition: {id: 3, label: activate}}"
waiting for service to become available...
requester: making request: lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=3, label='activate'))
response:
lifecycle_msgs.srv.ChangeState_Response(success=True)
real 0m2.128s
user 0m0.379s
sys 0m0.082s
zs@zs-vm-2204:~/zs_ws/ga_ros$ time ros2 service call /drive_base/change_state lifecycle_msgs/ChangeState "{transition: {id: 3, label: activate}}"
waiting for service to become available...
requester: making request: lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=3, label='activate'))
response:
lifecycle_msgs.srv.ChangeState_Response(success=False)
real 0m1.231s
user 0m0.536s
sys 0m0.117s
zs@zs-vm-2204:~/zs_ws/ga_ros$ time ros2 service call /drive_base/change_state lifecycle_msgs/ChangeState "{transition: {id: 4, label: deactivate}}"
waiting for service to become available...
requester: making request: lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=4, label='deactivate'))
response:
lifecycle_msgs.srv.ChangeState_Response(success=True)
real 0m2.776s
user 0m0.343s
sys 0m0.096s
zs@zs-vm-2204:~/zs_ws/ga_ros$ time ros2 service call /drive_base/change_state lifecycle_msgs/ChangeState "{transition: {id: 3, label: activate}}"
waiting for service to become available...
requester: making request: lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=3, label='activate'))
response:
lifecycle_msgs.srv.ChangeState_Response(success=True)
real 0m1.017s
user 0m0.354s
sys 0m0.075s
zs@zs-vm-2204:~/zs_ws/ga_ros$ time ros2 service call /drive_base/change_state lifecycle_msgs/ChangeState "{transition: {id: 4, label: deactivate}}"
waiting for service to become available...
requester: making request: lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=4, label='deactivate'))
response:
lifecycle_msgs.srv.ChangeState_Response(success=True)
real 0m2.737s
user 0m0.560s
sys 0m0.113s
zs@zs-vm-2204:~/zs_ws/ga_ros$ time ros2 service call /drive_base/change_state lifecycle_msgs/ChangeState "{transition: {id: 3, label: activate}}"
waiting for service to become available...
requester: making request: lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=3, label='activate'))
response:
lifecycle_msgs.srv.ChangeState_Response(success=True)
real 0m3.112s
user 0m0.370s
sys 0m0.076s
zs@zs-vm-2204:~/zs_ws/ga_ros$
Thanks.
- Dominant language
- Python
- Stars
- 274
- Forks
- 246
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ros2/ros2cli
-
ros2 CLI prints BrokenPipeError traceback when output is piped to a command that exits early (e.g. head)May be free again @akshat-lakhera claimed this 38 days ago, and no pull request is open. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
ros2/ros2cli#1342 · 2 comments ·
Maintainers usually reply within 1 day
-
Add --timeout alias to ros2 topic pub and ros2 param listPossibly taken @1cbyc claimed this 63 days ago. Opengood first issue
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
ros2/ros2cli#1305 · 2 comments ·
Maintainers usually reply within 1 day
-
ros2doctor: UserWarning: Fail to call PackageReport/RosdistroReport class functions.Possibly taken @sujanchalla0510 claimed this 13 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 20/100
Maintainers usually reply within 1 day
-
Add --all alias to commands that include hidden nodes, topics, or servicesPossibly taken @Rajat-Arora claimed this 62 days ago. Opengood first issue
Difficulty 3/5 1-2 days Newbie friendliness 78/100
ros2/ros2cli#1302 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
ros2run python script without extension .py fails on windows + pixiMay be free again A pull request for this issue was closed without being merged. Openbug more-information-needed
Difficulty 3/5 1-2 days Newbie friendliness 68/100
ros2/ros2cli#1301 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
hive size:simple
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
backend enhancement priority:P3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
geolens-io/geolens#4161 ·
Maintainers usually reply within 1 day