Skip to content

Commit 9689966

Browse files
authored
Merge pull request #22 from iit-DLSLab/open_source_cosmetics
Open source cosmetics 💄
2 parents c7df4e6 + 7d3b5c8 commit 9689966

5 files changed

Lines changed: 59 additions & 28 deletions

File tree

README.md

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,42 @@ doxygen docs/Doxifile
2828
To 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
5169
mkdir build && cd build
@@ -55,11 +73,34 @@ sudo make install
5573
```
5674
The 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
62100
Feel 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
65106
This repository is mantained by [Marco Marchitto](https://github.com/MMarcus95) and [Michele Pestarino](https://github.com/mich-pest).

build.bash

Lines changed: 0 additions & 5 deletions
This file was deleted.

clean_build.bash

Lines changed: 0 additions & 8 deletions
This file was deleted.

visualizers/rviz_interface/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ add_compile_options("-std=c++2a")
66

77
find_package(fastcdr 2 REQUIRED)
88
find_package(fastdds 3 REQUIRED)
9-
find_package(dls_messages REQUIRED)
9+
if (NOT TARGET dls_messages)
10+
find_package(dls_messages REQUIRED)
11+
endif()
12+
1013

1114
if(DEFINED DLS_MESSAGE_FOLDER)
1215
list(APPEND CMAKE_MODULE_PATH "${DLS_MESSAGE_FOLDER}/cmake")

0 commit comments

Comments
 (0)