micro-ROS / micro-ROS/system_modes

Problem changing the system modes when there are rules

Open
#94 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
45
Forks
13
PR merge metrics
No merged PRs in 30d

Description

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!!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the system-mode rules and the top-down reconfiguration behavior described in the issue. Determine whether a command can move the system from COMPROMISED to __DEFAULT__ while the guard rule still applies; done means the supported behavior or its limitation is documented and covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
robotics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.