Skip to content

Commit 783377c

Browse files
mtobia-nasaChonkUR L. Rail-E
authored andcommitted
Merge branch 'humble-devel' of https://github.com/NASA-JSC-Robotics/clr_ws into add_sim_hatch_latch
2 parents ea16cba + c8bda1c commit 783377c

File tree

12 files changed

+96
-41
lines changed

12 files changed

+96
-41
lines changed

.github/workflows/build_and_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
tags:
66
- '*'
77
branches:
8+
- main
89
- humble
910
- jazzy
1011
- '*-devel'

.github/workflows/format.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
tags:
66
- '*'
77
branches:
8+
- main
89
- humble
910
- jazzy
1011
- '*-devel'

.gitlab-ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ workflow:
88
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
99
when: always
1010
# Run for commits to protected/standard development branches
11-
- if: '$CI_COMMIT_BRANCH == "humble" || $CI_COMMIT_BRANCH == "jazzy" || $CI_COMMIT_BRANCH =~ /.*-devel$/'
11+
- if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "humble" || $CI_COMMIT_BRANCH == "jazzy" || $CI_COMMIT_BRANCH =~ /.*-devel$/'
1212
when: always
1313
- when: never
1414

@@ -34,7 +34,7 @@ pre-commit-check:
3434
rules:
3535
- if: $CI_MERGE_REQUEST_ID
3636
when: always
37-
- if: '$CI_COMMIT_BRANCH == "humble" || $CI_COMMIT_BRANCH == "jazzy" || $CI_COMMIT_BRANCH =~ /.*-devel$/'
37+
- if: '$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "humble" || $CI_COMMIT_BRANCH == "jazzy" || $CI_COMMIT_BRANCH =~ /.*-devel$/'
3838
when: always
3939
- when: never
4040

@@ -65,7 +65,6 @@ build_dev_source:
6565
- DOCKER_BUILDKIT=1 docker build
6666
--pull
6767
--cache-from ${CI_REGISTRY_IMAGE}:${CONTAINER_TAG}
68-
--cache-from ${CI_REGISTRY_IMAGE}:humble-devel
6968
-t ${CI_REGISTRY_IMAGE}:${CONTAINER_TAG}
7069
--load
7170
--target er4-dev-source

.gitmodules

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@
3434
path = src/external/merlin_mockup_description
3535
url = https://github.com/NASA-JSC-Robotics/merlin_mockup_description.git
3636
branch = humble-devel
37-
[submodule "src/external/mujoco_ros2_simulation"]
38-
path = src/external/mujoco_ros2_simulation
39-
url = https://github.com/NASA-JSC-Robotics/mujoco_ros2_simulation.git
40-
branch = humble-devel
4137
[submodule "src/clr_sim_demos"]
4238
path = src/clr_sim_demos
4339
url = https://github.com/NASA-JSC-Robotics/clr_sim_demos.git
@@ -46,3 +42,6 @@
4642
path = src/external/color_tools
4743
url = https://github.com/NASA-JSC-Robotics/color_tools.git
4844
branch = humble-devel
45+
[submodule "src/external/mujoco_ros2_control"]
46+
path = src/external/mujoco_ros2_control
47+
url = https://github.com/ros-controls/mujoco_ros2_control.git

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,4 @@ repos:
8282
hooks:
8383
- id: codespell
8484
exclude: \.(svg|stl|dae)$
85+
args: ["--ignore-words-list", "Hart"]

CITATION.cff

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software in your own work, please cite the following paper."
3+
preferred-citation:
4+
type: conference-paper
5+
authors:
6+
- family-names: "Dunkelberger"
7+
given-names: "Nathan"
8+
- family-names: "Sheetz"
9+
given-names: "Emily"
10+
- family-names: "Rainen"
11+
given-names: "Connor"
12+
- family-names: "Graf"
13+
given-names: "Jodi"
14+
- family-names: "Hart"
15+
given-names: "Nikki"
16+
- family-names: "Zemler"
17+
given-names: "Emma"
18+
- family-names: "Azimi"
19+
given-names: "Shaun"
20+
title: "Design of the iMETRO Facility: A Platform for Intravehicular Space Robotics Research"
21+
doi: 10.1109/UR65550.2025.11077983
22+
collection-title: "2025 22nd International Conference on Ubiquitous Robots (UR)"
23+
year: 2025
24+
pages: {390-397}

Dockerfile

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Set desired ROS distribution, this image currently only supports humble.
1+
# Set desired ROS distribution
22
ARG ROS_DISTRO=humble
33

44
# This layer grabs package manifests from the src directory for preserving rosdep installs.
@@ -18,8 +18,7 @@ FROM ros:${ROS_DISTRO} AS er4-dev
1818

1919
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
2020

