Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DIST=(noetic | melodic | kinetic)
```
Run the image locally using the `run.bash` script:
```
./run.bash ${DIST}:latest
./run.bash dockwater:${DIST}
```

## Build for CI
Expand Down
1 change: 1 addition & 0 deletions humble/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,6 @@ RUN apt update \
ros-${ROSDIST}-rqt-topic \
ros-${ROSDIST}-rviz2 \
ros-${ROSDIST}-xacro \
ros-${ROSDIST}-foxglove-bridge \
&& sudo rm -rf /var/lib/apt/lists/* \
&& sudo apt clean -qq
96 changes: 96 additions & 0 deletions humble_fortress/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Ubuntu 22.04
FROM ros:humble-ros-base-jammy

# Setup timezone
ENV TZ=Etc/UTC
RUN echo $TZ > /etc/timezone && \
ln -fs /usr/share/zoneinfo/$TZ /etc/localtime

# Tools necessary and useful during development
RUN apt update && \
DEBIAN_FRONTEND=noninteractive \
apt install --no-install-recommends -y \
build-essential \
atop \
ca-certificates \
cmake \
cppcheck \
curl \
expect \
gdb \
git \
gnupg2 \
gnutls-bin \
iputils-ping \
libbluetooth-dev \
libccd-dev \
libcwiid-dev \
libeigen3-dev \
libfcl-dev \
libgflags-dev \
libgles2-mesa-dev \
libgoogle-glog-dev \
libspnav-dev \
libusb-dev \
lsb-release \
net-tools \
pkg-config \
protobuf-compiler \
python3-dbg \
python3-empy \
python3-numpy \
python3-setuptools \
python3-pip \
python3-venv \
ruby \
software-properties-common \
sudo \
vim \
wget \
xvfb \
&& apt clean -qq

# Setup locale
RUN sudo apt update && sudo apt install locales \
&& sudo locale-gen en_US en_US.UTF-8 \
&& sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8

ARG ROSDIST=humble
ARG IGNDIST=fortress
ENV IGNITION_VERSION fortress

# Set up repo to install Ignition
RUN /bin/sh -c 'wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg' \
&& /bin/sh -c 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null'

# Install Gazebo and ROS2 Desktop
RUN apt update \
&& apt install -y --no-install-recommends \
ignition-${IGNDIST} \
ros-${ROSDIST}-desktop \
&& rm -rf /var/lib/apt/lists/* \
&& apt clean -qq

# Install some 'standard' ROS packages and utilities.
RUN apt update \
&& apt install -y --no-install-recommends \
python3-colcon-common-extensions \
python3-vcstool \
python3-sdformat13 \
ros-${ROSDIST}-actuator-msgs \
ros-${ROSDIST}-ament-cmake-pycodestyle \
ros-${ROSDIST}-image-transport \
ros-${ROSDIST}-image-transport-plugins \
ros-${ROSDIST}-joy-teleop \
ros-${ROSDIST}-joy-linux \
ros-${ROSDIST}-mavros-msgs \
ros-${ROSDIST}-radar-msgs \
ros-${ROSDIST}-ros-gz \
ros-${ROSDIST}-rqt-graph \
ros-${ROSDIST}-rqt-image-view \
ros-${ROSDIST}-rqt-plot \
ros-${ROSDIST}-rqt-topic \
ros-${ROSDIST}-rviz2 \
ros-${ROSDIST}-xacro \
&& sudo rm -rf /var/lib/apt/lists/* \
&& sudo apt clean -qq
15 changes: 10 additions & 5 deletions run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
# Runs a docker container with the image created by build.bash
# Requires:
# docker
# nvidia-docker
# an X server
# rocker
# Recommended:
# nvidia-docker
# A joystick mounted to /dev/input/js0 or /dev/input/js1
############################################################
# Help #
Expand All @@ -32,22 +32,24 @@ Help()
# Display Help
echo "Runs a docker container with the image created by build.bash."
echo
echo "Syntax: scriptTemplate [-c|s|t|h]"
echo "Syntax: scriptTemplate [-c|s|t|i|h]"
echo "options:"
echo "c Add cuda library support."
echo "s Create an image with novnc for use with cloudsim."
echo "t Create a test image for use with CI pipelines."
echo "x Create base image for the VRX competition server."
echo "i Create image with only intel gpu support."
echo "h Print this help message and exit."
echo
}


JOY=/dev/input/js0
CUDA=""
INTEL=/dev/dri
ROCKER_ARGS="--devices $JOY --dev-helpers --nvidia --x11 --user --home --git"

while getopts ":cstxh" option; do
while getopts ":cstxih" option; do
case $option in
c) # enable cuda library support
CUDA="--cuda ";;
Expand All @@ -59,9 +61,12 @@ while getopts ":cstxh" option; do
x) # Build VRX Competition base image
echo "Building VRX Competition server base image"
ROCKER_ARGS="--dev-helpers --devices $JOY --nvidia --x11 --user --user-override-name=developer";;
h) # print this help message and exit
i) # Build without nividia gpu but only intel gpu
echo "Building with only intel gpu"
ROCKER_ARGS="--dev-helpers --devices $INTEL $JOY --x11 --user --home --git";;
h) # print this help message
Help
exit;;
return 0;;
esac
done

Expand Down