robotics-science

swift-ros2 3.0 ships stable native Swift client for ROS 2 with RCL backend

Key Takeaway

swift-ros2 3.0.0 is the first stable release of the native Swift ROS 2 client library, built on upstream rcl with prebuilt Apple frameworks and verified against Humble through Lyrical.

Summary

swift-ros2 3.0.0 consolidates the project into three packages under a new GitHub organization. The runtime now defaults to upstream rcl on Apple platforms, falling back to a pure-Swift wire implementation only where rcl is unavailable. Generated common_interfaces and full action/service support with type-hash-based wire interop are included. The library supports iOS 16+, macOS 13+, visionOS, Linux, Windows, and Android.

What's in swift-ros2 3.0

  • Three packages: swift-ros2-rosidl 1.0.0 (XCDR v1 codec, generator with SwiftPM plugin), swift-ros2 3.0.0 (runtime: ROS2Context, nodes, pub/sub, services, actions, parameters), swift-ros2-common-interfaces 1.0.0 (std_msgs, geometry_msgs, sensor_msgs, nav_msgs, tf2_msgs, etc. generated from IDL)
  • Backend architecture: RCL backend using rmw_zenoh_cpp or rmw_cyclonedds_cpp on Apple (prebuilt xcframeworks) and Linux (system ROS 2 install); pure-Swift wire fallback for Android, Windows, and Humble hosts
  • Wire interop: Service and action type hashes match upstream; Zenoh nodes announce with GID per publisher/client; DDS nodes visible via ros_discovery_info; late-joining action clients receive current status
  • Platform coverage: iOS/iPadOS 16+, macOS 13+, Mac Catalyst, visionOS, Ubuntu 22.04/24.04 (x86_64, aarch64), Windows 10/11, Android API 28+ (Zenoh only)
  • Verified against: ROS 2 Humble, Jazzy, Kilted, Lyrical over both Zenoh and DDS

Why it matters

The library removes the need for bridges or cross-compiled rcl when building ROS 2-aware Swift apps for Apple platforms, lowering the barrier for mobile and visionOS robotics tooling. The pure-Swift fallback preserves portability to Android and Windows where full ROS 2 installs are impractical.

Original reference: discourse.openrobotics.org →

Ask AI & Compare Archive