Repository navigation
fix: guard ROS plugin updates during context shutdown - #15
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Gazebo may still run an update callback after the shared ROS context has shut down. Calling
spin_some()or publishing at that point can throw anRCLError. A plugin must also leave process-level signal handling to Gazebo instead of replacing it duringrclcpp::init().Scope
Guard five plugin implementations:
SphericalCoords,OceanCurrentPlugin,UsblTransceiver,UsblTransponderandSubseaPressureSensorPlugin.SignalHandlerOptions::None.RCLErroronly when shutdown invalidated that context; rethrow it while the context is valid.The USBL and pressure guards extend this existing PR rather than opening another overlapping shutdown PR. Latest
mainwas merged normally into this branch. No launch timeout, Docker/CI or MAVROS changes are included. The depth timestamp fix is separate dependent PR #19.Validation
Linux ARM64, Ubuntu 26.04, ROS 2 Lyrical / Gazebo Jetty:
posim_gz_sensor_pluginsandposim_ros_gz_pluginsfrom this branch.mainpressure implementation failed the new shutdown regression withRCLError; restoring the fix passed it.Review / remaining scope
The separate
ros_gz_bridgeshutdown issue is upstream, not fixed by these guards. ARM64/AMD64 CI and maintainer review remain required before merge; an earlier ARM64 runner-space failure was infrastructure-related. Please leave this PR unmerged until reviewed.