MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / __init__

Method __init__

agents/navigation/controller.py:23–48  ·  view source on GitHub ↗

Constructor method. :param vehicle: actor to apply to local planner logic onto :param args_lateral: dictionary of arguments to set the lateral PID controller using the following semantics: K_P -- Proportional term K_D -- Differential term

(self, vehicle, args_lateral, args_longitudinal, max_throttle=0.75, max_brake=0.3, max_steering=0.8)

Source from the content-addressed store, hash-verified

21
22
23 def __init__(self, vehicle, args_lateral, args_longitudinal, max_throttle=0.75, max_brake=0.3, max_steering=0.8):
24 """
25 Constructor method.
26
27 :param vehicle: actor to apply to local planner logic onto
28 :param args_lateral: dictionary of arguments to set the lateral PID controller
29 using the following semantics:
30 K_P -- Proportional term
31 K_D -- Differential term
32 K_I -- Integral term
33 :param args_longitudinal: dictionary of arguments to set the longitudinal
34 PID controller using the following semantics:
35 K_P -- Proportional term
36 K_D -- Differential term
37 K_I -- Integral term
38 """
39
40 self.max_brake = max_brake
41 self.max_throt = max_throttle
42 self.max_steer = max_steering
43
44 self._vehicle = vehicle
45 self._world = self._vehicle.get_world()
46 self.past_steering = self._vehicle.get_control().steer
47 self._lon_controller = PIDLongitudinalController(self._vehicle, **args_longitudinal)
48 self._lat_controller = PIDLateralController(self._vehicle, **args_lateral)
49
50 def run_step(self, target_speed, waypoint):
51 """

Callers

nothing calls this directly

Calls 3

get_worldMethod · 0.80

Tested by

no test coverage detected