Skip to content

Commit

Permalink
feat(operation_mode_transition_manager): transition to auto quickly w…
Browse files Browse the repository at this point in the history
…hen vehicle stops (autowarefoundation#2427)

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
  • Loading branch information
tkimura4 authored Dec 6, 2022
1 parent b22d10d commit d3e640d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions control/operation_mode_transition_manager/src/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ bool AutonomousMode::isModeChangeCompleted()
constexpr auto dist_max = 5.0;
constexpr auto yaw_max = M_PI_4;

const auto current_speed = kinematics_.twist.twist.linear.x;
const auto & param = engage_acceptable_param_;

// Engagement completes quickly if the vehicle is stopped.
if (param.allow_autonomous_in_stopped && std::abs(current_speed) < 0.01) {
return true;
}

const auto unstable = [this]() {
stable_start_time_.reset();
return false;
Expand Down

0 comments on commit d3e640d

Please sign in to comment.