micro-ROS / micro-ROS/system_modes

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

未关闭
#95 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C++
星标
45
派生
13
PR 合并指标
30 天内没有已合并 PR

描述

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

![image](https://user-images.githubusercontent.com/17764118/201474371-bf0809c6-87e6-4dcf-bd61-ee7dcaec5ab5.png)

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 issue 中的 system-modes YAML 配置开始,并使用针对 /actuation/change_state 的两个 ros2 service 调用复现该行为。跟踪部分模式映射如何应用于 lifecycle nodes。当某个模式只能配置其列出的节点子集,同时保留其他节点的适当状态,并且左侧 manipulator 在所提供的示例中达到 active 状态时,即可视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
robotics
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。