|
|
|
@ -107,12 +107,13 @@ class Plant: |
|
|
|
|
position = log.XYZTData.new_message() |
|
|
|
|
position.x = [float(x) for x in (self.speed + 0.5) * np.array(ModelConstants.T_IDXS)] |
|
|
|
|
model.modelV2.position = position |
|
|
|
|
model.modelV2.action.desiredAcceleration = float(self.acceleration + 0.1) |
|
|
|
|
velocity = log.XYZTData.new_message() |
|
|
|
|
velocity.x = [float(x) for x in (self.speed + 0.5) * np.ones_like(ModelConstants.T_IDXS)] |
|
|
|
|
velocity.x[0] = float(self.speed) # always start at current speed |
|
|
|
|
model.modelV2.velocity = velocity |
|
|
|
|
acceleration = log.XYZTData.new_message() |
|
|
|
|
acceleration.x = [float(x) for x in np.zeros_like(ModelConstants.T_IDXS)] |
|
|
|
|
acceleration.x = [float(x + 0.1) for x in np.zeros_like(ModelConstants.T_IDXS)] |
|
|
|
|
model.modelV2.acceleration = acceleration |
|
|
|
|
model.modelV2.meta.disengagePredictions.gasPressProbs = [float(prob_throttle) for _ in range(6)] |
|
|
|
|
|
|
|
|
|