[FEA] Allow deactivating nodes when system is activated.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the SHM YAML configuration and reproduce the issue using the listed lifecycle and /actuation/change_mode service calls. Inspect the mode_manager behavior when switching to LEFT, especially the node deactivation entries; done means the mode change completes without a segfault and the selected nodes are inactive as configured.
Written by the indexing model from the issue text.
Description
There is a need to selectively disable the function of a node, that's say deactivating a node in a certain system mode.
Should the following config work? Thanks!
SHM file
---
# system modes example
---
actuation:
ros__parameters:
type: system
parts:
drive_base
left/manipulator
right/manipulator
modes:
__DEFAULT__:
drive_base: active.__DEFAULT__
left/manipulator: inactive.__DEFAULT__
right/manipulator: inactive.__DEFAULT__
LEFT:
# drive_base: active.__DEFAULT__
left/manipulator: active.__DEFAULT__
right/manipulsator: inactive.__DEFAULT__
RIGHT:
# drive_base: active.__DEFAULT__
left/manipulator: inactive.__DEFAULT__
right/manipulator: active.__DEFAULT__
left/manipulator:
ros__parameters:
type: node
modes:
__DEFAULT__:
ros__parameters:
max_torque: 0.1
drive_base:
ros__parameters:
type: node
modes:
__DEFAULT__:
ros__parameters:
max_speed: 0.1
controller: PID
right/manipulator:
ros__parameters:
type: node
modes:
__DEFAULT__:
ros__parameters:
max_torque: 0.11
step to reproduce
zs@zs-vm-2204:~/zs_ws/ga_ros$ ros2 service call /actuation/change_state lifecycle_msgs/ChangeState "{transition: {id: 1, label: configure}}"
waiting for service to become available...
requester: making request: lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=1, label='configure'))
response:
lifecycle_msgs.srv.ChangeState_Response(success=True)
after this ,all nodes become OK
zs@zs-vm-2204:~/zs_ws/ga_ros$ ros2 service call /actuation/change_state lifecycle_msgs/ChangeState "{transition: {id: 3, label: activate}}"
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)
after this , every thing OK
zs@zs-vm-2204:~/zs_ws/ga_ros$ time ros2 service call /actuation/change_mode system_modes_msgs/ChangeMode "{mode_name: 'LEFT'}"
waiting for service to become available...
requester: making request: system_modes_msgs.srv.ChangeMode_Request(mode_name='LEFT')
after this, the mode_manager died with a segfault.

EDIT: @ralph-lange
the step of reproduce is updated in 2022-11-12.
- Dominant language
- C++
- Stars
- 45
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Contributor 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 micro-ROS/system_modes
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
micro-ROS/system_modes#101 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
micro-ROS/system_modes#99 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
micro-ROS/system_modes#98 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
micro-ROS/system_modes#97 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
micro-ROS/system_modes#95 · 2 comments ·
All issues in micro-ROS/system_modes
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
QuantStack/git2cpp#187 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100