Skip to content

Commit 4934ce0

Browse files
isamu-takagiTakaHoribe
authored andcommitted
feat(default_ad_api): add log when operation mode change fails
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
1 parent 5aa747b commit 4934ce0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

system/default_ad_api/src/operation_mode.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,13 @@ void OperationModeNode::change_mode(
6666
const ResponseT res, const OperationModeRequest::_mode_type mode)
6767
{
6868
if (!mode_available_[mode]) {
69+
RCLCPP_WARN(
70+
get_logger(),
71+
"The target mode is not available. Please check the cause with "
72+
"rqt_diagnostics_graph_monitor");
6973
throw component_interface_utils::ServiceException(
70-
ServiceResponse::ERROR_NOT_AVAILABLE, "The mode change is blocked by the system.");
74+
ServiceResponse::ERROR_NOT_AVAILABLE,
75+
"The target mode is not available. Please check the diagnostics.");
7176
}
7277
const auto req = std::make_shared<OperationModeRequest>();
7378
req->mode = mode;

0 commit comments

Comments
 (0)