Skip to content

Commit

Permalink
add pull over after stopped option
Browse files Browse the repository at this point in the history
  • Loading branch information
saka1-s committed Jun 3, 2024
1 parent 9dc94c3 commit 9079986
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions system/mrm_handler/config/mrm_handler.param.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
is_mrm_recoverable: true
use_parking_after_stopped: false
use_pull_over: false
use_pull_over_after_stopped: false
use_comfortable_stop: false

# setting whether to turn hazard lamp on for each situation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ struct Param
bool is_mrm_recoverable;
bool use_parking_after_stopped;
bool use_pull_over;
bool use_pull_over_after_stopped;
bool use_comfortable_stop;
HazardLampPolicy turning_hazard_on{};
};
Expand Down
5 changes: 3 additions & 2 deletions system/mrm_handler/src/mrm_handler/mrm_handler_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ MrmHandler::MrmHandler() : Node("mrm_handler")
param_.is_mrm_recoverable = declare_parameter<bool>("is_mrm_recoverable", true);
param_.use_parking_after_stopped = declare_parameter<bool>("use_parking_after_stopped", false);
param_.use_pull_over = declare_parameter<bool>("use_pull_over", false);
param_.use_pull_over_after_stopped = declare_parameter<bool>("use_pull_over_after_stopped", false);
param_.use_comfortable_stop = declare_parameter<bool>("use_comfortable_stop", false);
param_.turning_hazard_on.emergency = declare_parameter<bool>("turning_hazard_on.emergency", true);

Expand Down Expand Up @@ -548,7 +549,7 @@ autoware_adapi_v1_msgs::msg::MrmState::_behavior_type MrmHandler::getCurrentMrmB
return MrmState::EMERGENCY_STOP;
}
if (isStopped() && operation_mode_availability_->pull_over) {
if (param_.use_pull_over) {
if (param_.use_pull_over && param_.use_pull_over_after_stopped) {
return MrmState::PULL_OVER;
}
}
Expand All @@ -567,7 +568,7 @@ autoware_adapi_v1_msgs::msg::MrmState::_behavior_type MrmHandler::getCurrentMrmB
return MrmState::EMERGENCY_STOP;
}
if (isStopped() && operation_mode_availability_->pull_over) {
if (param_.use_pull_over) {
if (param_.use_pull_over && param_.use_pull_over_after_stopped) {
return MrmState::PULL_OVER;
}
}
Expand Down

0 comments on commit 9079986

Please sign in to comment.