-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Optimized dockerfile - Made build time quicker - Switch to rolling - Used drake-noble-1.30.0 * pre-commit fix * Updated readme ( see #54 (comment) ) * Deleted drake deb after installing and fixed typo in dockerfile * Added Drake version as an argument and fixed some overlooked stuffs * Give docker arguments through docker compose yaml --------- Co-authored-by: DarkusAlphaHydranoid <[email protected]>
- Loading branch information
1 parent
fec4b0a
commit df7d3b4
Showing
4 changed files
with
53 additions
and
64 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,47 @@ | ||
FROM robotlocomotion/drake:1.29.0 | ||
LABEL maintainer="Aditya Kamireddypalli [email protected]" | ||
ARG ROS_DISTRO=rolling | ||
ARG RMW_IMPLEMENTATION=rmw_cyclonedds_cpp | ||
ARG DRAKE_VERSION=1.30.0-1 | ||
|
||
ENV ROS_DISTRO=humble | ||
ENV WORKSPACE=/root/workspace/ | ||
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
FROM moveit/moveit2:${ROS_DISTRO}-source | ||
LABEL maintainer="Aditya Kamireddypalli [email protected]" | ||
|
||
# ROS installation | ||
RUN apt update && \ | ||
apt install locales && \ | ||
locale-gen en_US en_US.UTF-8 && \ | ||
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ | ||
export LANG=en_US.UTF-8 | ||
ARG ROS_DISTRO | ||
ARG RMW_IMPLEMENTATION | ||
ARG DRAKE_VERSION | ||
|
||
RUN apt install -y software-properties-common && \ | ||
add-apt-repository universe | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV WORKSPACE=${ROS_UNDERLAY}/.. | ||
|
||
COPY . ${WORKSPACE}/src/moveit_drake | ||
|
||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends \ | ||
ca-certificates \ | ||
gnupg \ | ||
lsb-release \ | ||
wget -y && \ | ||
wget -qO- https://drake-apt.csail.mit.edu/drake.asc | gpg --dearmor - \ | ||
| sudo tee /etc/apt/trusted.gpg.d/drake.gpg >/dev/null && \ | ||
echo "deb [arch=amd64] https://drake-apt.csail.mit.edu/$(lsb_release -cs) $(lsb_release -cs) main" \ | ||
| sudo tee /etc/apt/sources.list.d/drake.list >/dev/null && \ | ||
apt-get update && \ | ||
apt-get install --no-install-recommends drake-dev=${DRAKE_VERSION} -y | ||
|
||
RUN apt update && \ | ||
apt install -y curl git && \ | ||
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \ | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null | ||
RUN . /opt/ros/${ROS_DISTRO}/setup.sh && \ | ||
cd ${WORKSPACE}/src && \ | ||
vcs import < moveit_drake/.docker/upstream.repos --recursive | ||
|
||
RUN apt update && \ | ||
RUN . /opt/ros/${ROS_DISTRO}/setup.sh && \ | ||
cd ${WORKSPACE} && \ | ||
rosdep update --rosdistro=$ROS_DISTRO && \ | ||
apt-get update && \ | ||
apt upgrade -y && \ | ||
apt install -y \ | ||
build-essential \ | ||
clang-format-14 \ | ||
clangd-12 \ | ||
cmake \ | ||
git-lfs \ | ||
python3-colcon-common-extensions \ | ||
python3-flake8 \ | ||
python3-rosdep \ | ||
python3-setuptools \ | ||
python3-vcstool \ | ||
ros-dev-tools \ | ||
ros-${ROS_DISTRO}-desktop \ | ||
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ | ||
wget && \ | ||
update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-12 100 | ||
|
||
RUN pip3 install colcon-mixin pre-commit && \ | ||
colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml && \ | ||
colcon mixin update default | ||
|
||
RUN apt update && \ | ||
rosdep init && \ | ||
rosdep update | ||
|
||
# Setup the workspace | ||
WORKDIR ${WORKSPACE} | ||
RUN mkdir -p src | ||
|
||
# Install dependencies of this package | ||
# NOTE: Copying only the necessary files to not bust cache as much. | ||
COPY moveit_drake.repos ${WORKSPACE}/src/moveit_drake/ | ||
WORKDIR ${WORKSPACE}/src/ | ||
RUN vcs import < moveit_drake/moveit_drake.repos | ||
|
||
WORKDIR ${WORKSPACE} | ||
COPY package.xml ${WORKSPACE}/src/moveit_drake/ | ||
RUN apt update && \ | ||
. /opt/ros/${ROS_DISTRO}/setup.sh && \ | ||
rosdep install -r --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y && \ | ||
rm -rf src/moveit_drake | ||
rosdep install --from-paths src --ignore-src -r -y && \ | ||
apt-get install ros-${ROS_DISTRO}-rmw-cyclonedds-cpp -y | ||
|
||
RUN . /opt/ros/${ROS_DISTRO}/setup.sh && \ | ||
cd ${WORKSPACE} && \ | ||
. install/setup.sh && \ | ||
colcon build --mixin release --parallel-workers 1 | ||
|
||
# Set up the entrypoint | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
repositories: | ||
moveit_visual_tools: | ||
type: git | ||
url: https://github.com/moveit/moveit_visual_tools | ||
version: ros2 | ||
rviz_visual_tools: | ||
type: git | ||
url: https://github.com/PickNikRobotics/rviz_visual_tools.git | ||
version: ros2 |
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
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