Skip to content

Commit 2cf3fee

Browse files
committed
feat(mrm_handler): operate mrm only when autonomous operation mode
Signed-off-by: Makoto Kurihara <mkuri8m@gmail.com>
1 parent 7503f42 commit 2cf3fee

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

system/mrm_handler/src/mrm_handler/mrm_handler_core.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -450,12 +450,14 @@ void MrmHandler::updateMrmState()
450450
const bool is_emergency = isEmergency();
451451

452452
// Get mode
453-
const bool is_auto_mode = control_mode_->mode == ControlModeReport::AUTONOMOUS;
453+
const bool is_vehicle_auto_mode = control_mode_->mode == ControlModeReport::AUTONOMOUS;
454+
const bool is_operation_mode_auto_mode = operation_mode_state_->mode ==
455+
autoware_adapi_v1_msgs::msg::OperationModeState::AUTONOMOUS;
454456

455457
// State Machine
456458
if (mrm_state_.state == MrmState::NORMAL) {
457459
// NORMAL
458-
if (is_auto_mode && is_emergency) {
460+
if (is_vehicle_auto_mode && is_operation_mode_auto_mode && is_emergency) {
459461
transitionTo(MrmState::MRM_OPERATING);
460462
return;
461463
}

0 commit comments

Comments
 (0)