micro-ROS / system_modes

System modes for ROS 2 and micro-ROS
Apache License 2.0
43 stars 9 forks source link

Should get_available_modes be influenced by inference #43

Open norro opened 4 years ago

norro commented 4 years ago

If we know through mode inference, that a certain state or mode of a (sub-)system can't be transitioned to, should get_available_states and get_available_modes of (sub-)systems report accordingly?

Example:

norro commented 4 years ago

Proposal after discussion with MROS team:

norro commented 4 years ago

When/how can we consider modes to be not reachable by nodes? Available modes are currently reported by the mode manager based on the SMH file (this is because the lifecycle node itself doesn't have any idea about modes). We could obviously conclude that no mode is reachable when the node is in error-processing, but is this the only thing we know? @chcorbato Do you have an idea on this?

chcorbato commented 4 years ago

Maybe we could associate the ErrorProcessing transition to the node MODE at that moment, so that only that MODE is considered not reachable. What do you think? Could the Mode Manager keep track of reachable modes?

norro commented 4 years ago

The Mode Manager has to keep track of reachable modes, yes. So you suggest that all modes are considered reachable when the node is inactive/active and no modes are considered reachable when the node is in error processing? That should be doable.

chcorbato commented 4 years ago

No, not all modes. I think we should consider not reachable only those node modes that were active when the node went into ErrorProcessing. It could be that only specific configurations cause the node to go into error, right?

norro commented 4 years ago

Okay, so the mode manager would then keep track of the modes that "made" the nodes transition into error processing and exclude them from the list of reachable modes. Maybe until the node gets reset?

chcorbato commented 4 years ago

Okay, so the mode manager would then keep track of the modes that "made" the nodes transition into error processing and exclude them from the list of reachable modes. Maybe until the node gets reset?

Sounds reasonable to me.