From f460d4c19db359088d91b7c70a3acdd453f1afb8 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Mon, 9 Sep 2024 19:48:42 +0200 Subject: [PATCH 01/31] freisa_on_mars: Create README.md --- freisa_on_mars/README.md | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 freisa_on_mars/README.md diff --git a/freisa_on_mars/README.md b/freisa_on_mars/README.md new file mode 100644 index 00000000..5a86d350 --- /dev/null +++ b/freisa_on_mars/README.md @@ -0,0 +1,71 @@ +# FREISA Robot Dog with Space ROS Mars Rover Demo + +## Introduction + +This demo integrates the simulation of the [FREISA Robot Dog](https://github.com/B-AROL-O/FREISA) (based on the [Mini Pupper 2 Pro](https://www.kickstarter.com/projects/mdrobotkits/md-robot-kits-open-source-support-your-genai-creativity) by [MangDang (HK) Limited](https://mangdang.store/)) inside the [Space ROS Mars Rover demo](https://space-ros.github.io/docs/rolling/Demos.html). + +This code is a part of the following challenge: + +* Challenge Name: NASA Space ROS Sim Summer Sprint Challenge +* Team Lead Freelancer Username: [@gmacario](https://www.freelancer.com/u/gmacario) +* Submission Title: Integrate FREISA Robot Dog with Space ROS Mars Rover Demo + + + + + + + + + + + +## Added bonus + +The proposed feature is only dealing with the integration of the [Mini Pupper 2](https://github.com/mangdangroboticsclub) robot inside Space ROS demo. +However, once the PR is merged, as an added bonus it should be possible to instantiate in the Space ROS Demo any of the quadruped robots supported by [CHAMP](https://github.com/chvmp/champ): + +![champ](https://raw.githubusercontent.com/chvmp/champ/master/docs/images/robots.gif) + +## Authors + +The FREISA Robot Dog with Space ROS Mars Rover Demo is another fine project by [the B-AROL-O Team](https://github.com/B-AROL-O) - a group of friends who in their spare time enjoy creating fun projects with Robotics, Computer Vision and [LEGO®](https://www.lego.com/). + +Everything we do - both hardware and software - is Open Source and [shared on GitHub](https://github.com/B-AROL-O). + +Our projects have been awarded several prizes in worldwide competitions on Computer Vision and robotics. +As an example, project "[Four-legged Robot Ensuring Intelligent Sprinkler Automation](https://www.hackster.io/projects/845012)" (a.k.a. [FREISA](https://github.com/B-AROL-O/FREISA)) - was the Grand Prize Winner 🥇 of the [OpenCV AI Competition 2023](https://www.hackster.io/contests/opencv-ai-competition-2023) with [OpenCV](https://www.hackster.io/opencv), [Khadas](https://www.hackster.io/khadas) and [Seeed Studio](https://www.hackster.io/seeed). + +[![OpenCV AI Competition 2023 Grand Prize Winners - OpenCV Live 126](https://img.youtube.com/vi/iUe4N7yvpmA/0.jpg)](https://www.youtube.com/watch?v=iUe4N7yvpmA "OpenCV AI Competition 2023 Grand Prize Winners - OpenCV Live 126") + +### How to get in touch + +You can reach out to us through the following platforms: + +* [![Instagram](https://img.icons8.com/small/16/000000/instagram-new.png)](https://instagram.com/baroloteam) Instagram: [@baroloteam](https://instagram.com/baroloteam) + +* [![Twitter](https://img.icons8.com/small/16/000000/twitter.png)](https://x.com/baroloteam) X: [@baroloteam]() + +* [![GitHub](https://img.icons8.com/small/16/000000/github.png)](https://github.com/B-AROL-O) GitHub: [B-AROL-O](https://github.com/B-AROL-O) + + From 3b65bd416d0144981a9dbb9d43a761234131a762 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 08:07:40 +0200 Subject: [PATCH 02/31] Add Dev Container configuration files Created with the help of VSCode wizard Signed-off-by: Gianpaolo Macario --- .devcontainer/devcontainer.json | 25 +++++++++++++++++++++++++ .github/dependabot.yml | 12 ++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/dependabot.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..98ce1bab --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu +{ + "name": "Ubuntu", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:jammy", + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": {} + } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..f33a02cd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for more information: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://containers.dev/guide/dependabot + +version: 2 +updates: + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: weekly From 0438cd667bd8520e903c7c18ed92b0bfc5fb9281 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 08:09:04 +0200 Subject: [PATCH 03/31] Add VSCode Extension: Git Graph Signed-off-by: Gianpaolo Macario --- .devcontainer/devcontainer.json | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 98ce1bab..4a06e5bf 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,12 +4,11 @@ "name": "Ubuntu", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile "image": "mcr.microsoft.com/devcontainers/base:jammy", - "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": {} - } // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": {} + }, // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], @@ -18,7 +17,13 @@ // "postCreateCommand": "uname -a", // Configure tool-specific properties. - // "customizations": {}, + "customizations": { + "vscode": { + "extensions": [ + "mhutchie.git-graph" + ] + } + } // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" From 68a21f4afe48d3dbbaeeb6a1d65d103c01120536 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 08:09:52 +0200 Subject: [PATCH 04/31] Add VSCode Extension: SpaceRos Dashboard Signed-off-by: Gianpaolo Macario --- .devcontainer/devcontainer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4a06e5bf..b8c1eedb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -20,7 +20,8 @@ "customizations": { "vscode": { "extensions": [ - "mhutchie.git-graph" + "mhutchie.git-graph", + "openrobotics.spaceros-dashboard" ] } } From 071b4df93fb565fedb1d722c5532635796b9df25 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Mon, 9 Sep 2024 19:48:42 +0200 Subject: [PATCH 05/31] freisa_on_mars: Create README.md --- freisa_on_mars/README.md | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 freisa_on_mars/README.md diff --git a/freisa_on_mars/README.md b/freisa_on_mars/README.md new file mode 100644 index 00000000..5a86d350 --- /dev/null +++ b/freisa_on_mars/README.md @@ -0,0 +1,71 @@ +# FREISA Robot Dog with Space ROS Mars Rover Demo + +## Introduction + +This demo integrates the simulation of the [FREISA Robot Dog](https://github.com/B-AROL-O/FREISA) (based on the [Mini Pupper 2 Pro](https://www.kickstarter.com/projects/mdrobotkits/md-robot-kits-open-source-support-your-genai-creativity) by [MangDang (HK) Limited](https://mangdang.store/)) inside the [Space ROS Mars Rover demo](https://space-ros.github.io/docs/rolling/Demos.html). + +This code is a part of the following challenge: + +* Challenge Name: NASA Space ROS Sim Summer Sprint Challenge +* Team Lead Freelancer Username: [@gmacario](https://www.freelancer.com/u/gmacario) +* Submission Title: Integrate FREISA Robot Dog with Space ROS Mars Rover Demo + + + + + + + + + + + +## Added bonus + +The proposed feature is only dealing with the integration of the [Mini Pupper 2](https://github.com/mangdangroboticsclub) robot inside Space ROS demo. +However, once the PR is merged, as an added bonus it should be possible to instantiate in the Space ROS Demo any of the quadruped robots supported by [CHAMP](https://github.com/chvmp/champ): + +![champ](https://raw.githubusercontent.com/chvmp/champ/master/docs/images/robots.gif) + +## Authors + +The FREISA Robot Dog with Space ROS Mars Rover Demo is another fine project by [the B-AROL-O Team](https://github.com/B-AROL-O) - a group of friends who in their spare time enjoy creating fun projects with Robotics, Computer Vision and [LEGO®](https://www.lego.com/). + +Everything we do - both hardware and software - is Open Source and [shared on GitHub](https://github.com/B-AROL-O). + +Our projects have been awarded several prizes in worldwide competitions on Computer Vision and robotics. +As an example, project "[Four-legged Robot Ensuring Intelligent Sprinkler Automation](https://www.hackster.io/projects/845012)" (a.k.a. [FREISA](https://github.com/B-AROL-O/FREISA)) - was the Grand Prize Winner 🥇 of the [OpenCV AI Competition 2023](https://www.hackster.io/contests/opencv-ai-competition-2023) with [OpenCV](https://www.hackster.io/opencv), [Khadas](https://www.hackster.io/khadas) and [Seeed Studio](https://www.hackster.io/seeed). + +[![OpenCV AI Competition 2023 Grand Prize Winners - OpenCV Live 126](https://img.youtube.com/vi/iUe4N7yvpmA/0.jpg)](https://www.youtube.com/watch?v=iUe4N7yvpmA "OpenCV AI Competition 2023 Grand Prize Winners - OpenCV Live 126") + +### How to get in touch + +You can reach out to us through the following platforms: + +* [![Instagram](https://img.icons8.com/small/16/000000/instagram-new.png)](https://instagram.com/baroloteam) Instagram: [@baroloteam](https://instagram.com/baroloteam) + +* [![Twitter](https://img.icons8.com/small/16/000000/twitter.png)](https://x.com/baroloteam) X: [@baroloteam]() + +* [![GitHub](https://img.icons8.com/small/16/000000/github.png)](https://github.com/B-AROL-O) GitHub: [B-AROL-O](https://github.com/B-AROL-O) + + From f5850abbc5f8cf8b4853fb137102a297ebc1bf28 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 00:11:36 +0200 Subject: [PATCH 06/31] freisa_on_mars: Create Dockerfile Use osrf/space-ros:latest as base image --- freisa_on_mars/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 freisa_on_mars/Dockerfile diff --git a/freisa_on_mars/Dockerfile b/freisa_on_mars/Dockerfile new file mode 100644 index 00000000..e3a5efac --- /dev/null +++ b/freisa_on_mars/Dockerfile @@ -0,0 +1,7 @@ +# freisa_on_mars/Dockerfile + +FROM osrf/space-ros:latest + +# TODO + +# EOF From 3b3d5a3da36bad6831aaccd88d39bb778f904677 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 00:13:01 +0200 Subject: [PATCH 07/31] freisa_on_mars: Create build.sh Copied from https://github.com/space-ros/docker/tree/main/space_robots --- freisa_on_mars/build.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 freisa_on_mars/build.sh diff --git a/freisa_on_mars/build.sh b/freisa_on_mars/build.sh new file mode 100644 index 00000000..68f79d1e --- /dev/null +++ b/freisa_on_mars/build.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +ORG=openrobotics +IMAGE=space_robots_demo +TAG=latest + +VCS_REF="" +VERSION=preview + +# Exit script with failure if build fails +set -eo pipefail + +echo "" +echo "##### Building Space ROS Demo Docker Image #####" +echo "" + +docker build -t $ORG/$IMAGE:$TAG \ + --build-arg VCS_REF="$VCS_REF" \ + --build-arg VERSION="$VERSION" . + +echo "" +echo "##### Done! #####" From 2dc4a9cb6e5460e0438b4be75356a3f8ad795990 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 00:14:12 +0200 Subject: [PATCH 08/31] freisa_on_mars: Create run.sh Copied from https://github.com/space-ros/docker/tree/main/space_robots --- freisa_on_mars/run.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 freisa_on_mars/run.sh diff --git a/freisa_on_mars/run.sh b/freisa_on_mars/run.sh new file mode 100644 index 00000000..2737adbb --- /dev/null +++ b/freisa_on_mars/run.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Runs a docker container with the image created by build.bash +# Requires: +# docker +# an X server + +IMG_NAME=openrobotics/space_robots_demo + +# Replace `/` with `_` to comply with docker container naming +# And append `_runtime` +CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" + +# Start the container +docker run --rm -it --name $CONTAINER_NAME --network host \ + -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME \ No newline at end of file From fab4d016cd3d3e7a1798cdf08b6a2797d86a37b6 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 00:15:51 +0200 Subject: [PATCH 09/31] Update IMG_NAME=baroloteam/freisa_on_mars:latest --- freisa_on_mars/build.sh | 6 ++++-- freisa_on_mars/run.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/freisa_on_mars/build.sh b/freisa_on_mars/build.sh index 68f79d1e..9eaa4e25 100644 --- a/freisa_on_mars/build.sh +++ b/freisa_on_mars/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -ORG=openrobotics -IMAGE=space_robots_demo +ORG=baroloteam +IMAGE=freisa_on_mars TAG=latest VCS_REF="" @@ -20,3 +20,5 @@ docker build -t $ORG/$IMAGE:$TAG \ echo "" echo "##### Done! #####" + +# EOF diff --git a/freisa_on_mars/run.sh b/freisa_on_mars/run.sh index 2737adbb..82ecb99b 100644 --- a/freisa_on_mars/run.sh +++ b/freisa_on_mars/run.sh @@ -5,7 +5,7 @@ # docker # an X server -IMG_NAME=openrobotics/space_robots_demo +IMG_NAME=baroloteam/freisa_on_mars # Replace `/` with `_` to comply with docker container naming # And append `_runtime` @@ -13,4 +13,6 @@ CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" # Start the container docker run --rm -it --name $CONTAINER_NAME --network host \ - -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME \ No newline at end of file + -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME + +# EOF From 2a2c19338378a55dd4560fa1c727fe5723c417b6 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Mon, 9 Sep 2024 22:23:30 +0000 Subject: [PATCH 10/31] Change file mode Signed-off-by: Gianpaolo Macario --- freisa_on_mars/build.sh | 0 freisa_on_mars/run.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 freisa_on_mars/build.sh mode change 100644 => 100755 freisa_on_mars/run.sh diff --git a/freisa_on_mars/build.sh b/freisa_on_mars/build.sh old mode 100644 new mode 100755 diff --git a/freisa_on_mars/run.sh b/freisa_on_mars/run.sh old mode 100644 new mode 100755 From be44f79ae1558641b67678262afcad2bc69f0846 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 08:26:02 +0000 Subject: [PATCH 11/31] freisa_on_mars: Add entrypoint.sh Copied from https://github.com/space-ros/docker/tree/main/space_robots Signed-off-by: Gianpaolo Macario --- freisa_on_mars/entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 freisa_on_mars/entrypoint.sh diff --git a/freisa_on_mars/entrypoint.sh b/freisa_on_mars/entrypoint.sh new file mode 100755 index 00000000..d1b51f26 --- /dev/null +++ b/freisa_on_mars/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +# Setup the Demo environment +source "${DEMO_DIR}/install/setup.bash" +exec "$@" From 0cf8406cf7b0c416077ba69eb9a8951ece80d900 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 08:45:26 +0000 Subject: [PATCH 12/31] freisa_on_mars: Add demo_manual_pkgs.repos Initial list, to be expanded Signed-off-by: Gianpaolo Macario --- freisa_on_mars/demo_manual_pkgs.repos | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 freisa_on_mars/demo_manual_pkgs.repos diff --git a/freisa_on_mars/demo_manual_pkgs.repos b/freisa_on_mars/demo_manual_pkgs.repos new file mode 100644 index 00000000..b8230efe --- /dev/null +++ b/freisa_on_mars/demo_manual_pkgs.repos @@ -0,0 +1,14 @@ +# demo_manual_pkgs.repos + +repositories: + demos: + type: git + # FIXME: Update url/version once is merged + # url: https://github.com/space-ros/demos.git + url: https://github.com/B-AROL-O/space-ros-demos.git + # version: main + # version: freisa_on_mars + version: dev-gmacario + # TODO + +# EOF From ef7c494dd59094586238ab538529b0043bc5b389 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 08:48:12 +0000 Subject: [PATCH 13/31] :Dockerfile: Add contents Adapted from https://github.com/space-ros/docker/blob/main/space_robots/Dockerfile Signed-off-by: Gianpaolo Macario --- freisa_on_mars/Dockerfile | 98 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 91 insertions(+), 7 deletions(-) diff --git a/freisa_on_mars/Dockerfile b/freisa_on_mars/Dockerfile index e3a5efac..408edecd 100644 --- a/freisa_on_mars/Dockerfile +++ b/freisa_on_mars/Dockerfile @@ -1,7 +1,91 @@ -# freisa_on_mars/Dockerfile - -FROM osrf/space-ros:latest - -# TODO - -# EOF +# freisa_on_mars/Dockerfile +# +# Adapted from https://github.com/space-ros/docker/blob/main/space_robots/Dockerfile + +FROM osrf/space-ros:latest +# FROM openrobotics/moveit2:latest + +# Define arguments used in the metadata definition +ARG VCS_REF +ARG VERSION="preview" + +# Specify the docker image metadata +LABEL org.label-schema.schema-version="1.0" +LABEL org.label-schema.name="FREISA meets Curiosity Rover" +LABEL org.label-schema.description="FREISA Robot Dog meets Curiosity rover demo on the Space ROS platform" +LABEL org.label-schema.vendor="B-AROL-O Team" +LABEL org.label-schema.version=${VERSION} +LABEL org.label-schema.url="https://github.com/space-ros" +LABEL org.label-schema.vcs-url="https://github.com/space-ros/demos" +LABEL org.label-schema.vcs-ref=${VCS_REF} + +# Define a few key variables +ENV DEMO_DIR=${HOME_DIR}/demos_ws +ENV IGNITION_VERSION fortress +ENV GZ_VERSION fortress + +# Disable prompting during package installation +ARG DEBIAN_FRONTEND=noninteractive + +# Get rosinstall_generator +# Using Docker BuildKit cache mounts for /var/cache/apt and /var/lib/apt ensures that +# the cache won't make it into the built image but will be maintained between steps. +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + sudo apt-get update -y && sudo apt-get install -y python3-rosinstall-generator + +# TODO(anyone): remove demo-pkgs.txt, no packages left after exclusions +# Generate repos file for demo dependencies, excluding packages from Space ROS core. +# COPY --chown=${USERNAME}:${USERNAME} demo-pkgs.txt /tmp/ +# COPY --chown=${USERNAME}:${USERNAME} excluded-pkgs.txt /tmp/ +# RUN rosinstall_generator \ +# --rosdistro ${ROSDISTRO} \ +# --deps \ +# --exclude-path ${SPACEROS_DIR}/src \ +# --exclude-path ${MOVEIT2_DIR}/src \ +# --exclude $(cat /tmp/excluded-pkgs.txt) -- \ +# -- $(cat /tmp/demo-pkgs.txt) \ +# > /tmp/demo_generated_pkgs.repos + +RUN mkdir -p ${DEMO_DIR}/src +WORKDIR ${DEMO_DIR} + + +# # Install libmongoc for development +# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ +# --mount=type=cache,target=/var/lib/apt,sharing=locked \ +# sudo apt-get install libmongoc-dev -y + +# # Compile mongo cxx driver https://mongocxx.org/mongocxx-v3/installation/linux/ +# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ +# --mount=type=cache,target=/var/lib/apt,sharing=locked \ +# sudo apt-get install libssl-dev build-essential devscripts debian-keyring fakeroot debhelper cmake libboost-dev libsasl2-dev libicu-dev libzstd-dev doxygen -y +# RUN wget https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.7/mongo-cxx-driver-r3.6.7.tar.gz +# RUN tar -xzf mongo-cxx-driver-r3.6.7.tar.gz +# RUN cd mongo-cxx-driver-r3.6.7/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local && sudo cmake --build . --target EP_mnmlstc_core && cmake --build . && sudo cmake --build . --target install + +# Get the source for the dependencies +# RUN vcs import src < /tmp/demo_generated_pkgs.repos +COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/ +RUN vcs import src < /tmp/demo_manual_pkgs.repos && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' + +# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ +# --mount=type=cache,target=/var/lib/apt,sharing=locked \ +# sudo apt-get update -y \ +# && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ +# && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ +# && rosdep install --from-paths src --ignore-src -r -y --rosdistro ${ROSDISTRO} + +# # Build the demo +# RUN /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash && source ${MOVEIT2_DIR}/install/setup.bash \ +# && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release' + +# # Add the user to the render group so that the user can access /dev/dri/renderD128 +# RUN sudo usermod -aG render $USERNAME + +# # Setup the entrypoint +# COPY ./entrypoint.sh / +# ENTRYPOINT ["/entrypoint.sh"] +# CMD ["bash"] + +# EOF From 24600d263508e6612a1b5f59ccc1cc2c89e47727 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 10:38:02 +0000 Subject: [PATCH 14/31] demo_manual_pkgs.repos: Add (commented) all upstream packages Signed-off-by: Gianpaolo Macario --- freisa_on_mars/demo_manual_pkgs.repos | 40 ++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/freisa_on_mars/demo_manual_pkgs.repos b/freisa_on_mars/demo_manual_pkgs.repos index b8230efe..cd26ea57 100644 --- a/freisa_on_mars/demo_manual_pkgs.repos +++ b/freisa_on_mars/demo_manual_pkgs.repos @@ -1,4 +1,6 @@ # demo_manual_pkgs.repos +# +# Adapted from https://github.com/space-ros/docker/blob/main/space_robots/demo_manual_pkgs.repos repositories: demos: @@ -9,6 +11,42 @@ repositories: # version: main # version: freisa_on_mars version: dev-gmacario - # TODO +# gz_ros2_control: +# type: git +# url: https://github.com/ros-controls/gz_ros2_control.git +# version: humble +# qt_gui_core: +# type: git +# url: https://github.com/ros-visualization/qt_gui_core.git +# version: humble +# ros2_controllers: +# type: git +# url: https://github.com/tonylitianyu/ros2_controllers.git +# version: effort_group_position_controller_2 +# actuator_msgs: +# type: git +# url: https://github.com/rudislabs/actuator_msgs.git +# version: main +# ros_gz: +# type: git +# url: https://github.com/gazebosim/ros_gz.git +# version: humble +# simulation: +# type: git +# url: https://github.com/space-ros/simulation.git +# version: main + ros-humble-warehouse-ros-mongo: + type: git + url: https://github.com/moveit/warehouse_ros_mongo.git + version: ros2 +# vision_msgs: +# type: git +# url: https://github.com/ros-perception/vision_msgs.git +# version: ros2 +# gps_msgs: +# type: git +# url: https://github.com/swri-robotics/gps_umd.git +# path: gps_msgs +# version: 113782d # EOF From b16135f90cec05f14cfe61696d3ca129fb5e2f8f Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 10:38:29 +0000 Subject: [PATCH 15/31] Install SPACEROS Signed-off-by: Gianpaolo Macario --- freisa_on_mars/Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/freisa_on_mars/Dockerfile b/freisa_on_mars/Dockerfile index 408edecd..4151ff99 100644 --- a/freisa_on_mars/Dockerfile +++ b/freisa_on_mars/Dockerfile @@ -69,12 +69,13 @@ WORKDIR ${DEMO_DIR} COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/ RUN vcs import src < /tmp/demo_manual_pkgs.repos && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' -# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ -# --mount=type=cache,target=/var/lib/apt,sharing=locked \ -# sudo apt-get update -y \ -# && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + sudo apt-get update -y \ +&& /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ +&& rosdep install --from-paths src --ignore-src -r -y --rosdistro ${ROSDISTRO} + # && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ -# && rosdep install --from-paths src --ignore-src -r -y --rosdistro ${ROSDISTRO} # # Build the demo # RUN /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash && source ${MOVEIT2_DIR}/install/setup.bash \ From adbbc2a7133d773d7de9ded9af81e13127c1cd42 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 12:52:48 +0200 Subject: [PATCH 16/31] demo_manual_pkgs.repos: Add some more comments Signed-off-by: Gianpaolo Macario --- freisa_on_mars/demo_manual_pkgs.repos | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/freisa_on_mars/demo_manual_pkgs.repos b/freisa_on_mars/demo_manual_pkgs.repos index cd26ea57..839b4a70 100644 --- a/freisa_on_mars/demo_manual_pkgs.repos +++ b/freisa_on_mars/demo_manual_pkgs.repos @@ -1,6 +1,4 @@ # demo_manual_pkgs.repos -# -# Adapted from https://github.com/space-ros/docker/blob/main/space_robots/demo_manual_pkgs.repos repositories: demos: @@ -11,6 +9,10 @@ repositories: # version: main # version: freisa_on_mars version: dev-gmacario + + # === Repositories used by space_robots === + # See https://github.com/space-ros/docker/blob/main/space_robots/demo_manual_pkgs.repos + # gz_ros2_control: # type: git # url: https://github.com/ros-controls/gz_ros2_control.git @@ -49,4 +51,7 @@ repositories: # path: gps_msgs # version: 113782d + # === Extra repositories required by freisa_on_mars === + # TODO + # EOF From e5838a29ac10f508fa36530dbea750c9669e3fd1 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 10:55:27 +0000 Subject: [PATCH 17/31] Use the new KeyValueFormat for ENV See https://docs.docker.com/reference/build-checks/legacy-key-value-format/ Signed-off-by: Gianpaolo Macario --- freisa_on_mars/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freisa_on_mars/Dockerfile b/freisa_on_mars/Dockerfile index 4151ff99..fb44b508 100644 --- a/freisa_on_mars/Dockerfile +++ b/freisa_on_mars/Dockerfile @@ -21,8 +21,8 @@ LABEL org.label-schema.vcs-ref=${VCS_REF} # Define a few key variables ENV DEMO_DIR=${HOME_DIR}/demos_ws -ENV IGNITION_VERSION fortress -ENV GZ_VERSION fortress +ENV IGNITION_VERSION=fortress +ENV GZ_VERSION=fortress # Disable prompting during package installation ARG DEBIAN_FRONTEND=noninteractive From 7bc25b90be0d6a438bf7eaba11fa9f14d3142f2c Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 11:43:35 +0000 Subject: [PATCH 18/31] Add mini_pupper_ros and its dependencies Signed-off-by: Gianpaolo Macario --- freisa_on_mars/demo_manual_pkgs.repos | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/freisa_on_mars/demo_manual_pkgs.repos b/freisa_on_mars/demo_manual_pkgs.repos index 839b4a70..0d299989 100644 --- a/freisa_on_mars/demo_manual_pkgs.repos +++ b/freisa_on_mars/demo_manual_pkgs.repos @@ -1,4 +1,6 @@ -# demo_manual_pkgs.repos +# freisa_on_mars/demo_manual_pkgs.repos +# +# Adapted from https://github.com/space-ros/docker/blob/main/space_robots repositories: demos: @@ -52,6 +54,23 @@ repositories: # version: 113782d # === Extra repositories required by freisa_on_mars === - # TODO + mini_pupper_ros: + type: git + url: https://github.com/B-AROL-O/mini_pupper_ros.git + version: ros2-dev + + # From https://github.com/B-AROL-O/mini_pupper_ros/blob/ros2-dev/.minipupper.repos + champ/champ: + type: git + url: https://github.com/mangdangroboticsclub/champ.git + version: ros2 + champ/champ_teleop: + type: git + url: https://github.com/chvmp/champ_teleop.git + version: ros2 + ldlidar_stl_ros: + type: git + url: https://github.com/ldrobotSensorTeam/ldlidar_stl_ros2.git + version: master # EOF From ac35d7cd69cfeaf9a3969be90509f7406eb289da Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 10 Sep 2024 21:00:41 +0200 Subject: [PATCH 19/31] freisa_on_mars/run.sh: Add more command-line options to docker run Signed-off-by: Gianpaolo Macario --- freisa_on_mars/run.sh | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/freisa_on_mars/run.sh b/freisa_on_mars/run.sh index 82ecb99b..6384987e 100755 --- a/freisa_on_mars/run.sh +++ b/freisa_on_mars/run.sh @@ -12,7 +12,32 @@ IMG_NAME=baroloteam/freisa_on_mars CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" # Start the container -docker run --rm -it --name $CONTAINER_NAME --network host \ - -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 $IMG_NAME +# +# --rm: delete container after exiting +# -it: Interactive TTY mode so you can use a shell. +# --network host: Does not isolate Docker container from host's network interfaces. +# Allows all traffic to pass through as if it originated from the host. +# In our case, useful for DDS traffic for ROS. +# -e DISPLAY: Pass the X11 display through to the container. +# -e TERM: Pass the kind of terminal being used through to the container. +# -e QT_X11_NO_MITSHM=1: Disables shared memory extension for Qt/X11, which does not work consistently inside a process namespace like a container. +# -v "$XAUTHORITY:/.Xauthority": the $XAUTHORITY environment variable on the host contains the path to a file that grants access to X11. +# We mount the path defined in that environment variable into the container at /.Xauthority. +# -e XAUTHORITY=/.Xauthority: We set $XAUTHORITY *inside* the container to the place we just mounted the Xauthority (/.Xauthority) +# +# Credits: +# * https://github.com/space-ros/docker/pull/168 +# * https://github.com/space-ros/docker/pull/175 +# +docker run --rm -it --name $CONTAINER_NAME \ + --network host \ + --volume=/tmp/.X11-unix:/tmp/.X11-unix \ + --device=/dev/dri:/dev/dri \ + --volume "$XAUTHORITY:/.Xauthority" \ + -e DISPLAY \ + -e TERM \ + -e QT_X11_NO_MITSHM=1 \ + -e XAUTHORITY=/.Xauthority \ + $IMG_NAME # EOF From 5cabf29b990faa0ccd222723ba5afb1fb7964a4f Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Wed, 11 Sep 2024 16:33:03 +0200 Subject: [PATCH 20/31] Uncomment all Repositories used by space_robots Still having troubles when doing 'colcon build', though Signed-off-by: Gianpaolo Macario --- freisa_on_mars/demo_manual_pkgs.repos | 67 ++++++++++++++------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/freisa_on_mars/demo_manual_pkgs.repos b/freisa_on_mars/demo_manual_pkgs.repos index 0d299989..f9c1a844 100644 --- a/freisa_on_mars/demo_manual_pkgs.repos +++ b/freisa_on_mars/demo_manual_pkgs.repos @@ -15,43 +15,43 @@ repositories: # === Repositories used by space_robots === # See https://github.com/space-ros/docker/blob/main/space_robots/demo_manual_pkgs.repos -# gz_ros2_control: -# type: git -# url: https://github.com/ros-controls/gz_ros2_control.git -# version: humble -# qt_gui_core: -# type: git -# url: https://github.com/ros-visualization/qt_gui_core.git -# version: humble -# ros2_controllers: -# type: git -# url: https://github.com/tonylitianyu/ros2_controllers.git -# version: effort_group_position_controller_2 -# actuator_msgs: -# type: git -# url: https://github.com/rudislabs/actuator_msgs.git -# version: main -# ros_gz: -# type: git -# url: https://github.com/gazebosim/ros_gz.git -# version: humble -# simulation: -# type: git -# url: https://github.com/space-ros/simulation.git -# version: main + gz_ros2_control: + type: git + url: https://github.com/ros-controls/gz_ros2_control.git + version: humble + qt_gui_core: + type: git + url: https://github.com/ros-visualization/qt_gui_core.git + version: humble + ros2_controllers: + type: git + url: https://github.com/tonylitianyu/ros2_controllers.git + version: effort_group_position_controller_2 + actuator_msgs: + type: git + url: https://github.com/rudislabs/actuator_msgs.git + version: main + ros_gz: + type: git + url: https://github.com/gazebosim/ros_gz.git + version: humble + simulation: + type: git + url: https://github.com/space-ros/simulation.git + version: main ros-humble-warehouse-ros-mongo: type: git url: https://github.com/moveit/warehouse_ros_mongo.git version: ros2 -# vision_msgs: -# type: git -# url: https://github.com/ros-perception/vision_msgs.git -# version: ros2 -# gps_msgs: -# type: git -# url: https://github.com/swri-robotics/gps_umd.git -# path: gps_msgs -# version: 113782d + vision_msgs: + type: git + url: https://github.com/ros-perception/vision_msgs.git + version: ros2 + gps_msgs: + type: git + url: https://github.com/swri-robotics/gps_umd.git + path: gps_msgs + version: 113782d # === Extra repositories required by freisa_on_mars === mini_pupper_ros: @@ -60,6 +60,7 @@ repositories: version: ros2-dev # From https://github.com/B-AROL-O/mini_pupper_ros/blob/ros2-dev/.minipupper.repos + # TODO: vcs import < mini_pupper_ros/.minipupper.repos --recursive champ/champ: type: git url: https://github.com/mangdangroboticsclub/champ.git From 64ac68a49f3be35350497c57b08abef492d6a166 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Wed, 11 Sep 2024 16:34:02 +0200 Subject: [PATCH 21/31] Temporarily comment out --volume="$XAUTHORITY:..." Signed-off-by: Gianpaolo Macario --- freisa_on_mars/run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freisa_on_mars/run.sh b/freisa_on_mars/run.sh index 6384987e..8147610e 100755 --- a/freisa_on_mars/run.sh +++ b/freisa_on_mars/run.sh @@ -33,11 +33,12 @@ docker run --rm -it --name $CONTAINER_NAME \ --network host \ --volume=/tmp/.X11-unix:/tmp/.X11-unix \ --device=/dev/dri:/dev/dri \ - --volume "$XAUTHORITY:/.Xauthority" \ -e DISPLAY \ -e TERM \ -e QT_X11_NO_MITSHM=1 \ -e XAUTHORITY=/.Xauthority \ $IMG_NAME +# --volume "$XAUTHORITY:/.Xauthority" \ + # EOF From 82929934c45f6065decd6ece5057a64d17586c93 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Fri, 13 Sep 2024 05:57:56 +0200 Subject: [PATCH 22/31] Sanity checks on environment variables Signed-off-by: Gianpaolo Macario --- freisa_on_mars/run.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/freisa_on_mars/run.sh b/freisa_on_mars/run.sh index 8147610e..7478817a 100755 --- a/freisa_on_mars/run.sh +++ b/freisa_on_mars/run.sh @@ -11,6 +11,21 @@ IMG_NAME=baroloteam/freisa_on_mars # And append `_runtime` CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" +# Sanity checks +if [ -z "$DISPLAY" ]; then + export DISPLAY=:0 + echo "Warning: DISPLAY undefined, set to $DISPLAY" +fi +if [ -z "$TERM" ]; then + export TERM=xterm + echo "Warning: TERM undefined, set to $TERM" +fi +if [ -z "$XAUTHORITY" ]; then + export XAUTHORITY=~/.Xauthority + echo "Warning: XAUTHORITY undefined, set to $XAUTHORITY" + xauth extract \- $DISPLAY >>$XAUTHORITY +fi + # Start the container # # --rm: delete container after exiting @@ -32,6 +47,7 @@ CONTAINER_NAME="$(tr '/' '_' <<< "$IMG_NAME")" docker run --rm -it --name $CONTAINER_NAME \ --network host \ --volume=/tmp/.X11-unix:/tmp/.X11-unix \ + --volume "$XAUTHORITY:/.Xauthority" \ --device=/dev/dri:/dev/dri \ -e DISPLAY \ -e TERM \ @@ -39,6 +55,5 @@ docker run --rm -it --name $CONTAINER_NAME \ -e XAUTHORITY=/.Xauthority \ $IMG_NAME -# --volume "$XAUTHORITY:/.Xauthority" \ # EOF From b31a7029ff8a910eb2c6a4d0693b0d543fd98a4a Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Fri, 13 Sep 2024 12:28:50 +0200 Subject: [PATCH 23/31] freisa_on_mars: Add layers for integration of MoveIt2 Signed-off-by: Gianpaolo Macario --- freisa_on_mars/Dockerfile | 96 +++++++++++++++++++++++++++++---------- 1 file changed, 73 insertions(+), 23 deletions(-) diff --git a/freisa_on_mars/Dockerfile b/freisa_on_mars/Dockerfile index fb44b508..18918e17 100644 --- a/freisa_on_mars/Dockerfile +++ b/freisa_on_mars/Dockerfile @@ -27,6 +27,28 @@ ENV GZ_VERSION=fortress # Disable prompting during package installation ARG DEBIAN_FRONTEND=noninteractive +# === BEGIN space-ros/docker/moveit2/Dockerfile === + +# Define key locations +ENV MOVEIT2_DIR=${HOME_DIR}/moveit2 + +# Make sure the latest versions of packages are installed +# Using Docker BuildKit cache mounts for /var/cache/apt and /var/lib/apt ensures that +# the cache won't make it into the built image but will be maintained between steps. +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + sudo apt-get update +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + sudo apt-get dist-upgrade -y +RUN rosdep update + +# Get the MoveIt2 source code +WORKDIR ${HOME_DIR} +RUN git clone https://github.com/moveit/moveit2.git -b ${ROSDISTRO} moveit2/src +RUN cd ${MOVEIT2_DIR}/src \ + && git clone https://github.com/moveit/moveit2_tutorials.git -b ${ROSDISTRO} + # Get rosinstall_generator # Using Docker BuildKit cache mounts for /var/cache/apt and /var/lib/apt ensures that # the cache won't make it into the built image but will be maintained between steps. @@ -34,6 +56,29 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ sudo apt-get update -y && sudo apt-get install -y python3-rosinstall-generator +# Generate repos file for moveit2 dependencies, excluding packages from Space ROS core. +# COPY --chown=${USERNAME}:${USERNAME} moveit2-pkgs.txt /tmp/ +# COPY --chown=${USERNAME}:${USERNAME} excluded-pkgs.txt /tmp/ +# RUN rosinstall_generator \ +# --rosdistro ${ROSDISTRO} \ +# --deps \ +# --exclude-path ${SPACEROS_DIR}/src \ +# --exclude $(cat /tmp/excluded-pkgs.txt) -- \ +# -- $(cat /tmp/moveit2-pkgs.txt) \ +# > /tmp/moveit2_generated_pkgs.repos + +# Get the repositories required by MoveIt2, but not included in Space ROS +WORKDIR ${MOVEIT2_DIR} +# RUN vcs import src < /tmp/moveit2_generated_pkgs.repos +# RUN cp src/moveit2_tutorials.repos /tmp/ +#i RUN vcs import src < /tmp/moveit2_tutorials.repos + +# Update the ownership of the source files (had to use sudo above to work around +# a possible inherited 'insteadof' from the host that forces use of ssh +RUN sudo chown -R ${USER}:${USER} ${MOVEIT2_DIR} + +# === END space-ros/docker/moveit2/Dockerfile === + # TODO(anyone): remove demo-pkgs.txt, no packages left after exclusions # Generate repos file for demo dependencies, excluding packages from Space ROS core. # COPY --chown=${USERNAME}:${USERNAME} demo-pkgs.txt /tmp/ @@ -50,35 +95,40 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ RUN mkdir -p ${DEMO_DIR}/src WORKDIR ${DEMO_DIR} +# Install libmongoc for development +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + sudo apt-get install libmongoc-dev -y -# # Install libmongoc for development -# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ -# --mount=type=cache,target=/var/lib/apt,sharing=locked \ -# sudo apt-get install libmongoc-dev -y - -# # Compile mongo cxx driver https://mongocxx.org/mongocxx-v3/installation/linux/ -# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ -# --mount=type=cache,target=/var/lib/apt,sharing=locked \ -# sudo apt-get install libssl-dev build-essential devscripts debian-keyring fakeroot debhelper cmake libboost-dev libsasl2-dev libicu-dev libzstd-dev doxygen -y -# RUN wget https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.7/mongo-cxx-driver-r3.6.7.tar.gz -# RUN tar -xzf mongo-cxx-driver-r3.6.7.tar.gz -# RUN cd mongo-cxx-driver-r3.6.7/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local && sudo cmake --build . --target EP_mnmlstc_core && cmake --build . && sudo cmake --build . --target install - -# Get the source for the dependencies -# RUN vcs import src < /tmp/demo_generated_pkgs.repos -COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/ -RUN vcs import src < /tmp/demo_manual_pkgs.repos && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' - +# Compile mongo cxx driver https://mongocxx.org/mongocxx-v3/installation/linux/ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ - sudo apt-get update -y \ -&& /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ -&& rosdep install --from-paths src --ignore-src -r -y --rosdistro ${ROSDISTRO} + sudo apt-get install libssl-dev build-essential devscripts debian-keyring fakeroot \ + debhelper cmake libboost-dev libsasl2-dev libicu-dev libzstd-dev doxygen -y +RUN wget https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.7/mongo-cxx-driver-r3.6.7.tar.gz +RUN tar -xzf mongo-cxx-driver-r3.6.7.tar.gz +RUN cd mongo-cxx-driver-r3.6.7/build \ + && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \ + && sudo cmake --build . --target EP_mnmlstc_core \ + && cmake --build . \ + && sudo cmake --build . --target install + +# # Get the source for the dependencies +# # RUN vcs import src < /tmp/demo_generated_pkgs.repos +# COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/ +# RUN vcs import src < /tmp/demo_manual_pkgs.repos \ +# && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' -# && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ +# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ +# --mount=type=cache,target=/var/lib/apt,sharing=locked \ +# sudo apt-get update -y \ +# && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ +# && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ +# && rosdep install --from-paths src --ignore-src -r -y --rosdistro ${ROSDISTRO} # # Build the demo -# RUN /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash && source ${MOVEIT2_DIR}/install/setup.bash \ +# RUN /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ +# && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ # && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release' # # Add the user to the render group so that the user can access /dev/dri/renderD128 From a96e4b2bd0462ba54987318f96de0fdf1d601b01 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Fri, 13 Sep 2024 13:30:25 +0200 Subject: [PATCH 24/31] freisa_on_mars: Add *-pkgs.txt files Copied from https://github.com/space-ros/docker/tree/main/moveit2 Signed-off-by: Gianpaolo Macario --- freisa_on_mars/excluded-pkgs.txt | 10 +++++++++ freisa_on_mars/moveit2-pkgs.txt | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 freisa_on_mars/excluded-pkgs.txt create mode 100644 freisa_on_mars/moveit2-pkgs.txt diff --git a/freisa_on_mars/excluded-pkgs.txt b/freisa_on_mars/excluded-pkgs.txt new file mode 100644 index 00000000..890bc003 --- /dev/null +++ b/freisa_on_mars/excluded-pkgs.txt @@ -0,0 +1,10 @@ +fastcdr +fastrtps +fastrtps_cmake_module +rmw_fastrtps_cpp +rmw_fastrtps_dynamic_cpp +rmw_fastrtps_shared_cpp +rmw_connextdds +rosidl_typesupport_fastrtps_c +rosidl_typesupport_fastrtps_cpp +urdfdom_headers diff --git a/freisa_on_mars/moveit2-pkgs.txt b/freisa_on_mars/moveit2-pkgs.txt new file mode 100644 index 00000000..7aa8a566 --- /dev/null +++ b/freisa_on_mars/moveit2-pkgs.txt @@ -0,0 +1,38 @@ +ackermann_msgs +angles +backward_ros +control_msgs +control_toolbox +eigen_stl_containers +geometric_shapes +graph_msgs +ignition/ignition_cmake2_vendor +ignition/ignition_math6_vendor +image_common +interactive_markers +joint_state_publisher +laser_geometry +launch_param_builder +moveit_msgs +moveit_resources +moveit_task_constructor +navigation_msgs +object_recognition_msgs +octomap +ompl +orocos_kinematics_dynamics +py_binding_tools +python_qt_binding +random_numbers +realtime_tools +resource_retriever +ros2_control +ros2_controllers +ruckig +rviz2 +srdfdom +urdf_parser_py +vision_opencv +warehouse_ros +xacro +yaml_cpp_vendor From afdf5d34fbfceefd32822875307989a18d38beb5 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Fri, 13 Sep 2024 13:30:38 +0200 Subject: [PATCH 25/31] freisa_on_mars: Progress in building MoveIt2 Signed-off-by: Gianpaolo Macario --- freisa_on_mars/Dockerfile | 67 +++++++++++++++++++++++++++++---------- freisa_on_mars/build.sh | 2 +- 2 files changed, 52 insertions(+), 17 deletions(-) diff --git a/freisa_on_mars/Dockerfile b/freisa_on_mars/Dockerfile index 18918e17..4c8952a3 100644 --- a/freisa_on_mars/Dockerfile +++ b/freisa_on_mars/Dockerfile @@ -27,7 +27,7 @@ ENV GZ_VERSION=fortress # Disable prompting during package installation ARG DEBIAN_FRONTEND=noninteractive -# === BEGIN space-ros/docker/moveit2/Dockerfile === +# === BEGIN Adaptation from space-ros/docker/moveit2/Dockerfile === # Define key locations ENV MOVEIT2_DIR=${HOME_DIR}/moveit2 @@ -57,27 +57,56 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ sudo apt-get update -y && sudo apt-get install -y python3-rosinstall-generator # Generate repos file for moveit2 dependencies, excluding packages from Space ROS core. -# COPY --chown=${USERNAME}:${USERNAME} moveit2-pkgs.txt /tmp/ -# COPY --chown=${USERNAME}:${USERNAME} excluded-pkgs.txt /tmp/ -# RUN rosinstall_generator \ -# --rosdistro ${ROSDISTRO} \ -# --deps \ -# --exclude-path ${SPACEROS_DIR}/src \ -# --exclude $(cat /tmp/excluded-pkgs.txt) -- \ -# -- $(cat /tmp/moveit2-pkgs.txt) \ -# > /tmp/moveit2_generated_pkgs.repos - +WORKDIR ${MOVEIT2_DIR} +COPY --chown=${USERNAME}:${USERNAME} moveit2-pkgs.txt /tmp/ +COPY --chown=${USERNAME}:${USERNAME} excluded-pkgs.txt /tmp/ +RUN rosinstall_generator \ + --rosdistro ${ROSDISTRO} \ + --deps \ + --exclude $(cat /tmp/excluded-pkgs.txt) -- \ + -- $(cat /tmp/moveit2-pkgs.txt) \ + > /tmp/moveit2_generated_pkgs.repos + # Get the repositories required by MoveIt2, but not included in Space ROS WORKDIR ${MOVEIT2_DIR} -# RUN vcs import src < /tmp/moveit2_generated_pkgs.repos -# RUN cp src/moveit2_tutorials.repos /tmp/ -#i RUN vcs import src < /tmp/moveit2_tutorials.repos +RUN vcs import src < /tmp/moveit2_generated_pkgs.repos +# COPY --chown=${USERNAME}:${USERNAME} src/moveit2_tutorials.repos /tmp/ +# RUN vcs import src < /tmp/moveit2_tutorials.repos # Update the ownership of the source files (had to use sudo above to work around # a possible inherited 'insteadof' from the host that forces use of ssh -RUN sudo chown -R ${USER}:${USER} ${MOVEIT2_DIR} +RUN sudo chown -R ${USERNAME}:${USERNAME} ${MOVEIT2_DIR} + +RUN touch DEBUG-02.txt + +# # Install system dependencies +# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ +# --mount=type=cache,target=/var/lib/apt,sharing=locked \ +# /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash' \ +# && rosdep install --from-paths ../spaceros/src src --ignore-src --rosdistro ${ROSDISTRO} -r -y --skip-keys "console_bridge generate_parameter_library fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers rmw_connextdds ros_testing rmw_connextdds rmw_fastrtps_cpp rmw_fastrtps_dynamic_cpp composition demo_nodes_py lifecycle rosidl_typesupport_fastrtps_cpp rosidl_typesupport_fastrtps_c ikos diagnostic_aggregator diagnostic_updater joy qt_gui rqt_gui rqt_gui_py" + +# # Apply a patch to octomap_msgs to work around a build issue +# COPY --chown=${USERNAME}:${USERNAME} octomap_fix.diff ./src/octomap_msgs +# RUN cd src/octomap_msgs && git apply octomap_fix.diff + +# # Build MoveIt2 +# RUN /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash \ +# && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --event-handlers desktop_notification- status-' + +# # Add a couple sample GUI apps for testing +# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ +# --mount=type=cache,target=/var/lib/apt,sharing=locked \ +# sudo apt-get install -y \ +# firefox \ +# glmark2 \ +# libcanberra-gtk3-0 \ +# libpci-dev \ +# xauth \ +# xterm + +# === END Adaptation from space-ros/docker/moveit2/Dockerfile === -# === END space-ros/docker/moveit2/Dockerfile === +RUN touch DEBUG-11.txt # TODO(anyone): remove demo-pkgs.txt, no packages left after exclusions # Generate repos file for demo dependencies, excluding packages from Space ROS core. @@ -95,6 +124,8 @@ RUN sudo chown -R ${USER}:${USER} ${MOVEIT2_DIR} RUN mkdir -p ${DEMO_DIR}/src WORKDIR ${DEMO_DIR} +RUN touch DEBUG-12.txt + # Install libmongoc for development RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ @@ -113,6 +144,8 @@ RUN cd mongo-cxx-driver-r3.6.7/build \ && cmake --build . \ && sudo cmake --build . --target install +RUN touch DEBUG-15.txt + # # Get the source for the dependencies # # RUN vcs import src < /tmp/demo_generated_pkgs.repos # COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/ @@ -131,6 +164,8 @@ RUN cd mongo-cxx-driver-r3.6.7/build \ # && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ # && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release' +RUN touch DEBUG-21.txt + # # Add the user to the render group so that the user can access /dev/dri/renderD128 # RUN sudo usermod -aG render $USERNAME diff --git a/freisa_on_mars/build.sh b/freisa_on_mars/build.sh index 9eaa4e25..2624a647 100755 --- a/freisa_on_mars/build.sh +++ b/freisa_on_mars/build.sh @@ -11,7 +11,7 @@ VERSION=preview set -eo pipefail echo "" -echo "##### Building Space ROS Demo Docker Image #####" +echo "##### Building freisa_on_mars Demo Docker Image #####" echo "" docker build -t $ORG/$IMAGE:$TAG \ From da8ec3b69b2749d7207eb66dcdf70878fb9d1f09 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Sat, 14 Sep 2024 13:45:49 +0200 Subject: [PATCH 26/31] freisa_on_mars: Add octomap_fix.diff Copied from https://github.com/space-ros/docker/tree/main/moveit2 Signed-off-by: Gianpaolo Macario --- freisa_on_mars/octomap_fix.diff | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 freisa_on_mars/octomap_fix.diff diff --git a/freisa_on_mars/octomap_fix.diff b/freisa_on_mars/octomap_fix.diff new file mode 100644 index 00000000..ea500e04 --- /dev/null +++ b/freisa_on_mars/octomap_fix.diff @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cd3112a..72403c5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,7 +36,7 @@ rosidl_generate_interfaces(${PROJECT_NAME} + ) + + install(DIRECTORY include/ +- DESTINATION include ++ DESTINATION include/${PROJECT_NAME} + FILES_MATCHING PATTERN "*.h" + PATTERN ".svn" EXCLUDE) + From 0d91d99ece4502e41aca69a5a7f5bcf0ff08f11e Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Sat, 14 Sep 2024 13:46:18 +0200 Subject: [PATCH 27/31] freisa_on_mars: Complete building MoveIt2 Signed-off-by: Gianpaolo Macario --- freisa_on_mars/Dockerfile | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/freisa_on_mars/Dockerfile b/freisa_on_mars/Dockerfile index 4c8952a3..b12f2b51 100644 --- a/freisa_on_mars/Dockerfile +++ b/freisa_on_mars/Dockerfile @@ -1,6 +1,10 @@ -# freisa_on_mars/Dockerfile +# ========================================================================== +# File: freisa_on_mars/Dockerfile # -# Adapted from https://github.com/space-ros/docker/blob/main/space_robots/Dockerfile +# Adapted from +# * https://github.com/space-ros/docker/blob/main/moveit2/Dockerfile +# * https://github.com/space-ros/docker/blob/main/space_robots/Dockerfile +# ========================================================================== FROM osrf/space-ros:latest # FROM openrobotics/moveit2:latest @@ -79,19 +83,23 @@ RUN sudo chown -R ${USERNAME}:${USERNAME} ${MOVEIT2_DIR} RUN touch DEBUG-02.txt -# # Install system dependencies -# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ -# --mount=type=cache,target=/var/lib/apt,sharing=locked \ -# /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash' \ -# && rosdep install --from-paths ../spaceros/src src --ignore-src --rosdistro ${ROSDISTRO} -r -y --skip-keys "console_bridge generate_parameter_library fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers rmw_connextdds ros_testing rmw_connextdds rmw_fastrtps_cpp rmw_fastrtps_dynamic_cpp composition demo_nodes_py lifecycle rosidl_typesupport_fastrtps_cpp rosidl_typesupport_fastrtps_c ikos diagnostic_aggregator diagnostic_updater joy qt_gui rqt_gui rqt_gui_py" - -# # Apply a patch to octomap_msgs to work around a build issue -# COPY --chown=${USERNAME}:${USERNAME} octomap_fix.diff ./src/octomap_msgs -# RUN cd src/octomap_msgs && git apply octomap_fix.diff +RUN mkdir -p ../spaceros/src # HACK -# # Build MoveIt2 -# RUN /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash \ -# && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --event-handlers desktop_notification- status-' +# Install system dependencies +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash' \ + && rosdep install --from-paths ../spaceros/src src --ignore-src \ + --rosdistro ${ROSDISTRO} -r -y --skip-keys \ + "console_bridge generate_parameter_library fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers rmw_connextdds ros_testing rmw_connextdds rmw_fastrtps_cpp rmw_fastrtps_dynamic_cpp composition demo_nodes_py lifecycle rosidl_typesupport_fastrtps_cpp rosidl_typesupport_fastrtps_c ikos diagnostic_aggregator diagnostic_updater joy qt_gui rqt_gui rqt_gui_py" + +# Apply a patch to octomap_msgs to work around a build issue +COPY --chown=${USERNAME}:${USERNAME} octomap_fix.diff ./src/octomap_msgs +RUN cd src/octomap_msgs && git apply octomap_fix.diff + +# Build MoveIt2 +RUN /bin/bash -c 'source ${SPACEROS_DIR}/install/setup.bash \ + && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --event-handlers desktop_notification- status-' # # Add a couple sample GUI apps for testing # RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ From 3433f1d76c2ee36a4512aa710337055309c860ac Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Sun, 15 Sep 2024 19:36:10 +0200 Subject: [PATCH 28/31] freisa_on_mars: Fix docker build Signed-off-by: Gianpaolo Macario --- freisa_on_mars/Dockerfile | 11 +++++++---- freisa_on_mars/moveit2_tutorials.repos | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 freisa_on_mars/moveit2_tutorials.repos diff --git a/freisa_on_mars/Dockerfile b/freisa_on_mars/Dockerfile index b12f2b51..3d274e8f 100644 --- a/freisa_on_mars/Dockerfile +++ b/freisa_on_mars/Dockerfile @@ -60,6 +60,10 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ sudo apt-get update -y && sudo apt-get install -y python3-rosinstall-generator +RUN mkdir -p ${SPACEROS_DIR}/src # HACK + +RUN touch DEBUG-01.txt + # Generate repos file for moveit2 dependencies, excluding packages from Space ROS core. WORKDIR ${MOVEIT2_DIR} COPY --chown=${USERNAME}:${USERNAME} moveit2-pkgs.txt /tmp/ @@ -67,6 +71,7 @@ COPY --chown=${USERNAME}:${USERNAME} excluded-pkgs.txt /tmp/ RUN rosinstall_generator \ --rosdistro ${ROSDISTRO} \ --deps \ + --exclude-path ${SPACEROS_DIR}/src \ --exclude $(cat /tmp/excluded-pkgs.txt) -- \ -- $(cat /tmp/moveit2-pkgs.txt) \ > /tmp/moveit2_generated_pkgs.repos @@ -74,8 +79,8 @@ RUN rosinstall_generator \ # Get the repositories required by MoveIt2, but not included in Space ROS WORKDIR ${MOVEIT2_DIR} RUN vcs import src < /tmp/moveit2_generated_pkgs.repos -# COPY --chown=${USERNAME}:${USERNAME} src/moveit2_tutorials.repos /tmp/ -# RUN vcs import src < /tmp/moveit2_tutorials.repos +COPY --chown=${USERNAME}:${USERNAME} moveit2_tutorials.repos /tmp/ +RUN vcs import src < /tmp/moveit2_tutorials.repos # Update the ownership of the source files (had to use sudo above to work around # a possible inherited 'insteadof' from the host that forces use of ssh @@ -83,8 +88,6 @@ RUN sudo chown -R ${USERNAME}:${USERNAME} ${MOVEIT2_DIR} RUN touch DEBUG-02.txt -RUN mkdir -p ../spaceros/src # HACK - # Install system dependencies RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ diff --git a/freisa_on_mars/moveit2_tutorials.repos b/freisa_on_mars/moveit2_tutorials.repos new file mode 100644 index 00000000..d06986a9 --- /dev/null +++ b/freisa_on_mars/moveit2_tutorials.repos @@ -0,0 +1,18 @@ +repositories: + moveit_task_constructor: + type: git + url: https://github.com/moveit/moveit_task_constructor.git + version: humble + moveit_visual_tools: + type: git + url: https://github.com/moveit/moveit_visual_tools + version: ros2 + rosparam_shortcuts: + type: git + url: https://github.com/PickNikRobotics/rosparam_shortcuts + version: ros2 + rviz_visual_tools: + type: git + url: https://github.com/PickNikRobotics/rviz_visual_tools.git + version: ros2 + From 6beaa7a912ef639c115c930bac914f99ada589ca Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Sun, 15 Sep 2024 17:54:07 +0000 Subject: [PATCH 29/31] freisa_on_mars: Make sure all demo dependencies are installed Signed-off-by: Gianpaolo Macario --- freisa_on_mars/Dockerfile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/freisa_on_mars/Dockerfile b/freisa_on_mars/Dockerfile index 3d274e8f..331d255a 100644 --- a/freisa_on_mars/Dockerfile +++ b/freisa_on_mars/Dockerfile @@ -157,23 +157,23 @@ RUN cd mongo-cxx-driver-r3.6.7/build \ RUN touch DEBUG-15.txt -# # Get the source for the dependencies -# # RUN vcs import src < /tmp/demo_generated_pkgs.repos -# COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/ -# RUN vcs import src < /tmp/demo_manual_pkgs.repos \ -# && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' +# Get the source for the dependencies +# RUN vcs import src < /tmp/demo_generated_pkgs.repos +COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/ +RUN vcs import src < /tmp/demo_manual_pkgs.repos \ + && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' -# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ -# --mount=type=cache,target=/var/lib/apt,sharing=locked \ -# sudo apt-get update -y \ -# && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ -# && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ -# && rosdep install --from-paths src --ignore-src -r -y --rosdistro ${ROSDISTRO} +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + sudo apt-get update -y \ + && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ + && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ + && rosdep install --from-paths src --ignore-src -r -y --rosdistro ${ROSDISTRO} # # Build the demo # RUN /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ # && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ -# && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release' +# && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release RUN touch DEBUG-21.txt From 1f60d284383ff244972b8f9d71917d63ce8ea901 Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Wed, 18 Sep 2024 12:34:35 +0200 Subject: [PATCH 30/31] Managed to build most packages from sources Signed-off-by: Gianpaolo Macario --- freisa_on_mars/Dockerfile | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/freisa_on_mars/Dockerfile b/freisa_on_mars/Dockerfile index 331d255a..9f748d64 100644 --- a/freisa_on_mars/Dockerfile +++ b/freisa_on_mars/Dockerfile @@ -170,10 +170,40 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ && rosdep install --from-paths src --ignore-src -r -y --rosdistro ${ROSDISTRO} -# # Build the demo -# RUN /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \ -# && /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \ -# && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release +RUN vcs import src < "${DEMO_DIR}/src/mini_pupper_ros/.minipupper.repos" + +# HACK: Move out package whose build still fails +RUN /bin/mkdir -p ../NO_src \ + && for d in champ ros2_controllers; do mv "src/$d" "../NO_src/"; done + +# Build the demo +RUN /bin/bash -c '\ + source "${SPACEROS_DIR}/install/setup.bash" \ + && source "${MOVEIT2_DIR}/install/setup.bash" \ + && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release' + +# === TODO: The command above fails ============================================ +# --- stderr: forward_command_controller +# CMake Error at CMakeLists.txt:26 (find_package): +# By not providing "Findcontroller_interface.cmake" in CMAKE_MODULE_PATH this +# project has asked CMake to find a package configuration file provided by +# "controller_interface", but CMake did not find one. +# +# Could not find a package configuration file provided by +# "controller_interface" with any of the following names: +# +# controller_interfaceConfig.cmake +# controller_interface-config.cmake +# +# Add the installation prefix of "controller_interface" to CMAKE_PREFIX_PATH +# or set "controller_interface_DIR" to a directory containing one of the +# above files. If "controller_interface" provides a separate development +# package or SDK, be sure it has been installed. +# +# +# --- +# Failed <<< forward_command_controller [1.84s, exited with code 1] +# ============================================================================== RUN touch DEBUG-21.txt From bbc4757871aa3a9475043c2e702b68f348076c4e Mon Sep 17 00:00:00 2001 From: Gianpaolo Macario Date: Tue, 24 Sep 2024 20:08:39 +0200 Subject: [PATCH 31/31] README.md: Embed YouTube video: FREISA meets NASA Space ROS --- freisa_on_mars/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freisa_on_mars/README.md b/freisa_on_mars/README.md index 5a86d350..e8741998 100644 --- a/freisa_on_mars/README.md +++ b/freisa_on_mars/README.md @@ -10,6 +10,8 @@ This code is a part of the following challenge: * Team Lead Freelancer Username: [@gmacario](https://www.freelancer.com/u/gmacario) * Submission Title: Integrate FREISA Robot Dog with Space ROS Mars Rover Demo +[![FREISA meets NASA Space ROS](https://img.youtube.com/vi/KcfOwAC_WE0/0.jpg)](https://www.youtube.com/watch?v=KcfOwAC_WE0 "FREISA meets NASA Space ROS") +