Skip to content

Harden ROS 2 MPC lifecycle and policy handoff - #130

Merged
Idate96 merged 4 commits into
ros2from
codex/ocs2-controller-liveness-guards
Jul 20, 2026
Merged

Idate96 merged 4 commits into
ros2from
codex/ocs2-controller-liveness-guards

Conversation

@Idate96

@Idate96 Idate96 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • contain exceptions at ThreadPool and ROS callback boundaries while draining in-flight work before rethrowing
  • require an explicit successful reset after a failed MPC solve and cold-reset the solver across observation-time discontinuities
  • attach reset epochs and monotonic sequences to policies so MRT rejects stale, duplicate, out-of-order, and unacknowledged-generation policies
  • validate observations, targets, mode schedules, performance data, and flattened controllers before they cross the ROS boundary
  • prevent a policy serialized before reset from being published after reset completes
  • run Jazzy CI for the ros2 branch and expose the plane-segmentation packages required by the full workspace build

Compatibility

This changes ocs2_msgs/msg/MpcFlattenedController and the response of ocs2_msgs/srv/Reset. Downstream ROS 2 consumers must rebuild and use the reset epoch returned by a successful reset before accepting policies.

Validation

  • Jazzy Release build: 54 packages
  • Jazzy full test suite: 596 tests, 0 errors, 0 failures, 0 skipped
  • Jazzy Debug build through ocs2_ros_interfaces: 6 packages
  • focused Release tests for ocs2_core, ocs2_mpc, and ocs2_ros_interfaces: 179 tests, 0 failures
  • ThreadSanitizer: 21 thread-support tests, including all 11 ThreadPool tests, passed with no findings
  • ThreadSanitizer: all 6 ROS-interface tests passed with no findings
  • rosdep: all dependencies for ocs2_mpc and ocs2_ros_interfaces satisfied
  • package manifests: XML validation passed
  • git diff --check origin/ros2: passed
  • generic-boundary scan: no Mole, Menzi, excavator, hydraulic, actuator, terrain-SDF, grading, joint-state, or M4-specific terms in the changed upstream files

Review notes

  • Base branch: ros2
  • The planning document is locally excluded and is not part of the commit set.
  • Mole arm-controller integration remains in moleworks_ros and is not part of this PR.

@Idate96
Idate96 merged commit cc73189 into ros2 Jul 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant