rosros

Simple unified interface to ROS1 / ROS2 Python API

Index
Installation
Using pip
Using catkin
Using colcon
Dependencies
Example usage
ROS core functionality
ROS API helpers
Converting an existing package

API documentation
View the Project on GitHub suurjaak/rosros

Installation

rosros is written in Python.

Developed and tested under ROS1 noetic and ROS2 foxy,
it should also work in later ROS2 versions.

Using pip

pip install rosros

This will make the rosros library available to Python packages.

Requires ROS Python packages
(ROS1: rospy, roslib, rosbag, rosservice, genpy;
ROS2: rclpy, rosidl_parser, rosidl_runtime_py, builtin_interfaces).

Using catkin

In a ROS1 workspace, under the source directory:

git clone https://github.com/suurjaak/rosros.git
cd rosros
catkin build --this

This will make the rosros library available in the ROS1 workspace.

Using colcon

In a ROS2 workspace, at the workspace root:

git clone https://github.com/suurjaak/rosros.git src/rosros
colcon build --packages-select rosros

This will make the rosros library available in the ROS2 workspace.

Dependencies

rosros requires Python 3.8+, and the following 3rd-party Python packages: Optional, ROS2 test dependencies: Optional, for generating API documentation: