Skip to content

Commit 00c8550

Browse files
committed
parameterize wheelbase ratio
Signed-off-by: Autumn60 <harada.akiro@gmail.com>
1 parent df3cdff commit 00c8550

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void SimplePlanningSimulator::initialize_vehicle_model()
234234
const double debug_steer_scaling_factor = declare_parameter("debug_steer_scaling_factor", 1.0);
235235
const auto vehicle_info = autoware::vehicle_info_utils::VehicleInfoUtils(*this).getVehicleInfo();
236236
const double wheelbase = vehicle_info.wheel_base_m;
237-
// const double rear_wheelbase_ratio = declare_parameter("rear_wheelbase_ratio", 1.0);
237+
const double rear_wheelbase_ratio = declare_parameter("rear_wheelbase_ratio", 1.0);
238238

239239
std::vector<std::string> model_module_paths = declare_parameter<std::vector<std::string>>(
240240
"model_module_paths", std::vector<std::string>({""}));
@@ -299,12 +299,12 @@ void SimplePlanningSimulator::initialize_vehicle_model()
299299
timer_sampling_time_ms_ / 1000.0, model_module_paths, model_param_paths, model_class_names);
300300

301301
} else if (vehicle_model_type_str == "DELAY_ARTICULATE_ACC_GEARED") {
302-
// const double front_wheelbase = wheelbase * (1.0 - rear_wheelbase_ratio);
303-
// const double rear_wheelbase = wheelbase * rear_wheelbase_ratio;
302+
const double front_wheelbase = wheelbase * (1.0 - rear_wheelbase_ratio);
303+
const double rear_wheelbase = wheelbase * rear_wheelbase_ratio;
304304

305305
vehicle_model_type_ = VehicleModelType::DELAY_ARTICULATE_ACC_GEARED;
306306
vehicle_model_ptr_ = std::make_shared<SimModelDelayArticulateAccGeared>(
307-
vel_lim, steer_lim, vel_rate_lim, steer_rate_lim, wheelbase * 0.5, wheelbase * 0.5,
307+
vel_lim, steer_lim, vel_rate_lim, steer_rate_lim, front_wheelbase, rear_wheelbase,
308308
timer_sampling_time_ms_ / 1000.0, acc_time_delay, acc_time_constant, steer_time_delay,
309309
steer_time_constant, steer_dead_band, steer_bias, debug_acc_scaling_factor,
310310
debug_steer_scaling_factor);

0 commit comments

Comments
 (0)