Commit a9cdf6e 1 parent 98fba6a commit a9cdf6e Copy full SHA for a9cdf6e
File tree 2 files changed +2
-6
lines changed
localization/ndt_scan_matcher/test
2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,7 @@ class StubInitialposeClient : public rclcpp::Node
38
38
// wait for the service to be available
39
39
while (!align_service_client_->wait_for_service (std::chrono::seconds (1 ))) {
40
40
if (!rclcpp::ok ()) {
41
- RCLCPP_ERROR (this ->get_logger (), " Interrupted while waiting for the service." );
42
- EXIT_FAILURE;
41
+ throw std::runtime_error (" Interrupted while waiting for the service." );
43
42
}
44
43
RCLCPP_INFO (this ->get_logger (), " Waiting for service..." );
45
44
}
@@ -51,7 +50,6 @@ class StubInitialposeClient : public rclcpp::Node
51
50
if (
52
51
rclcpp::spin_until_future_complete (this ->get_node_base_interface (), result) !=
53
52
rclcpp::FutureReturnCode::SUCCESS) {
54
- RCLCPP_ERROR (this ->get_logger (), " Service call failed" );
55
53
throw std::runtime_error (" Service call failed." );
56
54
}
57
55
return result.get ()->pose_with_covariance ;
Original file line number Diff line number Diff line change @@ -36,8 +36,7 @@ class StubTriggerNodeClient : public rclcpp::Node
36
36
// wait for the service to be available
37
37
while (!align_service_client_->wait_for_service (std::chrono::seconds (1 ))) {
38
38
if (!rclcpp::ok ()) {
39
- RCLCPP_ERROR (this ->get_logger (), " Interrupted while waiting for the service." );
40
- EXIT_FAILURE;
39
+ throw std::runtime_error (" Interrupted while waiting for the service." );
41
40
}
42
41
RCLCPP_INFO (this ->get_logger (), " Waiting for service..." );
43
42
}
@@ -49,7 +48,6 @@ class StubTriggerNodeClient : public rclcpp::Node
49
48
if (
50
49
rclcpp::spin_until_future_complete (this ->get_node_base_interface (), result) !=
51
50
rclcpp::FutureReturnCode::SUCCESS) {
52
- RCLCPP_ERROR (this ->get_logger (), " Service call failed" );
53
51
throw std::runtime_error (" Service call failed." );
54
52
}
55
53
return result.get ()->success ;
You can’t perform that action at this time.
0 commit comments