Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify metacontroller about the Laser error #8

Open
chcorbato opened this issue Oct 20, 2020 · 11 comments
Open

Notify metacontroller about the Laser error #8

chcorbato opened this issue Oct 20, 2020 · 11 comments
Assignees

Comments

@chcorbato
Copy link
Member

chcorbato commented Oct 20, 2020

The 'rosgraph_monitor' needs to send a diagnostics message to the metacontrol reasoner to notify the laser failure.

Currently, the metacontroller does not accept messages related to single nodes, but to configurations, as we decided that the metacontrol would operate at that level of granularity. See:
https://github.com/tud-cor/mc_mros_reasoner/blob/67d4af8a6b064c2b29bab5c80956481c826ad6c0/mros1_reasoner/src/mros1_reasoner/ros_reasoner.py#L141-L147
(binding refers to a configuration that is currently deployed)

We can discuss this interface @ipa-hsd

@chcorbato
Copy link
Member Author

@ipa-hsd can you send me the information that is published by the ros_graph monitor about the laser node that is missing?

@ipa-nhg can you send the information about components that is in the .rossystem file?

@hsd-dev
Copy link
Collaborator

hsd-dev commented Nov 9, 2020

can you send me the information that is published by the ros_graph monitor about the laser node that is missing?

Output would look something like this:

header: 
  seq: 21
  stamp: 
    secs: 1582702157
    nsecs: 918167114
  frame_id: ''
status: 
  - 
    level: 2
    name: "laserscanner_node"
    message: "Missing node"
    hardware_id: ''
    values: []

@ipa-nhg
Copy link
Member

ipa-nhg commented Nov 9, 2020

Ros system model example for a component:

	ComponentInterface { name battery_load_control 
		RosPublishers { 
		RosPublisher "/power_load" { RefPublisher "metacontrol_sim.battery_load_control_node.battery_load_control_node./power_load" } }
	RosSubscribers { 
		RosSubscriber "/odom" { RefSubscriber "metacontrol_sim.battery_load_control_node.battery_load_control_node./odom"} , 
		RosSubscriber"/cmd_vel" { RefSubscriber "metacontrol_sim.battery_load_control_node.battery_load_control_node./cmd_vel"} , 
		RosSubscriber"/imu/data" { RefSubscriber "metacontrol_sim.battery_load_control_node.battery_load_control_node./imu/data" } } 
	RosParameters {
		RosParameter min_power_load { RefParameter "metacontrol_sim.battery_load_control_node.battery_load_control_node.min_power_load"} , 
		RosParameter max_power_load { RefParameter "metacontrol_sim.battery_load_control_node.battery_load_control_node.max_power_load"} , 
		RosParameter odom_topic { RefParameter "metacontrol_sim.battery_load_control_node.battery_load_control_node.odom_topic"} , 
		RosParameter imu_topic { RefParameter "metacontrol_sim.battery_load_control_node.battery_load_control_node.imu_topic"} , 
		RosParameter power_load_topic { RefParameter "metacontrol_sim.battery_load_control_node.battery_load_control_node.power_load_topic"} , 
		RosParameter additional_consumption { RefParameter "metacontrol_sim.battery_load_control_node.battery_load_control_node.additional_consumption"} , 
		RosParameter cmd_vel_topic { RefParameter "metacontrol_sim.battery_load_control_node.battery_load_control_node.cmd_vel_topic"} , 
		RosParameter controller_frequency { RefParameter "metacontrol_sim.battery_load_control_node.battery_load_control_node.controller_frequency"} , 
		RosParameter const_acceleration { RefParameter "metacontrol_sim.battery_load_control_node.battery_load_control_node.const_acceleration"} , 
		RosParameter const_frequency { RefParameter "metacontrol_sim.battery_load_control_node.battery_load_control_node.const_frequency" } } }

Full file: https://github.com/rosin-project/rosin-experiments/blob/master/metacontrol_models_experiment/system.rossystem#L221-L238

