Integrating SageMotion with ROS

Note

This article assumes that are already familiar with the SageMotion Web API, and are comfortable making simple nodes in ROS.

Integrating the SageMotion system with ROS will utilize the SageMotion web API. The web API allows complete control of the SageMotion system using language agnostic http commands. A reference for web API commands can be found here and a basic tutorial on usage can be found here.

In this integration example, ROS2 is operating on an independent computation platform with several nodes. The SageMotion Hub is shown on the left.

../_images/ros_integration.png

In order to control the SageMotion system and process realtime data from the ROS2 system, you must:

  1. Create an ethernet connection between the SageMotion Hub and ROS2 computer. This can be done by connecting the included ethernet-to-usb adapter with the ethernet cable plugged into the hub and usb plugged into the ROS2 computer. Once this is done, the SageMotion system will be accessible via the ip address 192.168.137.1.

  2. Create a new node on the ROS2 system. Several tutorials doing this can be found on the ROS2 website.

  3. Use an http library inside your ROS node to control the SageMotion hub over ethernet. This tutorial demonstrates doing this using the Python language and the Requests http library. Other languages or libraries can be used to exercise the same web API.