Installation#

Installing binaries#

Beluga binaries are released to several ROS distributions, and thus are made available through package managers.

Important

Only beluga, beluga_ros, and beluga_amcl packages are available as binaries. The rest must be built from source.

Follow the official ROS documentation on how to setup apt sources for the distribution of choice. You may also want to consider using ros2-testing repositories to get the absolute latest release for the target distribution.

Then:

sudo apt install ros-${ROS_DISTRO}-beluga*

Building from source (with ROS)#

Tip

If you intend to contribute to Beluga, consider adopting Beluga’s development workflows.

Install ROS distribution#

Follow official ROS documentation on how to install the distribution of choice. ROS development tools will be necessary – colcon and rosdep at the very least.

Remember to source the corresponding installation from now on, as documented upstream:

source /opt/ros/${ROS_DISTRO}/setup.bash

If in doubt as to which ROS distribution to use, check the list of supported distributions.

Clone Beluga repository#

All packages in the Beluga project are ROS packages. Cloning them into a local workspace is thus best for subsequent build, install, and use:

mkdir -p ~/ws/src
git clone https://github.com/Ekumen-OS/beluga.git ~/ws/src/beluga

Install dependencies#

First of all, ensure your system and package manager are up to date before proceeding.

sudo apt update && sudo apt upgrade

Then use rosdep to install Beluga packages’ dependencies:

rosdep update
rosdep install -r --from-paths ~/ws/src/beluga -y -i -t build -t exec

Build and source workspace#

For ROS 2 distributions, colcon can be used to build:

colcon build --packages-up-to beluga_example --cmake-args -DBUILD_TESTING=OFF

After building, don’t forget to source the environment:

source install/setup.bash

Building from source (with Bazel)#

In addition to colcon, Beluga also supports bazel.

Important

Only the beluga core library, which is ROS-agnostic, can be built and tested with Bazel.

Install Bazel#

Bazelisk is the recommended way to install Bazel on Ubuntu, Windows, and macOS. It automatically downloads and installs the appropriate version of Bazel. Follow the installation instructions in the official Bazelisk repository.

The official Bazel documentation also provides alternative installation methods. The required Bazel version can be found in the .bazelversion file.

You should also have a modern C++ compiler on your system, which Bazel will detect.

Clone Beluga repository#

Clone the Beluga project source code:

git clone https://github.com/Ekumen-OS/beluga.git
git clone https://github.com/Ekumen-OS/beluga.git

Build and run tests#

The following command will build and run all the unit tests in the project.

bazel test //...
bazel test //...

You can inspect the available Bazel targets with:

bazel query //...
bazel query //...

Depending on Beluga as a bzlmod dependency#

Bzlmod is the new package manager for Bazel modules. You can depend on beluga by adding the following lines to your MODULE.bazel file:

bazel_dep(name = "beluga", version = "2.0.2")

git_override(
    module_name = "beluga",
    commit = "...",
    remote = "https://github.com/Ekumen-OS/beluga.git",
)

Note

The git_override is required because Beluga is not yet in the Bazel Central Registry.