This repository contains the official implementation of D. Wildgrube Bertol, G. Fink, M. Marchitto, Y. Nisticò, M. Pestarino, and C. Semini, “DLS2: A distributed microcomponent-based robotic software architecture”, which is currently under review.
It provides a reusable, buildable base for DLS2 robot control applications. It brings together the DLS2 framework, the Robotlib robot interface, the pinocchio-gluecode, RViz visualization support, and a ROS 2 interface for shared message definitions and network settings.
This project is currently in pre-release and under active development.
| Component | Path | Description |
|---|---|---|
| DLS2 Framework | dls2/ |
Core control middleware. Contains modules for control, state estimation, messaging (DDS/IDL), plugins, state machines, signal handling, logging, and utilities. |
| Robotlib | robotlib/ |
Generic C++ robot abstraction layer. Provides a common API (kinematics, dynamics, Jacobians, data structures) that controllers target, independent of any specific robot morphology. Uses a factory pattern with dlopen for runtime-loadable robot libraries. |
| GlueCode | pinocchio-gluecode/ |
Robot-specific implementation of the Robotlib interface based on Pinocchio. Loaded at runtime as a shared library. |
| RViz Interface | visualizers/rviz_interface/ |
Visualization support for RViz. |
| ROS 2 Interface | dls2_ros2_interface/ |
Bidirectional message bridge between DLS2 IDL definitions and ROS 2 .msg types. Provides tooling to convert .idl ↔ .msg and scripts to configure FastDDS discovery so ROS 2 and DLS2 communicate over the same DDS domain. |
To generate the documentation:
cd dls2-barebone
doxygen docs/DoxifileTo open the documentation double click on the file build/html/index.html.
You can pull the docker image with the following command:
docker pull ghcr.io/iit-dlslab/dls2-dev:latestmkdir dls_ws
cd dls_ws
git clone --recursive https://github.com/iit-DLSLab/dls2-barebone.gitdocker run -it --rm \
--name dls_container \
--hostname docker \
--gpus all \
--privileged \
--network host \
-e DISPLAY="$DISPLAY" \
-e DLS=2 \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v "$PWD:$PWD" \
-w "$PWD" \
ghcr.io/iit-dlslab/dls2-dev:latest \
/bin/bashRemember that to attach another terminal to the already running container you can do
docker exec -it dls_container /bin/bashcd dls2-barebone
mkdir build && cd build
cmake ..
make
sudo make installThe first compilation takes a bit of time because it needs to compile all the messages (the ROS2 default ones and the DLS2 ones).
To run a simple node example follow these steps:
-
open a shell, run the container and build the code as explained in the "Open docker image" and "Build" sections above.
-
Run the fastdds servers and the supervisor
dls --servers --super
-
open a second terminal, launch the console:
docker exec -it dls_container /bin/bashdls -lconsole
-
load the
hello_world_pluginSupervisor::loadPeriodicAppPlugin hello_world_plugin
and activate the plugin typing:
hello_world_plugin::activate
You will see a dummy print in the terminal where you have launched the Supervisor.
-
unload the
hello_world_pluginSupervisor::unloadPeriodicAppPlugin hello_world_plugin
-
stop DLS2 with
CTRL-Cin any of the terminal
Feel free to open issues and/or PRs!
- Integrated and ready-to-go examples with state estimator (MUSE) coming soon
This repository is mantained by Marco Marchitto and Michele Pestarino.