Last active
June 1, 2019 09:45
-
-
Save YoheiKakiuchi/941d2eff594249da4950e1a2f7f45c1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM osrf/ros:melodic-desktop | |
SHELL ["bash", "-c"] | |
ENV WORKSPACE /catkin_ws | |
ARG RUN_TESTS=true | |
ARG AERO_TYPE=typeF | |
# prepare catkin and all euslisp packages | |
RUN apt-get -q -qq update && apt-get -q -qq install -y \ | |
ros-${ROS_DISTRO}-catkin \ | |
python-wstools python-catkin-tools \ | |
bc net-tools iputils-ping | |
# create catkin workspace | |
#RUN mkdir -p ${WORKSPACE}/src/aero-ros-pkg | |
WORKDIR ${WORKSPACE} | |
RUN wstool init ${WORKSPACE}/src | |
# COPY . ${WORKSPACE}/src/aero-ros-pkg/ | |
RUN wstool set -y -t src aero-ros-pkg https://github.com/seed-solutions/aero-ros-pkg.git --git && \ | |
wstool update -t src | |
COPY . ${WORKSPACE}/src/moveit | |
# catkin build | |
WORKDIR ${WORKSPACE} | |
RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ | |
&& rosdep install -q -y -r --from-paths src --ignore-src \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/ | |
RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ | |
&& catkin config --init | |
RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ | |
&& catkin build aero_description | |
WORKDIR ${WORKSPACE}/src/aero-ros-pkg/aero_description | |
RUN source ${WORKSPACE}/devel/setup.bash \ | |
&& ./setup.sh $AERO_TYPE | |
WORKDIR ${WORKSPACE} | |
## build check | |
RUN source ${WORKSPACE}/devel/setup.bash \ | |
&& catkin build aero_std | |
RUN source ${WORKSPACE}/devel/setup.bash \ | |
&& catkin build aero_samples | |
RUN source ${WORKSPACE}/devel/setup.bash \ | |
&& catkin build aero_gazebo | |
## test | |
RUN if [ "$RUN_TESTS" = "true" ]; then \ | |
source ${WORKSPACE}/devel/setup.bash \ | |
&& catkin run_tests --no-deps aero_ros_controller \ | |
&& catkin_test_results ${WORKSPACE}/build/aero_ros_controller; fi | |
RUN if [ "$RUN_TESTS" = "true" ]; then \ | |
source ${WORKSPACE}/devel/setup.bash \ | |
&& catkin run_tests --no-deps aero_std \ | |
&& catkin_test_results ${WORKSPACE}/build/aero_std; fi | |
RUN if [ "$RUN_TESTS" = "true" ]; then \ | |
source ${WORKSPACE}/devel/setup.bash \ | |
&& catkin run_tests --no-deps aero_samples \ | |
&& catkin_test_results ${WORKSPACE}/build/aero_samples; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment