micro-ROS / micro-ROS/system_modes

Problem changing the system modes when there are rules

未關閉
#94 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
C++
星號
45
分支
13
PR 合併指標
30 天內沒有已合併 PR

描述

Hi all

I am trying to use system modes for a system composed of these nodes: {nav2, manipulator, camera, guard}. guard is a special node that detects if the system has been compromised. In this case, all the nodes should be in mode COMPROMISED and camera in the inactive state. The specification is:

# system modes safety benchmark
---

safety:
  ros__parameters:
    type: system
    parts:
      manipulator
      nav2
      camera
      guard
    modes:
      __DEFAULT__:
        manipulator: active.__DEFAULT__
        nav2: active.__DEFAULT__
        camera: active.__DEFAULT__
        guard: active.__DEFAULT__
      COMPROMISED:
        manipulator: active.COMPROMISED
        nav2: active.COMPROMISED
        camera: inactive.COMPROMISED
        guard: active.COMPROMISED
    rules:
      guard_detect_compomise_in_default:
        if_target: active.__DEFAULT__
        if_part: [guard, active.COMPROMISED]
        new_target: active.COMPROMISED
      guard_detect_default_in_compromise:
        if_target: active.COMPROMISED
        if_part: [guard, active.__DEFAULT__]
        new_target: active.__DEFAULT__

manipulator:
  ros__parameters:
    type: node
    modes:
      __DEFAULT__:
        ros__parameters:
          max_torque: 0.5
      COMPROMISED:
        ros__parameters:
          max_torque: 0.1

nav2:
  ros__parameters:
    type: node
    modes:
      __DEFAULT__:
        ros__parameters:
          forbidden_areas: false
      COMPROMISED:
        ros__parameters:
          forbidden_areas: true

guard:
  ros__parameters:
    type: node
    modes:
      __DEFAULT__:
        ros__parameters:
          compromised_system: false
      COMPROMISED:
        ros__parameters:
          compromised_system: true

camera:
  ros__parameters:
    type: node
    modes:
      __DEFAULT__:
        ros__parameters:
          use_sim_time: false
      COMPROMISED:
        ros__parameters:
          use_sim_time: false

If I change the mode of guard, all the system reacts as I want. BUT if I want to command all the system to go from COMPROMISED to __DEFAULT__ I can't do it because guard is COMPROMISED, and that doesn't let the system reconfigure to __DEFAULT__.

Is there any way to combine the bottom-up rules with the possibility of changing the system mode (an up-bottom reconfiguration)?

Thanks!!

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先查看 issue 中描述的系統模式規則和自上而下重新設定行為。確定在 guard 規則仍然生效時,命令是否可以將系統從 COMPROMISED 轉為 DEFAULT;當受支援的行為或其限制已記錄在案並由適當的測試涵蓋時,即視為完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cpp
領域
robotics
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。