mirror of https://github.com/commaai/openpilot.git
Model replay needs speed
This commit is contained in:
parent
7ebd7b8b4d
commit
6d6a4993dd
|
@ -103,6 +103,7 @@ class ModelState:
|
|||
|
||||
self.model.execute()
|
||||
outputs = self.parser.parse_outputs(self.slice_outputs(self.output))
|
||||
print(outputs['desired_curvature'][0,:], inputs['lateral_control_params'])
|
||||
|
||||
self.inputs['features_buffer'][:-ModelConstants.FEATURE_LEN] = self.inputs['features_buffer'][ModelConstants.FEATURE_LEN:]
|
||||
self.inputs['features_buffer'][-ModelConstants.FEATURE_LEN:] = outputs['hidden_state'][0, :]
|
||||
|
@ -218,6 +219,7 @@ def main(demo=False):
|
|||
desire = DH.desire
|
||||
is_rhd = sm["driverMonitoringState"].isRHD
|
||||
frame_id = sm["roadCameraState"].frameId
|
||||
print(sm['carState'].vEgo)
|
||||
lateral_control_params = np.array([sm["carState"].vEgo, steer_delay], dtype=np.float32)
|
||||
if sm.updated["liveCalibration"] and sm.seen['roadCameraState'] and sm.seen['deviceState']:
|
||||
device_from_calib_euler = np.array(sm["liveCalibration"].rpyCalib, dtype=np.float32)
|
||||
|
|
Loading…
Reference in New Issue