diff --git a/selfdrive/controls/lib/lateral_planner.py b/selfdrive/controls/lib/lateral_planner.py index a885200e525cde..1d7684e827a3bd 100644 --- a/selfdrive/controls/lib/lateral_planner.py +++ b/selfdrive/controls/lib/lateral_planner.py @@ -207,9 +207,9 @@ def publish(self, sm, pm): lateralPlan = plan_send.lateralPlan lateralPlan.laneWidth = float(self.LP.lane_width) - lateralPlan.dPathPoints = [float(x) for x in self.y_pts] - lateralPlan.psis = [float(x) for x in self.lat_mpc.x_sol[0:CONTROL_N, 2]] - lateralPlan.curvatures = [float(x) for x in self.lat_mpc.x_sol[0:CONTROL_N, 3]] + lateralPlan.dPathPoints = self.y_pts.tolist() + lateralPlan.psis = self.lat_mpc.x_sol[0:CONTROL_N, 2].tolist() + lateralPlan.curvatures = self.lat_mpc.x_sol[0:CONTROL_N, 3].tolist() lateralPlan.curvatureRates = [float(x) for x in self.lat_mpc.u_sol[0:CONTROL_N - 1]] + [0.0] lateralPlan.lProb = float(self.LP.lll_prob) lateralPlan.rProb = float(self.LP.rll_prob) diff --git a/selfdrive/controls/lib/longitudinal_planner.py b/selfdrive/controls/lib/longitudinal_planner.py index f6b949316ae270..9dc6ab9ee5e1ec 100755 --- a/selfdrive/controls/lib/longitudinal_planner.py +++ b/selfdrive/controls/lib/longitudinal_planner.py @@ -112,9 +112,9 @@ def publish(self, sm, pm): longitudinalPlan.modelMonoTime = sm.logMonoTime['modelV2'] longitudinalPlan.processingDelay = (plan_send.logMonoTime / 1e9) - sm.logMonoTime['modelV2'] - longitudinalPlan.speeds = [float(x) for x in self.v_desired_trajectory] - longitudinalPlan.accels = [float(x) for x in self.a_desired_trajectory] - longitudinalPlan.jerks = [float(x) for x in self.j_desired_trajectory] + longitudinalPlan.speeds = self.v_desired_trajectory.tolist() + longitudinalPlan.accels = self.a_desired_trajectory.tolist() + longitudinalPlan.jerks = self.j_desired_trajectory.tolist() longitudinalPlan.hasLead = sm['radarState'].leadOne.status longitudinalPlan.longitudinalPlanSource = self.mpc.source diff --git a/selfdrive/locationd/calibrationd.py b/selfdrive/locationd/calibrationd.py index 26373506437e66..1333180ec63f58 100755 --- a/selfdrive/locationd/calibrationd.py +++ b/selfdrive/locationd/calibrationd.py @@ -179,9 +179,9 @@ def get_msg(self): msg.liveCalibration.validBlocks = self.valid_blocks msg.liveCalibration.calStatus = self.cal_status msg.liveCalibration.calPerc = min(100 * (self.valid_blocks * BLOCK_SIZE + self.idx) // (INPUTS_NEEDED * BLOCK_SIZE), 100) - msg.liveCalibration.extrinsicMatrix = [float(x) for x in extrinsic_matrix.flatten()] - msg.liveCalibration.rpyCalib = [float(x) for x in smooth_rpy] - msg.liveCalibration.rpyCalibSpread = [float(x) for x in self.calib_spread] + msg.liveCalibration.extrinsicMatrix = extrinsic_matrix.flatten().tolist() + msg.liveCalibration.rpyCalib = smooth_rpy.tolist() + msg.liveCalibration.rpyCalibSpread = self.calib_spread.tolist() return msg def send_data(self, pm) -> None: