Commit a0219f3b authored by Herve Frezza-Buet's avatar Herve Frezza-Buet

ex hfb

parent e8db3c18
class MySequencer(Sequencer):
def __init__(self):
super(...)
self.new_mode('hallway',
[[('slide', True), 'detect'], # Phase 1
[Wait(['slide', 'detect'], [('detect_door', True), ('Forward', False)]), # Phase 2 : attendre que slide et detect aient fini. Wait(cond, seq)
...,
....)
self.new_mode('stairs',
[[....]])
...
"""
new_mode(command_name, seq)
seq : cmd_list
cmd : activ_list # activésen même temps
activ : (nom, bool)
| Wait(cond_list, avtiv_list)
cond_list : liste de noms.
"""
def main(args):
rospy.init_node('Sequencer', anonymous=True)
sc = Sequencer()
sc.run()
#rospy.init_node('send_command', anonymous=True)
rospy.spin()
if __name__ == '__main__':
main(sys.argv)
"----------------------"
sequence = { 'hallway' : {....}
'stairs' : {....}
}
seq = Sequenceur(sequence) # et ça part....
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment