Skip to content

Conversation

@Idate96
Copy link
Contributor

@Idate96 Idate96 commented Dec 15, 2025

Overview

This PR ports the OCS2 ROS stack + robotic examples to ROS 2 Jazzy.

Notable changes

  • ROS2 interfaces: updated MPC/MRT ROS interfaces, including correct ROS2 QoS to preserve ROS1 “latched” semantics (transient_local).
  • Fail-fast reset: MRT reset now waits for the MPC reset service response and throws on failure.
  • ROS2 params: fixed node-local parameter usage (e.g., referenceFile).
  • CppADCodeGen runtime libs: defaults moved to user-writable locations (e.g. /tmp/ocs2_*_auto_generated) instead of install/share which is read only after building. Override via the libFolder/autodiffLibraryFolder parameters if you want a persistent cache.
  • Launch portability: removed hard-coded gnome-terminal prefixes; use terminal_prefix launch args when desired.

Tooling / CI

  • Added/updated Jazzy Dockerfile (docker/Dockerfile.jazzy) with Pinocchio via OpenRobots robotpkg.
  • Added/updated GitHub Actions (.github/workflows/ros-build-test.yml):
    • Release: build + colcon test
    • Debug: build-only (tests OFF) up to ocs2_ros_interfaces to keep runtime/disk within GitHub runner limits

Tests

All tests run successfully in a Jazzy docker environment:

  • Release: colcon test summary 579 tests, 0 errors, 0 failures
  • Debug (local for the moment): colcon test summary 572 tests, 0 errors, 0 failures

Example smoke test

  • Ballbot example with RViz enabled: ros2 launch ocs2_ballbot_ros ballbot_mpc_mrt.launch.py rviz:=true

Convert packages to ament_cmake/colcon, port messages/services and ROS interfaces/examples.

Vendor plane segmentation deps, add Jazzy install instructions + Dockerfile, and ignore unported ocs2_mpcnet/ocs2_raisim.
Explicitly clone the main branch to avoid stale cached catkin version during docker builds.
Clone ocs2_robotic_assets from its ros2 branch in docs and Docker to avoid catkin-only upstream.
@Idate96 Idate96 requested a review from Mayankm96 December 15, 2025 15:09
- Sync/verify MRT reset service call
- Restore ROS1 latch semantics via transient_local QoS
- Fix ROS2 node-local parameter usage
- Use writable /tmp defaults for auto_generated libs (override via libFolder)
- Remove hard gnome-terminal launch prefixes (terminal_prefix arg)
- Fix/relax flaky tests + raise timeouts for heavy debug tests
- Update docs + docker + GH Actions for Pinocchio robotpkg
@Idate96 Idate96 requested review from Mayankm96 and removed request for Mayankm96 December 16, 2025 07:42
@Idate96 Idate96 changed the title Ros2 ros2 Dec 16, 2025
- Add rclcpp::init/shutdown to ballbotIntegrationTest (required for ROS2)
- Document resetMpcNode() must be called before node spins (deadlock risk)
- Remove redundant prefix="" from launch file
- Remove commented-out executor code
Pinocchio frame Jacobians are 6 x nv; allocating with nq breaks when nq!=nv (e.g. free-flyer or composite joints).\n\nUse model.nv consistently and add a regression test with nq!=nv.
@Idate96
Copy link
Contributor Author

Idate96 commented Dec 16, 2025

We keep the PR open so CI, run on future updates of the branch

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.

2 participants