Skip to content

ROBOTIS-GIT/ros2xrcedds

Repository files navigation

ros2xrcedds

This is a library for communicating with ros2 and XRCEDDS.

It is used in ros2arduino, and is an intermediate library created for easy adaptation to other baremetal platforms.

Currently the only free XRCEDDS library available is MicroXRCEDDS.

It is open source and does not guarantee it. For those who want to use it, briefly write down how to create a library for different platforms based on this library as shown below.


UXR related usage

Added user config file (.h file)

MicroXRCEDDS includes the following config.h file.

#include <ucdr/config.h>
#include <uxr/client/config.h>

Therefore, it is necessary to create this file. The format of this file(config.h.in) exists in the following location.

xrcedds/micro_xrce_dds/lib/thirdparty/microcdr/include/ucdr/
xrcedds/micro_xrce_dds/lib/include/uxr/client/

You can create a config.h file in this location, or create it elsewhere (see ros2arduino)

Define functions for your system for baremetal.

Time

For baremetal, you need to define the function below. This function should be used to measure and return milliseconds with the device's timer.

extern "C" uint32_t dds_getMilliseconds (void);

For example, in the case of ros2arduino, it is defined as follows.

extern "C" uint32_t dds_getMilliseconds (void)
{
  return millis();
}

Transport

You must define functions for baremetal transport layer. To do this, you need to define the functions declared in the second group header files(*_internal) below using the structure in the first group header files(*_baremetal) below.


In this regard, please refer to ros2arduino.

About

ROS2 library using XRCE-DDS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published