Skip to content

Commit

Permalink
refactor(pid_longitudinal_controller): set stopped state if ego is no…
Browse files Browse the repository at this point in the history
…t in autonomous mode (autowarefoundation#3644)

Signed-off-by: Berkay Karaman <[email protected]>
  • Loading branch information
brkay54 authored May 15, 2023
1 parent a3c94fd commit 48a42ed
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,11 @@ void PidLongitudinalController::updateControlState(const ControlData & control_d
RCLCPP_INFO_SKIPFIRST_THROTTLE(node_->get_logger(), *node_->get_clock(), 5000, "%s", s);
};

// if current operation mode is not autonomous mode, then change state to stopped
if (m_current_operation_mode.mode != OperationModeState::AUTONOMOUS) {
return changeState(ControlState::STOPPED);
}

// transit state
// in DRIVE state
if (m_control_state == ControlState::DRIVE) {
Expand Down

0 comments on commit 48a42ed

Please sign in to comment.