Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Initial ROS drake package and repository information #6

Merged
merged 23 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
44d1a08
Initial ROS drake package and repository information
j-rivero Jan 12, 2024
d4c3525
Added a Dockerfile for testing
j-rivero Jan 16, 2024
9d1dd34
Use Drake real version in package.xml
j-rivero Jan 16, 2024
3b21e0a
Use upstream Drake v1.25.0. Drop clang patch
j-rivero Jan 18, 2024
4f0e964
DRAKE_IS_BUILDING_DOCUMENTATION is a no-op. Removed
j-rivero Jan 18, 2024
0ec7427
Simplify the bash prompt call
j-rivero Jan 18, 2024
98052d3
Remove unused line
j-rivero Jan 18, 2024
a4cd6a9
Added comments on CMAKE_ARGS
j-rivero Jan 18, 2024
659473c
Remove empty line and retab comment
j-rivero Jan 25, 2024
2a80ac7
Replace GLOBAL_HOOK by CONFIG_EXTRAS to provide integration
j-rivero Jan 25, 2024
826e713
Rename the project to drake_vendor
j-rivero Jan 25, 2024
e807355
Use libjchart2d-java from rosdistro and remove custom patch
j-rivero Jan 26, 2024
0044fbd
Back to use drake name for the ROS package
j-rivero Feb 28, 2024
6ce67e4
Improve comment formatting
j-rivero Mar 6, 2024
9d53a2d
Add buildtool depend on lsb-release
j-rivero Mar 6, 2024
f1ce9c5
Patch drake-extras.cmake with comments in #7
j-rivero Mar 6, 2024
9a79d00
Use latest version 1.26.0
j-rivero Mar 6, 2024
e31f5a3
Implement GitHub action testing and remove Dockerfile manual procedure
j-rivero Mar 6, 2024
607c226
Remove dockerfile script
j-rivero Mar 14, 2024
81a91ee
Include reference to the license issue in package.xml
j-rivero Mar 14, 2024
94257a9
Remove drake_cmake_installed_apt from the GitHub testing
j-rivero Mar 14, 2024
b44b5be
Add a comment about the workaround of the install target
j-rivero Mar 14, 2024
6562fe9
Use humble instead of rolling
j-rivero Mar 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/ci.yaml
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+
23 changes: 23 additions & 0 deletions CMakeLists.txt
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)
19 changes: 17 additions & 2 deletions README.md
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.
21 changes: 21 additions & 0 deletions drake-extras.cmake
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)
61 changes: 61 additions & 0 deletions package.xml
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>
Loading