Exemplo n.º 1
0
    def __init__(self):
        super().__init__()
        self.front_cargo_bay = Waypoint(5.6 - SwerveChassis.LENGTH / 2, 0.2, 0,
                                        0.75)
        self.setup_loading_bay = Waypoint(3.3, 3.3, math.pi, 2)
        self.loading_bay = Waypoint(0.2 + SwerveChassis.LENGTH / 2, 3.4,
                                    math.pi, 1)
        self.side_cargo_bay = Waypoint(7, 0.8 + SwerveChassis.WIDTH / 2,
                                       -math.pi / 2, 1)
        self.side_cargo_bay_alignment_point = Waypoint(
            7, 1.8 + SwerveChassis.WIDTH / 2, -math.pi / 2, 0.75)
        self.start_pos = Waypoint(
            1.2 + SwerveChassis.LENGTH / 2,
            0,
            0,
            2,
            #  + SwerveChassis.WIDTH / 2
        )

        self.completed_runs = 0
        self.desired_angle = 0
        self.desired_angle_navx = 0
        self.minimum_path_completion = 0.85

        self.acceleration = 1
        self.deceleration = -0.5

        self.pursuit = PurePursuit(look_ahead=0.2,
                                   look_ahead_speed_modifier=0.25)
Exemplo n.º 2
0
    def __init__(self):
        super().__init__()
        self.pursuit = PurePursuit(look_ahead=0.2,
                                   look_ahead_speed_modifier=0.25)

        self.acceleration = 1
        self.deceleration = -0.5
Exemplo n.º 3
0
 def __init__(self):
     super().__init__()
     self.points = (
         Waypoint(0, 0, 0, 1),
         Waypoint(0.8, 0, 0, 0.5),
         Waypoint(1, 0, 0, 0.2),
     )
     self.pursuit = PurePursuit(look_ahead=0.2,
                                look_ahead_speed_modifier=0.25)
Exemplo n.º 4
0
    def __init__(self):
        super().__init__()
        self.coordinates: Coordinates = left_coordinates

        self.completed_runs = 0
        self.desired_angle = 0
        self.desired_angle_navx = 0
        self.minimum_path_completion = 0.85

        self.pursuit = PurePursuit(look_ahead=0.2,
                                   look_ahead_speed_modifier=0.25)
Exemplo n.º 5
0
 def on_enable(self):
     super().on_enable()
     self.chassis.odometry_x = 0
     self.chassis.odometry_y = 0
     self.points = (
         self.current_pos,
         Waypoint(2, 0, 0, 1),
         Waypoint(2, 2, 0, 1),
         Waypoint(0, 2, 0, 1),
     )
     self.pursuit = PurePursuit(look_ahead=0.2,
                                look_ahead_speed_modifier=0.0)
Exemplo n.º 6
0
 def __init__(self):
     super().__init__()
     self.pursuit = PurePursuit(look_ahead=0.2,
                                look_ahead_speed_modifier=0.25)