Skip to content
mattlangford edited this page Jan 13, 2017 · 1 revision

#Overview A meta alarm is an alarm just like any other, but that can be raised by other alarms. For example, on an AUV if there is a kill alarm that should be raised if one of the thrusters go out, or if the battery gets too low, or if odometery becomes too whacky, the user can set up individual alarms for each of those scenarios and then if any of them are raised, the kill alarm gets raised as well.

#Setup Setup is fairly straight forward, when the server is created it checks the /meta_alarms/ ROS parameter which should just be a dictionary of meta alarms -> sub alarms. By default, each meta alarm will raise if any of it's sub alarms are raised and clear if all of them are cleared. This may not be the desired behavior, so the meta_predicate function in the alarm's handler can be used to create custom behavior.

#Meta Predicate The meta_predicate is used only by meta alarms and get's called when any of the sub alarms listed in the rosparam are changed. The function gets passed the meta alarm alarm class and a dictionary of sub alarms -> alarm classes that can be used to preform logic and return True or False wether to raise or clear the alarm.

Clone this wiki locally