21-
# Overridable non root user information, this can be annoying for non humble ROS base images, which
22-
# may already have a non-root user created.
21+
# Overridable non root user information.
2322
ARG USER_UID=1000
2423
ARG USER_GID=1000
2524
ARG USERNAME=er4-user
@@ -53,7 +52,9 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
5352
xterm \
5453
wget
5554

56-
# Add a non-root user with provided user details
55+
# Add a non-root user with provided user details. Some images have a default `ubuntu` user, so we remove it before adding the
56+
# new one.
57+
RUN userdel -r ubuntu 2>/dev/null || true
5758
RUN groupadd -g ${USER_GID} ${USERNAME} \
5859
&& useradd -l -u ${USER_UID} -g ${USER_GID} --create-home -m -s /bin/bash -G sudo,adm,dialout,dip,plugdev,video ${USERNAME} \
5960
&& echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
@@ -62,12 +63,35 @@ RUN groupadd -g ${USER_GID} ${USERNAME} \
6263
/home/${USERNAME}/.colcon \
6364
/home/${USERNAME}/.ros \
6465
/home/${USERNAME}/.bash \
65-
${ER4_WS}
66+
${ER4_WS}/src \
67+
${ER4_WS}/build \
68+
${ER4_WS}/install \
69+
${ER4_WS}/log && \
70+
chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}
71+
72+
# Configure and install MuJoCo using the defaults for the MuJoCo drivers.
73+
# We use MuJoCo in many systems so we just install the drivers in the base workspace.
74+
# The install is CPU dependent, this works with `x86_64` and `arm64` chips, TBD on others.
75+
ARG MUJOCO_VERSION=3.4.0
76+
ENV MUJOCO_VERSION=${MUJOCO_VERSION}
77+
ENV MUJOCO_DIR="/opt/mujoco/mujoco-${MUJOCO_VERSION}"
78+
RUN mkdir -p ${MUJOCO_DIR} && \
79+
chown -R ${USERNAME}:${USERNAME} ${MUJOCO_DIR} && \
80+
CPU_ARCH=$(uname -m); \
81+
wget https://github.com/google-deepmind/mujoco/releases/download/${MUJOCO_VERSION}/mujoco-${MUJOCO_VERSION}-linux-${CPU_ARCH}.tar.gz && \
82+
tar -xzf "mujoco-${MUJOCO_VERSION}-linux-${CPU_ARCH}.tar.gz" -C $(dirname "${MUJOCO_DIR}") && \
83+
rm "mujoco-${MUJOCO_VERSION}-linux-${CPU_ARCH}.tar.gz"
84+
85+
# Install MuJoCo specific pip dependencies at the system level because it's an image
86+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
87+
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
88+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
89+
pip3 install mujoco obj2mjcf trimesh
6690

6791
# Setup the install directory and copy the workspace to it.
6892
# We could alternatively copy package manifests to preserve the layer cache if the build duration becomes too onerous.
93+
USER ${USERNAME}
6994
WORKDIR ${ER4_WS}
70-
RUN mkdir src build install log
7195

7296
# Copy package manifests for installing rosdeps
7397
COPY --chown=${USERNAME}:${USERNAME} --from=package-manifests /src/ ./src
@@ -77,16 +101,16 @@ COPY --chown=${USERNAME}:${USERNAME} --from=package-manifests /src/ ./src
77101
# RUN sudo rosdep init && rosdep update --rosdistro ${ROS_DISTRO}
78102
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
79103
--mount=type=cache,target=/var/lib/apt,sharing=locked \
80-
source /opt/ros/${ROS_DISTRO}/setup.bash && \
81-
apt-get update && \
104+
sudo apt update && \
105+
. /opt/ros/${ROS_DISTRO}/setup.bash && \
82106
rosdep update && \
83107
rosdep install -iy --from-paths src
84108

85109
# Install extra ROS deps
86110
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
87111
--mount=type=cache,target=/var/lib/apt,sharing=locked \
88-
apt-get update && \
89-
apt-get install -q -y \
112+
sudo apt-get update && \
113+
sudo apt-get install -q -y \
90114
ros-${ROS_DISTRO}-ros2controlcli \
91115
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
92116
ros-${ROS_DISTRO}-rmw-fastrtps-cpp \
@@ -95,7 +119,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
95119
# Configure and install MuJoCo using the defaults for the MuJoCo drivers.
96120
# We use MuJoCo in many systems so we just install the drivers in the base workspace.
97121
# The install is CPU dependent, this works with `x86_64` and `arm64` chips, TBD on others.
98-
ARG MUJOCO_VERSION=3.3.4
122+
ARG MUJOCO_VERSION=3.4.0
99123
ENV MUJOCO_VERSION=${MUJOCO_VERSION}
100124
ENV MUJOCO_DIR="/opt/mujoco/mujoco-${MUJOCO_VERSION}"
101125
RUN mkdir -p ${MUJOCO_DIR} && sudo chown -R ${USERNAME}:${USERNAME} ${MUJOCO_DIR}
@@ -107,18 +131,10 @@ RUN CPU_ARCH=$(uname -m); \
107131
# Install MuJoCo specific pip dependencies
108132
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
109133
--mount=type=cache,target=/var/lib/apt,sharing=locked \
110-
pip install mujoco obj2mjcf
111-
112-
# There's no build for arm64 on linux, so just ignore failures here if that's the case
113-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
114-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
115-
pip install bpy==4.0.0 --extra-index-url https://download.blender.org/pypi/ || true
134+
pip install mujoco obj2mjcf trimesh pycollada
116135

117136
# Copy in the remainder of the src directory
118-
COPY src/ src/
119-
RUN chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}
120-
121-
USER ${USERNAME}
137+
COPY --chown=${USERNAME}:${USERNAME} src/ src/
122138

123139
# Setup colcon default mixins and add default settings
124140
RUN colcon mixin add default \
@@ -133,16 +149,6 @@ RUN colcon metadata add default \
133149
# the required path is available to the python module to load the library.
134150
RUN pip3 install pyassimp==4.1.3
135151

136-
# Install useful tooling
137-
RUN pip3 install ipython
138-
139-
# Fix rosdep permissions and ensure sudo while we're at it
140-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
141-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
142-
sudo apt update && \
143-
. /opt/ros/${ROS_DISTRO}/setup.bash && \
144-
rosdep update --rosdistro ${ROS_DISTRO}
145-
146152
# copy in configs for different features
147153
COPY --chown=${USERNAME}:${USERNAME} config/colcon-defaults.yaml /home/${USERNAME}/.colcon/defaults.yaml
148154
COPY --chown=${USERNAME}:${USERNAME} config/terminator_config /home/${USERNAME}/.config/terminator/config

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Alternatively, individual packages and submodules can be added or extracted from
1717
In addition to the base packages, it adds multiple submodules for running demonstrations with the CLR system, both on hardware an with the dynamic MuJoCo simulation.
1818
For more information, refer to the documentation in [clr_sim_demos](https://github.com/NASA-JSC-Robotics/clr_sim_demos).
1919

20+
This workflow has been tested against the `humble` and `jazzy` ROS distros, but defaults to jazzy.
21+
To change ROS versions, update the `ROS2_DISTRO` variable in your environment.
22+
Note the `2`! As this is intended to be isolated from your system.
23+
2024
## Quick Development Setup
2125

2226
1) [Install Docker](https://docs.docker.com/engine/install/ubuntu/)
@@ -149,3 +153,21 @@ Please refer to the [troubleshooting guide](./docs/TROUBLESHOOTING.md#slow-rende
149153
## Troubleshooting
150154
151155
Common pitfalls and troubleshooting tips are documented in the [troubleshooting guide](./docs/TROUBLESHOOTING.md).
156+
157+
## Citation
158+
159+
This project falls under the purview of the iMETRO project.
160+
If you use this in your own work, please cite the following paper:
161+
162+
```bibtex
163+
@INPROCEEDINGS{imetro-facility-2025,
164+
author={Dunkelberger, Nathan and Sheetz, Emily and Rainen, Connor and Graf, Jodi and Hart, Nikki and Zemler, Emma and Azimi, Shaun},
165+
booktitle={2025 22nd International Conference on Ubiquitous Robots (UR)},
166+
title={Design of the iMETRO Facility: A Platform for Intravehicular Space Robotics Research},
167+
year={2025},
168+
volume={},
169+
number={},
170+
pages={390-397},
171+
keywords={NASA;Moon;Seals;Maintenance engineering;Maintenance;Robots;Standards;Open source software;Testing;Logistics},
172+
doi={10.1109/UR65550.2025.11077983}}
173+
```

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
dockerfile: Dockerfile
77
target: er4-dev
88
tags:
9-
- er4-dev:latest
9+
- er4-dev:${ROS2_DISTRO:-humble}
1010
args:
1111
- USERNAME=er4-user # Changing username requires updating workspace mounts below
1212
- USER_UID=${USER_UID:-1000}
@@ -35,6 +35,8 @@ services:
3535
- FASTRTPS_DEFAULT_PROFILES_FILE=/fastdds.xml
3636
# make the bash history folder link to our local .bash so that we can rtain info between container starts
3737
- HISTFILE=/home/er4-user/.bash/.bash_history
38+
# default to colorized output of ros logs
39+
- RCUTILS_COLORIZED_OUTPUT=1
3840
- NVIDIA_DRIVER_CAPABILITIES=all
3941
# If using an nvidia driver uncomment these lines
4042
# runtime: nvidia

0 commit comments

Comments
 (0)