예제 #1
0
 def init_task(self, context):
     self.active_waypoint_index = 0
     self.dead_reckoning = DeadReckoning(chassis=context.chassis,
                                         counts_per_revolution=3310)
     self.motion_limit = MotionLimit(
         linear_acceleration_limit=context.chassis.
         get_max_translation_speed() / PatrolTask.ACCEL_TIME,
         angular_acceleration_limit=context.chassis.get_max_rotation_speed(
         ) / PatrolTask.ACCEL_TIME)
예제 #2
0
 def init_task(self, context):
     # Maximum translation speed in mm/s
     self.max_trn = context.chassis.get_max_translation_speed()
     # Maximum rotation speed in radians/2
     self.max_rot = context.chassis.get_max_rotation_speed()
     self._set_relative_motion(context)
     self.dead_reckoning = DeadReckoning(chassis=context.chassis, counts_per_revolution=3310)
     self.motion_limit = MotionLimit(
             linear_acceleration_limit=context.chassis.get_max_translation_speed() / ManualMotionTask.ACCEL_TIME,
             angular_acceleration_limit=context.chassis.get_max_rotation_speed() / ManualMotionTask.ACCEL_TIME)
     self.rate_limit = RateLimit(limit_function=RateLimit.fixed_rate_limit_function(1 / ManualMotionTask.ACCEL_TIME))
     self.limit_mode = 0