Skip to content
Open
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
43 changes: 43 additions & 0 deletions Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM osrf/ros:humble-desktop

SHELL ["/bin/bash", "-c"]
WORKDIR /botbrain_ws
COPY ./botbrain_ws/ /botbrain_ws/

# Dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3-rosdep2 python3-colcon-common-extensions python3-vcstool python3-pygame\
cmake g++ build-essential \
libyaml-cpp-dev libeigen3-dev libboost-all-dev libspdlog-dev libfmt-dev \
iproute2 \
&& rm -rf /var/lib/apt/lists/*

# Install Unitree SDK2
RUN git clone https://github.com/unitreerobotics/unitree_sdk2.git /tmp/unitree_sdk2 \
&& cd /tmp/unitree_sdk2 \
&& mkdir -p build && cd build \
&& cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/ \
&& make -j"$(nproc)" \
&& make install \
&& rm -rf /tmp/unitree_sdk2

# Install Cyclone RMW DDS
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-humble-rmw-cyclonedds-cpp \
&& rm -rf /var/lib/apt/lists/*


# Rosdep dependencies
RUN if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then rosdep init; fi \
&& apt update \
&& rosdep update --rosdistro humble \
&& source /opt/ros/humble/setup.bash \
&& rosdep install --from-paths src --ignore-src -r -y --rosdistro humble


# Persist ROS2 source
RUN echo "source /opt/ros/humble/setup.bash" >> /root/.bashrc


# Compile the ROS2 packages
RUN source /opt/ros/humble/setup.bash && colcon build