mirror of
https://github.com/elephantrobotics/mycobot_ros.git
synced 2026-07-14 09:00:53 +00:00
Merge pull request #22 from graziegrazie/docker
Do you add ros-${ROS_DISTRO}-moveit, and modify docker-compose.yml to use ROS1 melodic?
This commit is contained in:
commit
bd7fbd9ec8
2 changed files with 9 additions and 8 deletions
13
Dockerfile
13
Dockerfile
|
|
@ -7,7 +7,7 @@ FROM ${BASE_IMAGE}
|
||||||
# (or without GPU) works through docker.
|
# (or without GPU) works through docker.
|
||||||
# I was unable to use the ROS_DISTRO variable here due to this issue:
|
# I was unable to use the ROS_DISTRO variable here due to this issue:
|
||||||
# https://github.com/docker/for-mac/issues/2155
|
# https://github.com/docker/for-mac/issues/2155
|
||||||
COPY --from=osrf/ros:kinetic-desktop-full / /
|
COPY --from=osrf/ros:melodic-desktop-full / /
|
||||||
|
|
||||||
# Add ROS env vars to the bashrc
|
# Add ROS env vars to the bashrc
|
||||||
ENV BASH_ENV="/root/launch.sh"
|
ENV BASH_ENV="/root/launch.sh"
|
||||||
|
|
@ -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,10 +28,9 @@ RUN apt-get update && \
|
||||||
python-rosinstall-generator \
|
python-rosinstall-generator \
|
||||||
python-wstool \
|
python-wstool \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
python-pip && \
|
||||||
# Project-specific build dependencies
|
# Project-specific build dependencies
|
||||||
python-pip \
|
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
|
||||||
|
|
@ -35,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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ x-app: &common
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
args: &common-args
|
args: &common-args
|
||||||
ROS_DISTRO: "kinetic"
|
ROS_DISTRO: "melodic"
|
||||||
PYMYCOBOT_VERSION: ">=2<3"
|
PYMYCOBOT_VERSION: ">=2<3"
|
||||||
BASE_IMAGE: nvidia/opengl:1.1-glvnd-runtime-ubuntu18.04
|
BASE_IMAGE: nvidia/opengl:1.1-glvnd-runtime-ubuntu18.04
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue