Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Assignment to be Full Robot Software Stack #18

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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 config/wato_asd_training_foxglove_config .json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"/camera": {
"visible": false
},
"/occupancy": {
"/costmap": {
"visible": false,
"colorMode": "costmap"
},
Expand Down
9 changes: 0 additions & 9 deletions docker/.bashrc

This file was deleted.

59 changes: 40 additions & 19 deletions docker/gazebo/gazeboserver.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
# ================= Dependencies ===================
FROM ros:humble AS base
ARG BASE_IMAGE=ghcr.io/watonomous/base:humble-ubuntu22.04

RUN apt-get update && apt-get install -y curl && \
rm -rf /var/lib/apt/lists/*
################################ Source ################################
FROM ${BASE_IMAGE} as source

WORKDIR ${AMENT_WS}/src

# Copy in source code
COPY src/gazebo gazebo

# Scan for rosdeps
RUN apt-get -qq update && rosdep update && \
rosdep install --from-paths . --ignore-src -r -s \
| grep 'apt-get install' \
| awk '{print $3}' \
| sort > /tmp/colcon_install_list

################################# Dependencies ################################
FROM ${BASE_IMAGE} as dependencies

# RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
Expand All @@ -15,24 +29,31 @@ RUN apt-get -y install ros-${ROS_DISTRO}-ros-gz ignition-fortress
RUN apt-get -y install ros-humble-velodyne-gazebo-plugins
RUN echo $GAZEBO_PLUGIN_PATH=/opt/ros/humble/lib

ENV DEBIAN_FRONTEND noninteractive
RUN sudo chsh -s /bin/bash
ENV SHELL=/bin/bash

# ================= Repositories ===================
FROM base as repo
# Install Rosdep requirements
COPY --from=source /tmp/colcon_install_list /tmp/colcon_install_list
RUN apt-fast install -qq -y --no-install-recommends $(cat /tmp/colcon_install_list)

WORKDIR /root
# Copy in source code from source stage
WORKDIR ${AMENT_WS}
COPY --from=source ${AMENT_WS}/src src

ENV DEBIAN_FRONTEND interactive
# Dependency Cleanup
WORKDIR /
RUN apt-get -qq autoremove -y && apt-get -qq autoclean && apt-get -qq clean && \
rm -rf /root/* /root/.ros /tmp/* /var/lib/apt/lists/* /usr/share/doc/*

COPY docker/wato_ros_entrypoint.sh /root/wato_ros_entrypoint.sh
COPY docker/ros_entrypoint.sh /root/ros_entrypoint.sh
COPY docker/.bashrc /root/.bashrc
################################ Build ################################
FROM dependencies as build

ENTRYPOINT ["/root/ros_entrypoint.sh"]
# Build ROS2 packages
WORKDIR ${AMENT_WS}
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
colcon build \
--cmake-args -DCMAKE_BUILD_TYPE=Release --install-base ${WATONOMOUS_INSTALL}

# CMD ["sleep", "infinity"]
# CMD ["ign", "launch", "launch/sim.ign"]
# Source and Build Artifact Cleanup
RUN rm -rf src/* build/* devel/* install/* log/*

CMD ["ros2", "launch", "src/gazebo/launch/sim.launch.py"]
# Entrypoint will run before any CMD on launch. Sources ~/opt/<ROS_DISTRO>/setup.bash and ~/ament_ws/install/setup.bash
COPY docker/wato_ros_entrypoint.sh ${AMENT_WS}/wato_ros_entrypoint.sh
ENTRYPOINT ["./wato_ros_entrypoint.sh"]
38 changes: 0 additions & 38 deletions docker/infrastructure/vis_tools/foxglove.Dockerfile

This file was deleted.

30 changes: 0 additions & 30 deletions docker/robot/control.Dockerfile

This file was deleted.

30 changes: 0 additions & 30 deletions docker/robot/nav.Dockerfile

This file was deleted.

30 changes: 0 additions & 30 deletions docker/robot/occupancy.Dockerfile

This file was deleted.

53 changes: 53 additions & 0 deletions docker/robot/robot.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
ARG BASE_IMAGE=ghcr.io/watonomous/robot_base/base:humble-ubuntu22.04

################################ Source ################################
FROM ${BASE_IMAGE} as source

WORKDIR ${AMENT_WS}/src

# Copy in source code
COPY src/robot/costmap costmap
COPY src/robot/map_server map_server
COPY src/robot/planner planner
COPY src/robot/state_machine state_machine
COPY src/robot/control control
COPY src/robot/bringup_robot bringup_robot

# Scan for rosdeps
RUN apt-get -qq update && rosdep update && \
rosdep install --from-paths . --ignore-src -r -s \
| grep 'apt-get install' \
| awk '{print $3}' \
| sort > /tmp/colcon_install_list

################################# Dependencies ################################
FROM ${BASE_IMAGE} as dependencies

# Install Rosdep requirements
COPY --from=source /tmp/colcon_install_list /tmp/colcon_install_list
RUN apt-fast install -qq -y --no-install-recommends $(cat /tmp/colcon_install_list)

# Copy in source code from source stage
WORKDIR ${AMENT_WS}
COPY --from=source ${AMENT_WS}/src src

# Dependency Cleanup
WORKDIR /
RUN apt-get -qq autoremove -y && apt-get -qq autoclean && apt-get -qq clean && \
rm -rf /root/* /root/.ros /tmp/* /var/lib/apt/lists/* /usr/share/doc/*

################################ Build ################################
FROM dependencies as build

# Build ROS2 packages
WORKDIR ${AMENT_WS}
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
colcon build \
--cmake-args -DCMAKE_BUILD_TYPE=Release --install-base ${WATONOMOUS_INSTALL}

# Source and Build Artifact Cleanup
RUN rm -rf src/* build/* devel/* install/* log/*

# Entrypoint will run before any CMD on launch. Sources ~/opt/<ROS_DISTRO>/setup.bash and ~/ament_ws/install/setup.bash
COPY docker/wato_ros_entrypoint.sh ${AMENT_WS}/wato_ros_entrypoint.sh
ENTRYPOINT ["./wato_ros_entrypoint.sh"]
7 changes: 0 additions & 7 deletions docker/ros_entrypoint.sh

This file was deleted.

30 changes: 0 additions & 30 deletions docker/samples/cpp/aggregator.Dockerfile

This file was deleted.

30 changes: 0 additions & 30 deletions docker/samples/cpp/producer.Dockerfile

This file was deleted.

30 changes: 0 additions & 30 deletions docker/samples/cpp/transformer.Dockerfile

This file was deleted.

Loading