Giter Site home page Giter Site logo

ros-bazel's Introduction

Build ROS packages using Bazel

Bazel is the open-source version of Google's internal build system, featuring fast incremental compiles and remote caching for distributed builds.

It proved really fast on some of the benchmarks I ran, so I decided to try using it to build ROS packages.

Since converting the whole ROS build to Bazel is quite a lot of work (albeit highly recommended for larger teams), this project takes a different route and imports a prebuilt ROS environment (likely installed using apt and the default instructions). This gets you the best of both worlds: your code builds and tests using Bazel, and there's no overhead in maintaining Bazel builds of the whole ROS ecosystem.

It's even possible to import other catkin packages outside of the default ROS binary distribution.

Status

  • Import C++ libraries like roscpp, etc..
  • Code generation for messages, both C++ and Python
  • Depend on Bazel-generated messages
  • Bazel caching and sandboxing ready
  • ROS Python libraries are not imported into Bazel. Python is generally quite messy in Bazel anyhow.
  • Integration with rospack, roslaunch, and generally anything that crawls the filesystem at runtime. Bazel-built binaries will probably just not be found by such tools.
  • Actions, services, dynamic_reconfigure and probably other less-known message-based stuff.

This code is not supported in any way, and probably not recommended for production use. I just wanted to see if there was an easier way to onboard ROS teams to Bazel without having to maintain a whole separate build system for ROS.

Try it out

Get a shell in the docker environment:

docker-compose build && docker-compose run bazeler bash

Start a talker node with custom messages:

bazel run //src/talker

How it works

It uses a Bazel repository rule to parse the ROS installation under /opt/ros/melodic and produce Bazel BUILD files and repositories. For example, roscpp becomes a @roscpp Bazel target that add the correct link and compile flags.

ros-bazel's People

Contributors

garethellis0 avatar mposa avatar nicolov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.