Skip to content

eProsima/Fast-DDS-python

Repository files navigation

Python binding for Fast DDS

License Releases Issues Forks Stars Fast DDS Python Ubuntu CI (nightly) Fast DDS Python Windows CI (nightly)

eProsima Fast DDS Python is a Python binding for the eProsima Fast DDS C++ library. This is a work in progress, but ultimately the goal is having the complete Fast DDS API available in Python. Two packages are available in this repository: the proper Python binding, fastdds_python, and the examples, fastdds_python_examples.

Installation guide

This tutorial shows how to build Fast DDS Python using colcon, a command line tool to build sets of software packages. To do so, colcon and vcstool need to be installed:

pip install -U colcon-common-extensions vcstool

Dependencies

Fast DDS Python depends on Fast DDS and Fast CDR. For simplicity, this tutorial will build these dependencies alongside the binding itself. More advanced users can build or link to this packages separately.

Install Fast DDS dependencies running:

sudo apt update
sudo apt install -y \
    libasio-dev \
    libtinyxml2-dev

Additionally, Fast DDS Python also depends on SWIG 4.0 and python3-dev. Install these dependencies running:

sudo apt update
sudo apt install -y \
    swig \
    libpython3-dev

Build and install

# Change directory to the location where the colcon workspace will be created
cd <path_to_ws>
# Create workspace directory
mkdir -p fastdds_python_ws/src
cd fastdds_python_ws
# Get workspace setup file
wget https://raw.githubusercontent.com/eProsima/Fast-DDS-python/main/fastdds_python.repos
# Download repositories
vcs import src < fastdds_python.repos
# Build the workspace
colcon build

Please, refer to colcon documentation for more information, such as building only one of the packages.

Python example

Fast DDS documentation includes a first publisher-subscriber application using Python. Please refer to this section for more information.