rosin-project / rosgraph_monitor

Monitors the status of nodes and topics currently running
Apache License 2.0
1 stars 2 forks source link

Global params #6

Closed hsd-dev closed 4 years ago

hsd-dev commented 4 years ago

Added support for global parameters

For the record, the output of the .rossystem file

['f2_v3_r3', ['move_base', ['controller_frequency', 'move_base.move_base.move_base.controller_frequency', 20.0], ['max_vel_x', 'move_base.move_base.move_base.max_vel_x', 0.75], ['inflation_radius', 'move_base.move_base.move_base.inflation_radius', 0.6]], ['qa_safety', 'Double', 0.0], ['qa_energy', 'Double', 0.0]]
- global_parameters: [['qa_safety', 'Double', 0.0], ['qa_energy', 'Double', 0.0]]
  [0]:
    ['qa_safety', 'Double', 0.0]
    - value_type: ['Double']
    - param_name: ['qa_safety']
    - param_value: [0.0]
  [1]:
    ['qa_energy', 'Double', 0.0]
    - value_type: ['Double']
    - param_name: ['qa_energy']
    - param_value: [0.0]
- interfaces: [['move_base', ['controller_frequency', 'move_base.move_base.move_base.controller_frequency', 20.0], ['max_vel_x', 'move_base.move_base.move_base.max_vel_x', 0.75], ['inflation_radius', 'move_base.move_base.move_base.inflation_radius', 0.6]]]
  [0]:
    ['move_base', ['controller_frequency', 'move_base.move_base.move_base.controller_frequency', 20.0], ['max_vel_x', 'move_base.move_base.move_base.max_vel_x', 0.75], ['inflation_radius', 'move_base.move_base.move_base.inflation_radius', 0.6]]
    - interface_name: ['move_base']
    - parameters: [['controller_frequency', 'move_base.move_base.move_base.controller_frequency', 20.0], ['max_vel_x', 'move_base.move_base.move_base.max_vel_x', 0.75], ['inflation_radius', 'move_base.move_base.move_base.inflation_radius', 0.6]]
      [0]:
        ['controller_frequency', 'move_base.move_base.move_base.controller_frequency', 20.0]
        - param_name: ['controller_frequency']
        - param_path: ['move_base.move_base.move_base.controller_frequency']
        - param_value: [20.0]
      [1]:
        ['max_vel_x', 'move_base.move_base.move_base.max_vel_x', 0.75]
        - param_name: ['max_vel_x']
        - param_path: ['move_base.move_base.move_base.max_vel_x']
        - param_value: [0.75]
      [2]:
        ['inflation_radius', 'move_base.move_base.move_base.inflation_radius', 0.6]
        - param_name: ['inflation_radius']
        - param_path: ['move_base.move_base.move_base.inflation_radius']
        - param_value: [0.6]
- system_name: ['f2_v3_r3']
hsd-dev commented 4 years ago

@ipa-nhg please check the sequence: https://github.com/rosin-project/rosgraph_monitor/blob/d0204e069d40716041991f365168379b9cf02e96/src/rosgraph_monitor/parser.py#L179-L181

ipa-nhg commented 4 years ago

The sequence is right, see: https://github.com/ipa320/ros-model/blob/master/plugins/de.fraunhofer.ipa.rossystem.xtext/src/de/fraunhofer/ipa/rossystem/RosSystem.xtext#L11-L23

I started locally the rograph_observer and everything looks find, however with that observer at runtime I don't think we can detect errors (not sure if you have already implemented that part) but it can't work because from the ros_graph_parser we get all the parameters within the fictitious node "parameter_server"

hsd-dev commented 4 years ago

Currently I have modified just the parser, not the error detection for global parameters.