diff --git a/README.md b/README.md index 951e580..be915d4 100644 --- a/README.md +++ b/README.md @@ -28,24 +28,42 @@ doxygen docs/Doxifile To open the documentation double click on the file build/html/index.html. # Installation -## Pull or build docker image -You can either pull the docker image `ghcr.io/iit-dlslab/dls2-dev:latest` or you can build it from scratch. -### Pulling +## Pull the docker image +You can pull the docker image with the following command: -```docker pull ghcr.io/iit-dlslab/dls2-dev:latest``` - -### Building - TODO +```bash +docker pull ghcr.io/iit-dlslab/dls2-dev:latest +``` ## Clone repository ```bash -git clone --recursive https://github.com/iit-DLSLab/dls2-barebone.git -cd dls2-barebone +mkdir dls_ws +cd dls_ws +git clone --init --recursive https://github.com/iit-DLSLab/dls2-barebone.git ``` -## Open docker image - TODO +## Open docker image ```bash -docker run -cd dls2-barebone +docker 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/bash ``` + +## Attach to running container + +```bash +docker exec -it dls_container /bin/bash +``` + ## Build ```bash mkdir build && cd build @@ -55,11 +73,34 @@ sudo make install ``` The first compilation takes a bit of time because it needs to compile all the messages (the ROS2 default ones and the DLS2 ones). -# Run example - TODO -To run an example, you can have a look at this repo, where a ready-to-use framework is provided for quadruped locomotion. +# Run example +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. +```bash +dls --servers --super +``` +* open a second terminal, launch the console: +```bash +docker exec -it dls_container /bin/bash +``` +```bash +dls -lconsole +``` +load the `hello_world_plugin` +```bash +Supervisor::loadPeriodicAppPlugin hello_world_plugin +``` +and activate the plugin typing: +```bash +hello_world_plugin::activate +``` # Contributing Feel free to open issues and/or PRs! +# TODOs: +* Integrated and ready-to-go examples with state estimator ([MUSE](https://github.com/iit-DLSLab/muse)) coming soon + # Mantainers This repository is mantained by [Marco Marchitto](https://github.com/MMarcus95) and [Michele Pestarino](https://github.com/mich-pest). \ No newline at end of file diff --git a/build.bash b/build.bash deleted file mode 100755 index de09b0e..0000000 --- a/build.bash +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd build -make -j14 -cd .. diff --git a/clean_build.bash b/clean_build.bash deleted file mode 100755 index d11c9c7..0000000 --- a/clean_build.bash +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -clear -sudo rm -r ./build/* -cd build -cmake .. -make -j14 -cd .. diff --git a/dls2 b/dls2 index f761a76..cc2f173 160000 --- a/dls2 +++ b/dls2 @@ -1 +1 @@ -Subproject commit f761a7698fcb1da3e71fa37f3c98eeb704b338b2 +Subproject commit cc2f173aeb502a3d02416f8ddcb40fa765198bb8 diff --git a/visualizers/rviz_interface/CMakeLists.txt b/visualizers/rviz_interface/CMakeLists.txt index 36cee33..ff36ab7 100644 --- a/visualizers/rviz_interface/CMakeLists.txt +++ b/visualizers/rviz_interface/CMakeLists.txt @@ -6,7 +6,10 @@ add_compile_options("-std=c++2a") find_package(fastcdr 2 REQUIRED) find_package(fastdds 3 REQUIRED) -find_package(dls_messages REQUIRED) +if (NOT TARGET dls_messages) + find_package(dls_messages REQUIRED) +endif() + if(DEFINED DLS_MESSAGE_FOLDER) list(APPEND CMAKE_MODULE_PATH "${DLS_MESSAGE_FOLDER}/cmake")