Skip to content

Commit

Permalink
fix(aloha_ws): Correctly setup Aloha Interbotix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
j3soon committed Sep 5, 2024
1 parent 39d4458 commit 54da712
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
2 changes: 2 additions & 0 deletions aloha_ws/docker/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ if [ ! -f $ROS2_WS/install/setup.bash ]; then
echo "Workspace built."
fi
# TODO: Source other workspace environments as underlay
# Source Interbotix environment
source ~/interbotix_ws/install/setup.bash
# Source workspace environment
source $ROS2_WS/install/setup.bash
25 changes: 18 additions & 7 deletions aloha_ws/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,31 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
# apt-get update && apt-get install -y \
# $OTHER_PACKAGES \
# && rm -rf /var/lib/apt/lists/*
# Install Aloha Interbotix dependencies
# Ref: https://docs.trossenrobotics.com/interbotix_xsarms_docs/ros_interface/ros2/software_setup.html#amd64-architecture
# Ref: https://github.com/Interbotix/interbotix_ros_manipulators/blob/humble/interbotix_ros_xsarms/install/amd64/xsarm_amd64_install.sh
# Install udevadm for later use
RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
apt-get update && apt-get install -y curl \
&& curl 'https://raw.githubusercontent.com/Interbotix/interbotix_ros_manipulators/d07c17cc0f868bf1f59ee8d8fa844e273f4699ff/interbotix_ros_xsarms/install/amd64/xsarm_amd64_install.sh' > xsarm_amd64_install.sh \
&& chmod +x xsarm_amd64_install.sh \
&& ./xsarm_amd64_install.sh -d humble \
apt-get update && apt-get install -y \
udev \
&& rm -rf /var/lib/apt/lists/*

USER $USERNAME
# Create Gazebo cache directory with correct ownership to avoid permission issues after volume mount
RUN mkdir /home/$USERNAME/.gazebo
# TODO: Run additional commands as non-root user here

# Install Aloha Interbotix dependencies
# Ref: https://docs.trossenrobotics.com/interbotix_xsarms_docs/ros_interface/ros2/software_setup.html#amd64-architecture
# Ref: https://github.com/Interbotix/interbotix_ros_manipulators/blob/humble/interbotix_ros_xsarms/install/amd64/xsarm_amd64_install.sh
# Set the `TERM` variable for the `tput` command in the `xsarm_amd64_install.sh` script.
# TODO: The github repos are cloned in the script for simplicity.
# It would be better to copy the repos directly into the `aloha_ws/src` directory for future development.
ENV TERM=xterm-256color
RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
cd ~ \
&& curl 'https://raw.githubusercontent.com/Interbotix/interbotix_ros_manipulators/d07c17cc0f868bf1f59ee8d8fa844e273f4699ff/interbotix_ros_xsarms/install/amd64/xsarm_amd64_install.sh' > xsarm_amd64_install.sh \
&& chmod +x xsarm_amd64_install.sh \
&& bash -ie ./xsarm_amd64_install.sh -d humble -n \
&& sudo rm -rf /var/lib/apt/lists/*

COPY .bashrc /home/$USERNAME/.bashrc
# TODO: Copy additional files here
ENTRYPOINT []
Expand Down

0 comments on commit 54da712

Please sign in to comment.