Skip to content
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

[FEA] Allow configuring a subset of nodes in a certain mode. #95

Open
ZhenshengLee opened this issue Oct 26, 2022 · 2 comments
Open

[FEA] Allow configuring a subset of nodes in a certain mode. #95

ZhenshengLee opened this issue Oct 26, 2022 · 2 comments

Comments

@ZhenshengLee
Copy link

ZhenshengLee commented Oct 26, 2022

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

# 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

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

image

@ZhenshengLee ZhenshengLee changed the title [FEA] Only config subset of nodes in a certain mode. [FEA] Only config a subset of nodes in a certain mode. Oct 26, 2022
@ZhenshengLee ZhenshengLee changed the title [FEA] Only config a subset of nodes in a certain mode. [FEA] Allow configuring a subset of nodes in a certain mode. Oct 27, 2022
@ralph-lange
Copy link
Contributor

I assume this issue is superseded by #96, or?

@ZhenshengLee
Copy link
Author

ZhenshengLee commented Nov 4, 2022

@ralph-lange thank you again!

I assume this issue is superseded by #96, or?

No, this case is different with #96

In #96 , the bug/fea is about changing mode state to set one of nodes to inactive.

In this issue, the bug/fea is about changing mode state to set only one node to other state, and leave other nodes not changing their state(remain the same)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants