@@ -28,24 +28,42 @@ doxygen docs/Doxifile
2828To open the documentation double click on the file build/html/index.html.
2929
3030# Installation
31- ## Pull or build docker image
32- You can either pull the docker image ` ghcr.io/iit-dlslab/dls2-dev:latest ` or you can build it from scratch.
33- ### Pulling
31+ ## Pull the docker image
32+ You can pull the docker image with the following command:
3433
35- ``` docker pull ghcr.io/iit-dlslab/dls2-dev:latest ```
36-
37- ### Building - TODO
34+ ``` bash
35+ docker pull ghcr.io/iit-dlslab/dls2-dev:latest
36+ ```
3837
3938## Clone repository
4039``` bash
41- git clone --recursive https://github.com/iit-DLSLab/dls2-barebone.git
42- cd dls2-barebone
40+ mkdir dls_ws
41+ cd dls_ws
42+ git clone --init --recursive https://github.com/iit-DLSLab/dls2-barebone.git
4343```
44- ## Open docker image - TODO
44+ ## Open docker image
4545``` bash
46- docker run
47- cd dls2-barebone
46+ docker run -it --rm \
47+ --name dls_container \
48+ --hostname docker \
49+ --gpus all \
50+ --privileged \
51+ --network host \
52+ -e DISPLAY=" $DISPLAY " \
53+ -e DLS=2 \
54+ -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
55+ -v " $PWD :$PWD " \
56+ -w " $PWD " \
57+ ghcr.io/iit-dlslab/dls2-dev:latest \
58+ /bin/bash
4859```
60+
61+ ## Attach to running container
62+
63+ ``` bash
64+ docker exec -it dls_container /bin/bash
65+ ```
66+
4967## Build
5068``` bash
5169mkdir build && cd build
@@ -55,11 +73,34 @@ sudo make install
5573```
5674The first compilation takes a bit of time because it needs to compile all the messages (the ROS2 default ones and the DLS2 ones).
5775
58- # Run example - TODO
59- To run an example, you can have a look at this repo, where a ready-to-use framework is provided for quadruped locomotion.
76+ # Run example
77+ To run a simple node example follow these steps:
78+
79+ * open a shell, run the container and build the code as explained in the "Open docker image" and "Build" sections above.
80+ ``` bash
81+ dls --servers --super
82+ ```
83+ * open a second terminal, launch the console:
84+ ``` bash
85+ docker exec -it dls_container /bin/bash
86+ ```
87+ ``` bash
88+ dls -lconsole
89+ ```
90+ load the ` hello_world_plugin `
91+ ``` bash
92+ Supervisor::loadPeriodicAppPlugin hello_world_plugin
93+ ```
94+ and activate the plugin typing:
95+ ``` bash
96+ hello_world_plugin::activate
97+ ```
6098
6199# Contributing
62100Feel free to open issues and/or PRs!
63101
102+ # TODOs:
103+ * Integrated and ready-to-go examples with state estimator ([ MUSE] ( https://github.com/iit-DLSLab/muse ) ) coming soon
104+
64105# Mantainers
65106This repository is mantained by [ Marco Marchitto] ( https://github.com/MMarcus95 ) and [ Michele Pestarino] ( https://github.com/mich-pest ) .
0 commit comments