maliput / drake_ros_buildfarm

ROS packaging for building Drake into the ros_buildfarm
0 stars 0 forks source link

Tracker: build Drake inside the ros_buildfarm #1

Open j-rivero opened 1 year ago

j-rivero commented 1 year ago

In order to build maliput packages that depends on Drake inside the ROS buildfarm and distribute them through the ROS repositories, first step is being able to build Drake as a ROS package that can be used for other ROS packages.

Considerations #

Roadmap and tracking #

Prototype building of Drake 1.12 on Ubuntu Jammy with a rootless user

Implement Drake 1.12 as a ROS package

jwnimmer-tri commented 1 year ago

Thanks for the write-up!

FYI on some notes:

Drake Debian packaging metadata is available in the debian-drake repository.

Oops! That repository is outdated, but we forgot to mark it as such (see https://github.com/RobotLocomotion/debian-drake/pull/3). Mea culpa.

Our https://drake.mit.edu/apt.html binaries are created using the drake/tools/release_engineering scripts now, following the https://drake.mit.edu/release_playbook.html.

The bottom line is that we make a release archive (tgz) file using the CMake install, and then we run alien on it. Trying to use dpkg-buildpackage was a lot of hassle with little benefit.

Drake supports a variety of solvers, at least three are commercial optimization solvers dependencies: SNOPT, MOSEK, and GUROBI. Installation is optional.

Drake has obtained a license grant to enable MOSEK during the build, and that grant transfers to anyone else redistributing Drake as well.

We're working on doing the same for Gurobi (https://github.com/RobotLocomotion/drake/issues/10804).

(I agree that it makes sense to keep those turned off during the initial testing phase here.)

Drake aims to vendor and statically link all of our dependencies using hidden symbols. Usually the version of the dependencies need not match up other uses of the library within the user's ecosystem. The only exceptions to the design in the point above are for the interface libraries: Eigen, fmt, and spdlog.

Exactly right.

Drake assume that the user will use the host OS version of the libraries.

Drake defaults to using the host OS version, but you can change it to use your own build via CMake options:

    -DWITH_USER_EIGEN:BOOLEAN=ON
    -DWITH_USER_FMT:BOOLEAN=ON
    -DWITH_USER_SPDLOG:BOOLEAN=ON

... in which case Drake will use find_package() for those dependencies.

VTK is built using Dockerfile, upload to S3 and Drake build is using the binaries from S3. Need to find a way of building VTK from source to go into the ROS buildfarm.

As of v1.11.0 when running on Jammy, Drake uses the host OS VTK; see https://github.com/RobotLocomotion/drake/pull/18340.

When we upgrade to VTK 10, we might switch back binary downloads, though. If it helps, we might be able to preserve an option to rebuild VTK from source.

Code downloads in the ROS Buildfarm are allowed at building time although other alternatives are preferred.

Drake fetches most of its externals' source code via downloads (with mirrors), but there are ways to populate that cache ahead of time and/or disable source downloads (in which case pre-population would become mandatory).