micro-ROS / micro-ROS/system_modes
[FEA] Allow configuring a subset of nodes in a certain mode.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 45
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Hi, first of all I want to say this is a great project to manage lifecycle nodes!
There'a a need to config the lifecycle state of only a subset of nodes in one mode, but config another subset of nodes in other modes.
Let's say, can the following config work? (Currently I don't need the extra parameter-based modes either)
#### SHM file
```yaml
# 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
```
EDIT, the step of reproduce has been updated @ralph-lange
#### step to reproduce
```sh
time ros2 service call /actuation/change_state lifecycle_msgs/ChangeState "{transition: {id: 1, label: configure}}"
time ros2 service call /actuation/change_state lifecycle_msgs/ChangeState "{transition: {id: 3, label: activate}}"
```
#### expected
the lefe manipulator should be in active
#### actual

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.
Research direction
Start with the YAML system-modes configuration in the issue and reproduce the behavior using the two ros2 service calls for /actuation/change_state. Trace how partial mode mappings are applied to lifecycle nodes. Done means a mode can configure only its listed node subset while preserving the other nodes' appropriate states, with the left manipulator reaching active in the provided example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- robotics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100