Skip to content

Commit

Permalink
fonctionnel mais plantage apcr
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed May 3, 2017
1 parent c36b1cb commit 6a6e39d
Show file tree
Hide file tree
Showing 13 changed files with 172 additions and 850 deletions.
18 changes: 9 additions & 9 deletions py/team_onkhassTrobo/fsm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import func_file
#import func_file
import motion_walk
import naocrouch

Expand Down Expand Up @@ -26,23 +26,23 @@ def set_state(self, state):

def set_event(self, event):
self.curEvent = event

def create(self):
self.add_event('z')
self.add_event('c')
self.add_state('walking')
self.add_state('crouching')

self.set_event(self.events[1])
self.set_state(self.states[1])
self.set_state(self.states[1])

for sta in self.states:
for sta2 in self.states:
if sta != sta2:
if sta2 == 'walking':
self.add_transition(sta , sta2 , 'z' , motion_walk.main)
elif sta2 == 'crouching':
self.add_transition(sta , sta2 , 'c' , naocrouch.main)
self.add_transition(sta , sta2 , 'c' , naocrouch.main)

def run(self):
event = self.curEvent
Expand All @@ -56,7 +56,7 @@ def run(self):
print(st)
return self.transitions [key][1]

#
#
#a = fsm()
#a.add_event('d')
#a.add_event('z')
Expand All @@ -78,6 +78,6 @@ def run(self):
# a.add_transition(sta , sta2 , 's' , move_back)
# elif sta2 == 'avant':
# a.add_transition(sta , sta2 , 'z' , move_forward)

#a.set_event(a.events[0])
#a.set_state(a.states[1])
#a.set_state(a.states[1])
183 changes: 0 additions & 183 deletions py/team_onkhassTrobo/fsm_nao.py

This file was deleted.

Loading

0 comments on commit 6a6e39d

Please sign in to comment.