Skip to content

Commit

Permalink
fix(simple_sensor_simulator): fix ego overwrite for DELAY_STEER_ACC_G…
Browse files Browse the repository at this point in the history
…EARED_WO_FALL_GUARD
  • Loading branch information
dmoszynski committed Oct 14, 2024
1 parent f6c7b95 commit 6113254
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,19 @@ auto EgoEntitySimulation::overwrite(
}();

switch (auto state = Eigen::VectorXd(vehicle_model_ptr_->getDimX()); vehicle_model_type_) {
case VehicleModelType::DELAY_STEER_ACC_GEARED_WO_FALL_GUARD:
// state{X, Y, YAW, VX, STEER, PEDAL_ACCX, ACCX}
state(0) = world_relative_position_.x();
state(1) = world_relative_position_.y();
state(2) = yaw;
state(3) = status.action_status.twist.linear.x;
state(4) = 0;
state(5) = 0;
state(6) = status.action_status.accel.linear.x;
vehicle_model_ptr_->setState(state);
break;
case VehicleModelType::DELAY_STEER_ACC:
case VehicleModelType::DELAY_STEER_ACC_GEARED:
case VehicleModelType::DELAY_STEER_ACC_GEARED_WO_FALL_GUARD:
case VehicleModelType::DELAY_STEER_MAP_ACC_GEARED:
state(5) = status.action_status.accel.linear.x;
[[fallthrough]];
Expand Down

0 comments on commit 6113254

Please sign in to comment.