This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial ROS drake package and repository information (#6)
New ROS drake package based on just calling ament_vendor to download, build and install Drake. In this initial phase the GUROBI, MOSEK and SNOPT components are disabled in the build using the CMake parameters. The ament_vendor uses a couple of patches to deal with issues related to clang version and to disable the assumption of platform having a libjchart2d-java package. Patches uses the Debian DEP-3 format to include metadata on the same file. Dependencies are based on the official documentation and comments are in package.xml.
- Loading branch information
Showing
5 changed files
with
162 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: drake colcon ws | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
build_testing: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
required-ros-distributions: humble | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
package-name: drake | ||
target-ros2-distro: humble | ||
skip-tests: true | ||
# Remove cmake-target after https://github.com/RobotLocomotion/ros-drake-vendor/issues/10 | ||
colcon-defaults: | | ||
{ | ||
"build": { | ||
"cmake-target": "install", | ||
"merge-install": true | ||
} | ||
} | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: RobotLocomotion/drake-external-examples | ||
ref: main | ||
path: ros_ws/src | ||
- name: build tests | ||
shell: bash | ||
working-directory: ros_ws | ||
run: | | ||
# gflags is required by drake_cmake_installed | ||
sudo apt-get update && sudo apt-get install -y libgflags-dev | ||
. /opt/ros/humble/setup.bash | ||
. install/setup.bash | ||
colcon build --merge-install --packages-select drake_cmake_installed drake_ament_cmake_installed --event-handlers console_direct+ |
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,23 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
project(drake CXX) | ||
|
||
find_package(ament_cmake REQUIRED) | ||
find_package(ament_cmake_vendor_package REQUIRED) | ||
|
||
ament_vendor(drake | ||
VCS_URL https://github.com/RobotLocomotion/drake | ||
VCS_VERSION v1.26.0 | ||
CMAKE_ARGS | ||
# At the moment, closed-source dependencies are disabled. | ||
-DWITH_GUROBI:BOOL=OFF | ||
-DWITH_MOSEK:BOOL=OFF | ||
-DWITH_SNOPT:BOOL=OFF | ||
# Drake should use the Ament version of these dependencies found by CMake, | ||
# not the Ubuntu version found in /usr/include. | ||
-DWITH_USER_EIGEN:BOOL=ON | ||
-DWITH_USER_FMT:BOOL=ON | ||
-DWITH_USER_SPDLOG:BOOL=ON | ||
GLOBAL_HOOK | ||
) | ||
|
||
ament_package(CONFIG_EXTRAS drake-extras.cmake) |
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,2 +1,17 @@ | ||
# ros-drake-vendor | ||
Maintainer scripts that package Drake in the ROS build farm | ||
# Drake installation for ROS environments | ||
|
||
The repository contains the sources for installing the | ||
[Drake toolbox](http://drake.mit.edu) inside the [ROS](http://ros.org) | ||
ecosystem. These sources are ready to be installed using the ROS | ||
Buildfarm or any other ROS related build process. | ||
|
||
These sources specifically install the Drake Toolbox software. It's important | ||
to note that this is distinct from other code installations that may involve | ||
ROS helpers or ROS wrappers for Drake. | ||
|
||
# Installation process | ||
|
||
The repository defines a ROS package named drake, which facilitates the | ||
download of the Drake sources from its official repository. Subsequently, it | ||
invokes the CMake build system within these sources to facilitate the | ||
generation of a system installation for the toolbox. |
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,21 @@ | ||
# The code will search for the upstream drake-config.cmake file | ||
# installed under the root of the ROS installation + /opt/drake | ||
# (i.e /opt/ros/rolling/opt/drake ). | ||
# | ||
# Long explanation of how this file works can be found in: | ||
# https://github.com/RobotLocomotion/ros-drake-vendor/issues/7#issuecomment-1979757703 | ||
|
||
# drake_DIR will return the absolute path to the ROS package | ||
# of drake (share/drake/cmake under the ROS root installation) | ||
# The relative path should drive us to the root of the drake | ||
# upstream installation done under ROS. | ||
set(_drake_path "${drake_DIR}/../../../opt/drake") | ||
|
||
# Since the upstream installation has the same CMake module name | ||
# than the ROS package we need to unset the cache variable | ||
# that points to the ROS package to be sure to force the | ||
# find_package to find the drake config module under the | ||
# paths | ||
unset(drake_DIR CACHE) | ||
|
||
find_package(drake PATHS ${_drake_path} NO_DEFAULT_PATH) |
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,61 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="2"> | ||
<name>drake</name> | ||
<version>1.26.0</version> | ||
<description> | ||
The drake package provides a ROS installation for the Drake project: | ||
https://drake.mit.edu/. The package uses ament_vendor to | ||
download and build a given Drake version. | ||
</description> | ||
<maintainer email="[email protected]">Drake Users</maintainer> | ||
<license>BSD</license> <!-- See https://github.com/RobotLocomotion/ros-drake-vendor/issues/13 --> | ||
<!-- | ||
Missing Ubuntu dependencies in rosdistro from the list: | ||
https://github.com/RobotLocomotion/drake/blob/v1.24.0/setup/ubuntu/source_distribution/packages-jammy.txt | ||
- libg-dev (installed indirectly by opengl) | ||
- libglx-dev (installed indirectly by qtbase5-dev) | ||
- libmumps-seq-dev (installed indirectly, dependecy of coinor-libipopt-dev) | ||
- patch (core dependency for any jammy system) | ||
- python3-all-dev (equivalent to python3-dev) | ||
Deb packages depends: | ||
- python3 (python3-dev rosdep) | ||
- libpython3-all-dev (python3-dev rosdep via libpython3-dev dep) | ||
- python3-all: | ||
Deb packages depends: | ||
- python3 (python3-dev rosdep) | ||
- python3-distutils (python3-dev rosdep) | ||
- python3-dev (python3-dev rosdep) | ||
- python3.8-dev (python3-dev rosdep) | ||
--> | ||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
<buildtool_depend>ament_cmake_vendor_package</buildtool_depend> | ||
<buildtool_depend>clang</buildtool_depend> | ||
<buildtool_depend>file</buildtool_depend> | ||
<buildtool_depend>gfortran</buildtool_depend> | ||
<buildtool_depend>git</buildtool_depend> | ||
<buildtool_depend>lsb-release</buildtool_depend> | ||
<buildtool_depend>nasm</buildtool_depend> | ||
<buildtool_depend>opencl-headers</buildtool_depend> | ||
<buildtool_depend>patchelf</buildtool_depend> | ||
<buildtool_depend>pkg-config</buildtool_depend> | ||
<depend>coinor-libipopt-dev</depend> | ||
<depend>java</depend> | ||
<depend>libclang-dev</depend> | ||
<depend>libjchart2d-java</depend> | ||
<depend>libglib-dev</depend> | ||
<depend>liblapack-dev</depend> | ||
<depend>libx11-dev</depend> | ||
<depend>ocl-icd-opencl-dev</depend> | ||
<depend>opengl</depend> | ||
<depend>python3-dev</depend> | ||
<depend>python3-distutils</depend> | ||
<depend>python3-matplotlib</depend> | ||
<depend>qtbase5-dev</depend> | ||
<depend>zlib</depend> | ||
<!-- External dependencies supported by CMake --> | ||
<buildtool_depend>eigen</buildtool_depend> | ||
<depend>fmt</depend> | ||
<depend>spdlog</depend> | ||
</package> |