Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure and document OpenVDB support #475

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
2 changes: 2 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Within a development environment:
rosdep install --from-path src
```

🔸`beluga_vdb` requires OpenVDB to be installed in order to be used. For Ubuntu distributions previous to `Noble` OpenVDB needs to be installed from sources before building, installation instructions can be found [here](beluga_vdb/README.md). If you don't need to use `beluga_vdb` you can skip this package using `colcon build --symlink-install --packages-ignore beluga_vdb`

For more advanced tooling, check repository [tools](./tools).

## CI/CD
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ This repository contains the following packages:
| [`beluga_example`](beluga_example) | Example launch files, showing how to run Beluga-based nodes. |
| [`beluga_benchmark`](beluga_benchmark) | Scripts to benchmark, profile and also compare Beluga with other MCL implementations. |
| [`beluga_system_tests`](beluga_system_tests) | System integration tests for Beluga. |
| [`beluga_vdb`](beluga_vdb) | A library extension for `beluga` facilitating the use of OpenVDB for 3D localization. |

## ⚙️ First Steps

Expand Down
51 changes: 51 additions & 0 deletions beluga_vdb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Beluga VDB

<div align="center">
<img alt="Shows the Beluga logo." src="images/57fe338a-3e7e-46b3-ad2f-17011d6d306a.png" height="200">
</div>

## 🌐 Overview

BelugaVDB is a library extension for `beluga` that integrates [OpenVDB](https://www.openvdb.org/), enabling advanced 3D localization capabilities. Currently, this extension uses the powerful volumetric data structure of OpenVDB to efficiently process maps and 3D pointcloud data, providing the localization of the autonomous system.


## 📦 External Dependencies

### OpenVDB

For Ubuntu 24.04 and newer versions OpenVDB can be installed using `apt`:

```bash
sudo apt install libopenvdb-dev
```

Older version must be isnstalled from sources as follow:

#### Step 1: Download OpenVDB

Clone [OpenVDB](https://github.com/AcademySoftwareFoundation/openvdb) into your machine (for Jammy version 8.2.0 is recommended):

```bash
git clone -b v8.2.0 https://github.com/AcademySoftwareFoundation/openvdb.git
```

#### Step 2: Compile OpenVDB

Now you need to build OpenVDB:

```bash
cd openvdb && \
mkdir build && cd build && \
cmake .. && \
make -j$(nproc)
```

#### Step 3: Install OpenVDB

You can now install OpenVDB using:

```bash
sudo make install
```

🔸 For more information about OpenVDB please refer to the [official documentation](https://www.openvdb.org/documentation/doxygen/).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

#include <Eigen/Core>

#include <range/v3/algorithm/fold_left.hpp>
#include <range/v3/algorithm/for_each.hpp>
#include <range/v3/numeric/accumulate.hpp>
#include <range/v3/range/conversion.hpp>
#include <range/v3/view/all.hpp>
Expand Down Expand Up @@ -133,7 +131,7 @@ class LikelihoodFieldModel3 {
ranges::to<std::vector>();

return [this, points = std::move(transformed_points)](const state_type& state) -> weight_type {
return ranges::fold_left(
return ranges::accumulate(
points | //
ranges::views::transform([this, &state](const auto& point) {
const Eigen::Vector3d point_in_state_frame = state * point;
Expand Down
9 changes: 9 additions & 0 deletions docker/images/humble/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ RUN /bin/bash -c '\

RUN cd /opt && git clone https://github.com/brendangregg/FlameGraph

# Install OpenVDB from sources
RUN cd /tmp && \
git clone -b v8.2.0 https://github.com/AcademySoftwareFoundation/openvdb.git && \
cd openvdb && \
mkdir build && cd build && \
cmake .. && \
make -j$(nproc) && sudo make install && \
rm -rf /tmp/openvdb

USER $USER:$GROUP

ENV USER_WS /ws
Expand Down