ROS 2 node for the OSL (knee & ankle) — opensourceleg-ros2

Hi everyone,

As said yesterday, I’d like to share opensourceleg-ros2, a ROS 2 package for controlling and monitoring the OSL from a ROS 2 ecosystem. It’s built on top of the opensourceleg Python library and runs on the Raspberry Pi.

What it does

  • One node per joint: ros2 run osl_node knee or ros2 run osl_node ankle (you can run both at the same time)
  • Publishes joint kinematics and motor info (<joint>/joint_kinematic, <joint>/motor_info)
  • Accepts position targets and joint impedance commands (<joint>/position_control, <joint>/impedance_control)
  • Services to enable the interface and switch between MANUAL and TRACKING control modes
  • Actions for homing and go-to-position
  • Custom messages, services, and actions in a separate osl_interface package, so a remote computer only needs that package to talk to the leg

The README also covers running the leg from another machine, including a Fast DDS discovery-server setup for networks where multicast doesn’t work.

Where it has been used

Status: It requires OSL v2 hardware and Python 3.11+. It has only been tested on ROS 2 Rolling so far, so feedback from people on Jazzy or Kilted would be very welcome.

Issues, PRs, and feature requests are welcome. I’m also happy to hear how you would use it or what’s missing for your setup. I may continue working on that package to improve it !