Skip to content

Prevent shutdown failure from becoming an error

rclcpp::shutdown() was failing for some nodes. This was due to a runtime_error being thrown whenever this function returned false. This happens whenever the context is already shut down and rclcpp::shutdown() is called.

Solution: move rclcpp::shutdown() outside of try-catch blocks and remove the parts of the code which throw a runtime_error when the function returns false. In particular, rclcpp::shutdown() is now called immediately before the return statement.

Change-Id: I61050f3898ac5a559fc4955edcc59dc99a951e01
Signed-off-by: Luca Foschiani luca.foschiani@arm.com
Issue-Id: SCM-1123

Closes #566 (closed)

Edited by Luca Foschiani

Merge request reports