Skip to content

Commit

Permalink
Dockerfile: Download, build, & install ros2_laser_scan_merger & depen…
Browse files Browse the repository at this point in the history
…dencies
  • Loading branch information
wltjr committed Nov 5, 2024
1 parent 4e11081 commit 299ef31
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ RUN apt-get update && apt-get upgrade -y --no-install-recommends

# install ros2 packages
RUN apt-get update && apt-get install -y --no-install-recommends \
libpcl-dev \
libusb-1.0-0-dev \
python3-colcon-devtools \
python3-colcon-package-selection \
Expand All @@ -17,6 +18,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ros-jazzy-joint-state-publisher \
ros-jazzy-joy-linux \
ros-jazzy-joy-teleop \
ros-jazzy-pcl-conversions \
ros-jazzy-pointcloud-to-laserscan \
ros-jazzy-robot-state-publisher \
ros-jazzy-ros2-controllers \
Expand All @@ -25,6 +27,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ros-jazzy-slam-toolbox \
ros-jazzy-teleop-twist-keyboard \
ros-jazzy-xacro \
unzip \
&& rm -rf /var/lib/apt/lists/*

# ros 2 env
Expand All @@ -35,6 +38,15 @@ RUN echo "[[ -d /opt/ros_ws/install ]] && source /opt/ros_ws/install/setup.sh" \
# ros 2 workspace
RUN mkdir -p /opt/ros_ws/src

# ros2_laser_scan_merger
RUN cd /opt/ros_ws/src && \
wget https://github.com/mich1342/ros2_laser_scan_merger/archive/refs/heads/main.zip && \
unzip main.zip && rm main.zip && \
mv ros2_laser_scan_merger-main ros2_laser_scan_merger && \
cd ../ && \
. /opt/ros/jazzy/setup.sh && \
colcon build --symlink-install --packages-select ros2_laser_scan_merger

# common commands added to history
RUN echo "ros2 run teleop_twist_keyboard teleop_twist_keyboard" \
>> /root/.bash_history
Expand Down

0 comments on commit 299ef31

Please sign in to comment.