ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unless you have a very compelling reason to use bazel, don't. It does a lot of things that aren't terribly compatible with the ROS package management system or traditional open-source build systems and package management.

The company that I work for uses bazel for our internal build system, and we have custom build rules for all of the ROS packages that we use, and a custom compatibility layer between bazel packages and ROS packages. Our rules are pretty specific to our application and are a pretty invasive modification to ROS, so we're not willing to open source them.

Bazel doesn't have any way to import local packages that are build by other tools (it can't read pkgconfig files or cmake find-package files), so it isn't easy to bring in external packages.

In theory you could install the precompiled ROS packages for Ubuntu or build and install ROS the normal way, and then add those libraries to bazel's WORKSPACE file, but that's still quite a bit of setup and you lose all of the inter-package dependencies that are defined in the cmake files and the package.xml files, so you'd have to either lump all of the ROS libraries into a single target, or redefine all of the packages and their dependencies within bazel.