Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

[pull] main from autowarefoundation:main #207

Merged
merged 1 commit into from
Dec 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ void EmergencyHandler::callMrmBehavior(
auto request = std::make_shared<tier4_system_msgs::srv::OperateMrm::Request>();
request->operate = true;

if (mrm_behavior == MrmState::NONE) {
RCLCPP_WARN(this->get_logger(), "MRM behavior is None. Do nothing.");
return;
}
if (mrm_behavior == MrmState::COMFORTABLE_STOP) {
auto result = client_mrm_comfortable_stop_->async_send_request(request).get();
if (result->response.success == true) {
Expand Down Expand Up @@ -253,6 +257,10 @@ void EmergencyHandler::cancelMrmBehavior(
auto request = std::make_shared<tier4_system_msgs::srv::OperateMrm::Request>();
request->operate = false;

if (mrm_behavior == MrmState::NONE) {
// Do nothing
return;
}
if (mrm_behavior == MrmState::COMFORTABLE_STOP) {
auto result = client_mrm_comfortable_stop_->async_send_request(request).get();
if (result->response.success == true) {
Expand Down