Skip to content

Commit

Permalink
change Dockerfile to use galactic
Browse files Browse the repository at this point in the history
  • Loading branch information
lauritk-solita committed Mar 25, 2024
1 parent b5616fc commit ab84cc3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
20 changes: 9 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
FROM ros:humble-ros-base AS builder
FROM ros:galactic-ros-base AS builder

ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8

RUN apt-get update -y && apt-get install -y --no-install-recommends \
build-essential git wget cmake lsb-core ninja-build \
ros-humble-gazebo-ros \
ros-galactic-gazebo-ros \
libopencv-dev \
libgstreamer-plugins-base1.0-dev \
python3-jinja2 \
&& rm -rf /var/lib/apt/lists/*


# Clone c_library_v2 commit matching with current px4-firmware mavlink commit
# => mavlink/c_library_v2:fbdb7c29 is built from mavlink/mavlink:08112084
RUN git clone -q https://github.com/mavlink/c_library_v2.git /usr/local/include/mavlink && \
cd /usr/local/include/mavlink && git checkout -q fbdb7c29e47902d44eeaa58b4395678a9b78f3ae && \
cd /usr/local/include/mavlink && git checkout -q 0129097f684ec76f44ae25fb4d64487c96d53317 && \
rm -rf /usr/local/include/mavlink/.git

ENV _MAVLINK_INCLUDE_DIR /usr/local/include/mavlink
Expand All @@ -26,7 +24,7 @@ COPY . .

SHELL ["/bin/bash", "-c"]

RUN source /opt/ros/humble/setup.bash && \
RUN source /opt/ros/galactic/setup.bash && \
mkdir -p build && \
cd build && \
cmake .. && \
Expand All @@ -35,11 +33,11 @@ RUN source /opt/ros/humble/setup.bash && \
WORKDIR /artifacts

RUN mkdir -p plugins \
&& mkdir -p models \
&& mkdir -p scripts \
&& cp -r /px4_sitl_gazebo/models/ssrc_fog_x models/ssrc_fog_x \
&& cp /px4_sitl_gazebo/scripts/jinja_gen.py scripts/jinja_gen.py \
&& find /px4_sitl_gazebo/build/*.so -exec cp {} plugins \;
&& mkdir -p models \
&& mkdir -p scripts \
&& cp -r /px4_sitl_gazebo/models/ssrc_fog_x models/ssrc_fog_x \
&& cp /px4_sitl_gazebo/scripts/jinja_gen.py scripts/jinja_gen.py \
&& find /px4_sitl_gazebo/build/*.so -exec cp {} plugins \;


FROM busybox
Expand Down
14 changes: 6 additions & 8 deletions Dockerfile.validate_sdf
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
FROM ros:humble-ros-base
FROM ros:galactic-ros-base

ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
ENV LC_ALL C.UTF-8

RUN apt-get update -y && apt-get install -y --no-install-recommends \
build-essential git wget cmake lsb-core ninja-build \
ros-humble-gazebo-ros \
ros-galactic-gazebo-ros \
libopencv-dev \
libgstreamer-plugins-base1.0-dev \
python3-jinja2 \
&& rm -rf /var/lib/apt/lists/*

# Clone c_library_v2 commit matching with current px4-firmware mavlink commit
# => mavlink/c_library_v2:fbdb7c29 is built from mavlink/mavlink:08112084
RUN git clone -q https://github.com/mavlink/c_library_v2.git /usr/local/include/mavlink && \
cd /usr/local/include/mavlink && git checkout -q fbdb7c29e47902d44eeaa58b4395678a9b78f3ae && \
rm -rf /usr/local/include/mavlink/.git
RUN git clone -q https://github.com/mavlink/c_library_v2.git /usr/local/include/mavlink/v2.0 && \
cd /usr/local/include/mavlink/v2.0 && git checkout -q f03d91ae932dd718d81f851b584dbd21cffafdd2 && \
rm -rf /usr/local/include/mavlink/v2.0/.git

WORKDIR /px4_sitl_gazebo
COPY . .

SHELL ["/bin/bash", "-c"]

RUN source /opt/ros/humble/setup.bash && \
RUN source /opt/ros/galactic/setup.bash && \
mkdir -p build && \
cd build && \
cmake .. && \
Expand Down

0 comments on commit ab84cc3

Please sign in to comment.