Skip to content
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
8 changes: 7 additions & 1 deletion src/sas_robot_driver_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,13 @@ int RobotDriverROS::control_loop()

// Any exception from the watchdog thread control loop will be rethrown by check_for_watchdog_exceptions(), and
// consequently the main control loop must stop.
robot_driver_->check_for_watchdog_exceptions();
try {
robot_driver_->check_for_watchdog_exceptions();
} catch (const std::exception& e) {
RCLCPP_INFO_STREAM_ONCE(node_->get_logger(), "::Watchdog exception: " << e.what());
RCLCPP_INFO_STREAM_ONCE(node_->get_logger(), "::The shutdown signal was received!");
shutdown_signaler_->shutdown();
}

}

Expand Down
Loading