@chcorbato
Copy link
Member Author

@marioney which version of mros_reasoner shall we use for the ROSIN paper? Do you think we shouldn't first incorporate some changes from the MROS project?

@marioney
Copy link
Member

@marioney which version of mros_reasoner shall we use for the ROSIN paper? Do you think we shouldn't first incorporate some changes from the MROS project?

I think we need to add some changes from the MROS project, specially if we plan to use the same ontology.

@chcorbato
Copy link
Member Author

I see two options:

  • A. We update to use the new mc_reasoner and fix all issues.
  • B. we analyze what functionality we need for any additional experiments in the new submission and we only merge those changes.

I suspect B will actually be more complex, but I think you know better @marioney

@marioney
Copy link
Member

The diagnostics msg for a missing component should be something like this.

header: 
  seq: 21
  stamp: 
    secs: 1582702157
    nsecs: 918167114
  frame_id: ''
status: 
  - 
    level: 2
    name: ""
    message: "Component status"
    hardware_id: ''
    values: ["laserscanner_node", "FALSE"]

We have to define correctly the name of the component, (i.e. laserscanner_node as it needs to be the same on the ontology file)
In the current version of the ontology we have laser_resender, but I we can change it.

@ipa-hsd can you let me know when you update the observer to get this message

This was referenced Mar 29, 2021
@hsd-dev
Copy link
Collaborator

hsd-dev commented Mar 29, 2021

@marioney #10

@marioney
Copy link
Member

Great I've merged the changes!!

@ipa-hsd which nodes do we need to add to test it, and or how can we trigger this failure?

@hsd-dev
Copy link
Collaborator

hsd-dev commented Mar 29, 2021

Actually I made a dummy test. I used metacontrol_desired.rossystem (please note that the single quotes are missing for the ComponentInterface names)

RosSystem { Name 'desired_system'
	RosComponents ( 
	ComponentInterface { name 'move_base' },
	ComponentInterface { name 'battery_load_control' } , 
	ComponentInterface { name 'fake_localization' } , 
	ComponentInterface { name 'laser_filter' } , 
	ComponentInterface { name 'safety_distance_publisher' },
	ComponentInterface { name 'graph_monitor' }
)}

I ran an "empty system", meaning none of the required nodes were running, so I get a "missing node" error for all the nodes listed in the desired system. The commands which I used were:

$ roscore
$ rosrun ros_graph_parser ros_node # this code is a bit buggy (https://github.com/ipa-nhg/ros_graph_parser branch: SoSymPaper)
$ rosrun rosgraph_monitor monitor
$ rosservice call /load_observer "name: 'ROSGraphObserver'"

For an actual test, the simulation should be running and the laser node should be shut down at run time.

@chcorbato
Copy link
Member Author

Actually I made a dummy test. I used metacontrol_desired.rossystem (please note that the single quotes are missing for the ComponentInterface names)

RosSystem { Name 'desired_system'
	RosComponents ( 
	ComponentInterface { name 'move_base' },
	ComponentInterface { name 'battery_load_control' } , 
	ComponentInterface { name 'fake_localization' } , 
	ComponentInterface { name 'laser_filter' } , 
	ComponentInterface { name 'safety_distance_publisher' },
	ComponentInterface { name 'graph_monitor' }
)}

I ran an "empty system", meaning none of the required nodes were running, so I get a "missing node" error for all the nodes listed in the desired system. The commands which I used were:

$ roscore
$ rosrun ros_graph_parser ros_node # this code is a bit buggy (https://github.com/ipa-nhg/ros_graph_parser branch: SoSymPaper)
$ rosrun rosgraph_monitor monitor
$ rosservice call /load_observer "name: 'ROSGraphObserver'"

For an actual test, the simulation should be running and the laser node should be shut down at run-time.

Maybe the post above could be added to the README for this repo, in a Test section?
i think it is very useful, and we should try to gather useful explanations where they can be found later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants