apollo icon indicating copy to clipboard operation
apollo copied to clipboard

steer_single_direction_max_degree_ in mpc_controller.cc

Open turinglife opened this issue 8 years ago • 5 comments

in mpc_controller.cc, #88 line.

steer_single_direction_max_degree_ = vehicle_param_.max_steer_angle() / steer_transmission_ratio_ / 180 * M_PI;

I was wondering whether the formulation is wrong. Since the unit of vehicle_param_.max_steer_angle() is rad, so we should use *180/M_PI instead of 180 * M_PI.

Thanks.

@Capri2014

turinglife avatar Jul 30 '18 03:07 turinglife

@turinglife thanks for pointing this out and you are right.

Capri2014 avatar Jul 30 '18 05:07 Capri2014

fix created via https://github.com/ApolloAuto/apollo/pull/5167 @turinglife

Capri2014 avatar Jul 30 '18 05:07 Capri2014

Maybe, we also need to remove term of steer_transmission_ratio_ from the formula.

steer_single_direction_max_degree_ = vehicle_param_.max_steer_angle() * 180 / M_PI;

@Capri2014

turinglife avatar Jul 30 '18 05:07 turinglife

@turinglife Yep, it is slightly modified.

Capri2014 avatar Aug 01 '18 09:08 Capri2014

Closed as the issue seems to be fixed.

Zhenni17 avatar Aug 10 '18 22:08 Zhenni17