Skip to content

Commit

Permalink
use steer angle of actuation cmd even when not convert_steer_command
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
  • Loading branch information
kosuke55 committed Oct 24, 2024
1 parent df52c6a commit 1816618
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pacmod_interface/src/pacmod_interface/pacmod_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,10 @@ void PacmodInterface::publishCommands()
const double desired_steer_wheel = std::invoke([&]() -> double {
double desired_steer_wheel{0.0};
if (convert_steer_command_) {
desired_steer_wheel =
(control_cmd_ptr_->lateral.steering_tire_angle - steering_offset_) * adaptive_gear_ratio;
// NOTE:
// It is assumed that steer_cmd is send as actuation_cmd without being converted from
// raw_vehicle_cmd_converter.
desired_steer_wheel = (actuation.steer_cmd - steering_offset_) * adaptive_gear_ratio;
} else {
desired_steer_wheel = actuation_cmd_ptr_->actuation.steer_cmd;
}
Expand Down

0 comments on commit 1816618

Please sign in to comment.