Пример #1
0
 def __init__(self, robot, p1 = 0, p2 = 0 , p3 = 0 , duration = 1, wait = True):
     Primitive.__init__(self, robot)
     self.duration = duration
     self.p1 = p1
     self.p2 = p2
     self.p3 = p3
     self.wait = wait
Пример #2
0
 def __init__(self,robot,motors_name,nb_records,goal):
     # if you give more than one motor, the load for the motors will be combined, if you want independant 
     # load you have to instantiate several primitives
     self.robot = robot
     self.motors = [getattr(self.robot, name) for name in motors_name]
     self.nb_records = nb_records
     self.goal = goal
     correction_value = 0
     Primitive.__init__(self, robot)
Пример #3
0
 def __init__(self,robot,speed,knee=0):
     self.right = leg_move(robot.l_ankle_y,knee)# il faudrait mettre r_ankle_y mais les angles limites semblent faux, c'est l'opposé
     self.left = leg_move(robot.l_ankle_y,knee)
     self.robot = robot
     Primitive.__init__(self, robot)
     self.high_percent = 100
     self.r_foot_gap_percent = 0
     self.l_foot_gap_percent = 0
     self.speed = speed
Пример #4
0
 def __init__(self, *args, **kwargs):
     logging.info(self)
     Primitive.__init__(self, *args, **kwargs)
     self.directory = os.path.join(
         os.path.split(os.path.dirname(os.path.abspath(__file__)))[0],
         'media', 'sounds')
     self.properties = []
     self._sound = None
     self.update_sound_list()
Пример #5
0
 def __init__(self,
              robot,
              colors=[
                  'green', 'red', 'yellow', 'blue', 'pink', 'cyan', 'white',
                  'off'
              ],
              freq=2):
     #on redéfinit la fonction __init__() hérité de Primitive, et lui ajoute deux parametre: colors et freq
     Primitive.__init__(self, robot)
     #on appel la fonction __init__() de la class Primitive (pour que les autres variables et parametre de celle-ci s'initie correctement)
     self.colors = colors
     self.freq = freq
Пример #6
0
 def __init__(self, robot):
     Primitive.__init__(self, robot)
     self.speed = 25
Пример #7
0
 def __init__(self, robot):
     Primitive.__init__(self, robot)
     self.record_name = "demo_example"
Пример #8
0
 def __init__(self, robot):
     #je définit ma fonction __init__()
     Primitive.__init__(self, robot)
     #j'apel la fonction __init__ de ma class mère
     self.defaut_posture = [0, -45, 15, 0, 55,
                            -5]  #[ 0, -50, 35, 0, 35, 30 ]
Пример #9
0
    def __init__(self, robot):
        #je définit ma fonction __init__()
        Primitive.__init__(self, robot)
        #j'apel la fonction __init__ de ma class mère

        self.defaut_posture = [0, -45, 25, 0, 45, -25]