44from ...knowledge .vehicle .geometry import front2steer ,steer2front ,heading_rate
55from ...knowledge .vehicle .dynamics import pedal_positions_to_acceleration , acceleration_to_pedal_positions
66from typing import List ,Optional ,Callable
7- import numpy as np
87
98@dataclass
109@serialization .register
@@ -96,7 +95,6 @@ class GEMInterface:
9695 def __init__ (self ):
9796 self .last_command = None # type: GEMVehicleCommand
9897 self .last_reading = None # type: GEMVehicleReading
99- self .max_accel = settings .get ('vehicle.limits.max_accelerator_pedal' )
10098
10199 def start (self ):
102100 pass
@@ -135,7 +133,7 @@ def hardware_faults(self) -> List[str]:
135133 """
136134 raise NotImplementedError ()
137135
138- def simple_command (self , acceleration_mps2 : float , steering_wheel_angle : float , state : VehicleState = None ) -> GEMVehicleCommand :
136+ def simple_command (self , acceleration_mps2 : float , steering_wheel_angle : float , state : VehicleState = None ) -> GEMVehicleCommand :
139137 """"
140138 Returns a command according to a desired acceleration and steering angle
141139
@@ -147,11 +145,7 @@ def simple_command(self, acceleration_mps2: float, steering_wheel_angle: float,
147145 pitch = state .pose .pitch if state is not None and state .pose .pitch is not None else 0.0
148146 v = state .v if state is not None else 0.0
149147 gear = state .gear if state is not None else 1
150-
151- acc_pos , brake_pos , gear = acceleration_to_pedal_positions (acceleration_mps2 , v , pitch , gear )
152-
153-
154- # acc_pos,brake_pos,gear = acceleration_to_pedal_positions(acceleration_mps2, v, pitch, gear)
148+ acc_pos ,brake_pos ,gear = acceleration_to_pedal_positions (acceleration_mps2 , v , pitch , gear )
155149
156150 cmd = GEMVehicleCommand (gear = gear ,
157151 accelerator_pedal_position = acc_pos ,
0 commit comments