Use rosdep

This commit is contained in:
Daisuke Sato 2021-05-22 18:43:59 +09:00
parent 38a5125306
commit a036806572

View file

@ -16,6 +16,10 @@ ENTRYPOINT ["/bin/bash", "-c"]
ARG ROS_DISTRO ARG ROS_DISTRO
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> $BASH_ENV RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> $BASH_ENV
# Copy myCobot ROS package
WORKDIR /catkin_ws/src
COPY . mycobot_ros
# Install build dependencies # Install build dependencies
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y \ apt-get install -y \
@ -24,11 +28,9 @@ RUN apt-get update && \
python-rosinstall-generator \ python-rosinstall-generator \
python-wstool \ python-wstool \
build-essential \ build-essential \
# Project-specific build dependencies python-pip && \
python-pip \ # Project-specific build dependencies
ros-${ROS_DISTRO}-moveit \ rosdep install -r -y -i --from-paths . && \
ros-${ROS_DISTRO}-serial \
ros-${ROS_DISTRO}-joint-state-publisher-gui && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Install python dependencies # Install python dependencies
@ -36,8 +38,6 @@ ARG PYMYCOBOT_VERSION
RUN pip install "pymycobot $PYMYCOBOT_VERSION" --user RUN pip install "pymycobot $PYMYCOBOT_VERSION" --user
# Build the project # Build the project
WORKDIR /catkin_ws/src
ADD . mycobot_ros
WORKDIR /catkin_ws WORKDIR /catkin_ws
RUN catkin_make RUN catkin_make