micro-ROS / micro-ROS/system_modes
[FEA] Allow deactivating nodes when system is activated.
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- C++
- Estrelas
- 45
- Forks
- 13
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
There is a need to selectively disable the function of a node, that's say deactivating a node in a certain system mode.
Should the following config work? Thanks!
#### 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
```
#### step to reproduce
```sh
zs@zs-vm-2204:~/zs_ws/ga_ros$ ros2 service call /actuation/change_state lifecycle_msgs/ChangeState "{transition: {id: 1, label: configure}}"
waiting for service to become available...
requester: making request: lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=1, label='configure'))
response:
lifecycle_msgs.srv.ChangeState_Response(success=True)
```
after this ,all nodes become OK
```sh
zs@zs-vm-2204:~/zs_ws/ga_ros$ ros2 service call /actuation/change_state lifecycle_msgs/ChangeState "{transition: {id: 3, label: activate}}"
requester: making request: lifecycle_msgs.srv.ChangeState_Request(transition=lifecycle_msgs.msg.Transition(id=3, label='activate'))
response:
lifecycle_msgs.srv.ChangeState_Response(success=True)
```
after this , every thing OK
```sh
zs@zs-vm-2204:~/zs_ws/ga_ros$ time ros2 service call /actuation/change_mode system_modes_msgs/ChangeMode "{mode_name: 'LEFT'}"
waiting for service to become available...
requester: making request: system_modes_msgs.srv.ChangeMode_Request(mode_name='LEFT')
```
after this, the mode_manager died with a segfault.

EDIT: @ralph-lange
the step of reproduce is updated in 2022-11-12.
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece pela configuração YAML do SHM e reproduza o problema usando as chamadas de serviço Lifecycle e /actuation/change_mode listadas. Inspecione o comportamento de mode_manager ao alternar para LEFT, especialmente as entradas de desativação dos nós; considera-se concluído quando a mudança de modo é concluída sem um segfault e os nós selecionados estão inativos conforme configurado.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- cpp
- Domínio
- robotics
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100