Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c4610d2
Added initial code for testing with Aquarium-in-Euroc-format data
amarburg Jan 22, 2026
6597949
Added Aquarium README and docs to Taskfile
amarburg Jan 22, 2026
224e054
Merge branch 'dev/testing_euroc_benchmarks' into dev/aquarium_as_euroc
amarburg Jan 28, 2026
e8740ff
Updated default build to RelWithDebInfo
amarburg Feb 2, 2026
f0fa37f
Merge branch 'dev/testing_euroc_benchmarks' into dev/aquarium_as_euroc
amarburg Feb 2, 2026
a34e6e5
Merge branch 'dev/testing_euroc_benchmarks' into dev/aquarium_as_euroc
amarburg Feb 2, 2026
28b81cb
Update stereo camera estimate
amarburg Feb 3, 2026
771f0a9
Merge branch 'dev/testing_euroc_benchmarks' into dev/aquarium_as_euroc
amarburg Feb 3, 2026
87d6404
Add k3 distortion parameter for Aquarium example.
amarburg Feb 3, 2026
da84019
Merge branch 'dev/testing_euroc_benchmarks' into dev/aquarium_as_euroc
amarburg Feb 3, 2026
ea91319
Make Converter a namespace not a class
amarburg Feb 3, 2026
f01e355
Merge remote-tracking branch 'origin/main' into dev/aquarium_as_euroc
amarburg Feb 4, 2026
72a6960
Added groundtruth and eval
amarburg Feb 4, 2026
e717c49
Minor update to YAML comments
amarburg Feb 4, 2026
7c8c700
Update aquarium.yaml
amarburg Feb 4, 2026
968a120
Merge branch 'main' into dev/aquarium_as_euroc
amarburg Feb 5, 2026
7d2bf54
First cut externalizing BoW
amarburg Aug 1, 2026
223abc0
Implement SystemAccessor base class
amarburg Aug 1, 2026
6ffe49e
Further work on VprImplementation
amarburg Aug 5, 2026
68588be
Minor update to comment.
amarburg Aug 5, 2026
9a93320
Swap a few more loops to C++20 style
amarburg Aug 7, 2026
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
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ repos:
rev: v5.0.0
hooks:
- id: check-added-large-files
exclude: ^(Examples/Aquarium/colmap_groundtruth)/.*
- id: check-json
- id: check-merge-conflict
- id: check-xml
Expand Down
1 change: 1 addition & 0 deletions Examples/Aquarium/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aquarium_data/
40 changes: 40 additions & 0 deletions Examples/Aquarium/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Code and configurations for processing the three `2025_05_23_aquarium_test/` ROS2 bags of data.

This directory uses the `rosbag_convert_euroc.py` script to convert the contents of the ROS2 bags to a EuRoC-like format of left and right images, then uses the "standard" ORBSLAM3 EuRoC examples (e.g. `mono_euroc`, `stereo_euroc`) to process the data.

For organization, I've tried bundling all of the tasks in to a ['Taskfile'](Taskfile.yml), to use it, install [`task`](https://taskfile.dev)

General steps are as follows:

1. Build ORBSLAM and the EuRoC binaries, go to `ORB_SLAM3/` and:

```
./install_apt_dependencies.sh
./build.sh
```

This will build `Release` binaries, which will appear in (for example), the `Examples/EuRoC/Release/` directory. To build `Debug` or `RelWithDebInfo` binaries:

```
BUILD_TYPE=Debug ./build.sh
```

2. Return to this directory. Update the [Taskfile](Taskfile.yml):

* Update `BAGFILES_PATH` to point to the original ROS2 bags if you need to generate the Aquarium-as-EuRoC data sets
* Set `BUILT_TYPE` to the binaries to use. This should agree with the 'build.sh` above
* Set `CONFIG_FILE` to either `aquarium_resize.yaml` (for downsampling by a factor of two) or `aquarium.yaml` (for processing images at full size)

3. Do the following, once:

```
task convert
```

Will generate the EuRoC datasets in the local directory from the Aquarium bagfiles.

4. Run ORBSLAM3:

```
task stereo:rosbag2_2025_05_23-09_29_11
```
41 changes: 41 additions & 0 deletions Examples/Aquarium/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: '3'

vars:
# This needs to be updates before you run `task convert`
BAGFILES_PATH: /home/aaron/workspace/aquarium_nano_data/2025_05_23_aquarium_test

BAGFILES: [ 'rosbag2_2025_05_23-08_27_30', 'rosbag2_2025_05_23-08_50_46', 'rosbag2_2025_05_23-09_29_11' ]

BUILD_TYPE: RelWithDebInfo

CONFIG_FILE: aquarium_resize.yaml

BIN_DIR: ../EuRoC
BIN_SUFFIX: euroc

VOCAB_FILE: ../../Vocabulary/ORBvoc.txt

tasks:

# Process one bag using stereo_euroc
stereo:*:
vars:
BAG: '{{index .MATCH 0}}'
BINARY: '{{.BIN_DIR}}/{{.BUILD_TYPE}}/stereo_{{.BIN_SUFFIX}}'
cmds:
- '{{.BINARY}} {{.CONFIG_FILE}} {{.VOCAB_FILE}} aquarium_data/{{.BAG}} aquarium_data/{{.BAG}}/mav0/cam0/data.csv 2>&1 | tee {{.BAG}}_stereo.txt'

# Convert all three aquarium ros2 bags to EuRoC format
convert:
deps:
- for:
var: BAGFILES
task: convert:{{.ITEM}}

# Convert one bag to EuRoC format
convert:*:
vars:
BAG: '{{index .MATCH 0}}'
cmds:
- echo Converting bagfile {{.BAG}}
- ./rosbag_convert_euroc.py -o aquarium_data {{.BAGFILES_PATH}}/{{.BAG}}
150 changes: 150 additions & 0 deletions Examples/Aquarium/aquarium.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
%YAML:1.0

# ORBSLAM3 settings file, passed to the node via the "path_yaml_settings" param
#
# Contains values specific to the odometry nano _in water_
#
# The camera intrinsics and extrinsics are specific to the "2025_05_23_aquarium_test/"
# The calibration is taken from "2025_04_07_hh101_calibration/"
#
# This calibration _WILL NOT_ work for APL pier data
#
# !! This configuration file includes downsampling images by a factor of 2

#--------------------------------------------------------------------------------------------
# Camera Parameters. Adjust them!
#--------------------------------------------------------------------------------------------
File.version: "1.0"

#--------------------------------------------------------------------------------------------
# PARAMETERS RETURNED BY MATLAB CALIBRATION HERE
Camera.type: "PinHole"

Camera.width: 1440
Camera.height: 1080

Camera1.fx: 1061.90838
Camera1.fy: 1065.08245
Camera1.cx: 778.19368
Camera1.cy: 553.85699

Camera1.k1: -0.259389
Camera1.k2: 0.203687
Camera1.p1: 0.00066
Camera1.p2: 0.003063
Camera1.k3: -0.0845

Camera2.fx: 1060.22456
Camera2.fy: 1063.51251
Camera2.cx: 782.09116
Camera2.cy: 582.52751

Camera2.k1: -0.263264
Camera2.k2: 0.215493
Camera2.p1: -0.003977
Camera2.p2: 0.000629
Camera2.k3: -0.0902

# This is T_cn_cnm1 inverted
Stereo.T_c1_c2: !!opencv-matrix
rows: 4
cols: 4
dt: f
data: [0.999673, -0.016254, -0.019763, 0.054755,
0.015567, 0.999286, -0.034431, -0.001173,
0.020308, 0.034112, 0.999212, 0.002921,
0.000000, 0.000000, 0.000000, 1.000000]

# END OF MATLAB PARAMETERS
#--------------------------------------------------------------------------------------------

# Distance in meters of the two cameras
Stereo.b: 0.0551

# Camera frames per second
Camera.fps: 10

# Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale)
Camera.RGB: 0

#--------------------------------------------------------------------------------------------
# IMU Configuration
#
# These values can be calculated using Kalibr for the Odometry package
# as of the 05/2025 Aquarium test
#--------------------------------------------------------------------------------------------

IMU.NoiseGyro: 7.517733962919085e-05
IMU.NoiseAcc: 0.0017589640490284241

IMU.GyroWalk: 1.4038949648227517e-06
IMU.AccWalk: 0.00013163674505969203

IMU.Frequency: 200.0

# This should be "Relative pose between IMU andCamera1
# (i.e. the transformation that takes a point from Camera1 to IMU)."
#
# In Kalibr this is T_ic
IMU.T_b_c1: !!opencv-matrix
rows: 4
cols: 4
dt: f
data: [ 0.00203293, 0.99981545, 0.01910319, -0.00115045,
-0.00217095, 0.0191076, -0.99981508, -0.12428361,
-0.99999558, 0.00199109, 0.00220939, 0.06095187,
0.0, 0.0, 0.0, 1.0 ]

# data: [ 0.00203293, -0.00217095, -0.99999558, 0.06068413,
# 0.99981545, 0.0191076, 0.00199109, 0.00340364,
# 0.01910319, -0.99981508, 0.00220939, -0.12437331,
# 0.0, 0.0, 0.0, 1.0 ]


IMU.InsertKFsWhenLost: 0


#--------------------------------------------------------------------------------------------
# Start to change values from here

System.thFarPoints: 20.0
System.loopClosing: 1

# Close/Far threshold. Baseline times.
Stereo.ThDepth: 5.0

# ORB Extractor: Number of features per image
ORBextractor.nFeatures: 4000

#--------------------------------------------------------------------------------------------
# The changing of the following parameters should not infect the result too much
#--------------------------------------------------------------------------------------------

# ORB Extractor: Scale factor between levels in the scale pyramid
ORBextractor.scaleFactor: 1.2

# ORB Extractor: Number of levels in the scale pyramid
ORBextractor.nLevels: 9

# ORB Extractor: Fast threshold
# Image is divided in a grid. At each cell FAST are extracted imposing a minimum response.
# Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST
# You can lower these values if your images have low contrast
ORBextractor.iniThFAST: 5
ORBextractor.minThFAST: 2

#--------------------------------------------------------------------------------------------
# Viewer Parameters
#--------------------------------------------------------------------------------------------
Viewer.KeyFrameSize: 0.05
Viewer.KeyFrameLineWidth: 1.0
Viewer.GraphLineWidth: 0.9
Viewer.PointSize: 2.0
Viewer.CameraSize: 0.08
Viewer.CameraLineWidth: 3.0
Viewer.ViewpointX: 0.0
Viewer.ViewpointY: -0.7
Viewer.ViewpointZ: -3.5
Viewer.ViewpointF: 500.0

Viewer.Enable: 0
152 changes: 152 additions & 0 deletions Examples/Aquarium/aquarium_resize.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
%YAML:1.0

# ORBSLAM3 settings file, passed to the node via the "path_yaml_settings" param
#
# Contains values specific to the odometry nano _in water_
#
# The camera intrinsics and extrinsics are specific to the "2025_05_23_aquarium_test/"
# The calibration is taken from "2025_04_07_hh101_calibration/"
#
# This calibration _WILL NOT_ work for APL pier data
#
# !! This configuration file includes downsampling images by a factor of 2

#--------------------------------------------------------------------------------------------
# Camera Parameters. Adjust them!
#--------------------------------------------------------------------------------------------
File.version: "1.0"

#--------------------------------------------------------------------------------------------
# PARAMETERS RETURNED BY MATLAB CALIBRATION HERE
Camera.type: "PinHole"

Camera.width: 1440
Camera.height: 1080

Camera.newWidth: 720
Camera.newHeight: 540

Camera1.fx: 1061.90838
Camera1.fy: 1065.08245
Camera1.cx: 778.19368
Camera1.cy: 553.85699

Camera1.k1: -0.259389
Camera1.k2: 0.203687
Camera1.p1: 0.00066
Camera1.p2: 0.003063
Camera1.k3: -0.0845

Camera2.fx: 1060.22456
Camera2.fy: 1063.51251
Camera2.cx: 782.09116
Camera2.cy: 582.52751

Camera2.k1: -0.263264
Camera2.k2: 0.215493
Camera2.p1: -0.003977
Camera2.p2: 0.000629
Camera2.k3: -0.0902

Stereo.T_c1_c2: !!opencv-matrix
rows: 4
cols: 4
dt: f
data: [0.999673, -0.016254, -0.019763, 0.054755,
0.015567, 0.999286, -0.034431, -0.001173,
0.020308, 0.034112, 0.999212, 0.002921,
0.000000, 0.000000, 0.000000, 1.000000]

# END OF MATLAB PARAMETERS
#--------------------------------------------------------------------------------------------

# Distance in meters of the two cameras
Stereo.b: 0.0551

# Camera frames per second
Camera.fps: 10

# Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale)
Camera.RGB: 0

#--------------------------------------------------------------------------------------------
# IMU Configuration
#
# These values can be calculated using Kalibr for the Odometry package
# as of the 05/2025 Aquarium test
#--------------------------------------------------------------------------------------------

IMU.NoiseGyro: 7.517733962919085e-05
IMU.NoiseAcc: 0.0017589640490284241

IMU.GyroWalk: 1.4038949648227517e-06
IMU.AccWalk: 0.00013163674505969203

IMU.Frequency: 200.0

# This should be "Relative pose between IMU andCamera1
# (i.e. the transformation that takes a point from Camera1 to IMU)."
#
# In Kalibr this is T_ic
IMU.T_b_c1: !!opencv-matrix
rows: 4
cols: 4
dt: f
data: [ 0.00203293, 0.99981545, 0.01910319, -0.00115045,
-0.00217095, 0.0191076, -0.99981508, -0.12428361,
-0.99999558, 0.00199109, 0.00220939, 0.06095187,
0.0, 0.0, 0.0, 1.0 ]

# data: [ 0.00203293, -0.00217095, -0.99999558, 0.06068413,
# 0.99981545, 0.0191076, 0.00199109, 0.00340364,
# 0.01910319, -0.99981508, 0.00220939, -0.12437331,
# 0.0, 0.0, 0.0, 1.0 ]


IMU.InsertKFsWhenLost: 0


#--------------------------------------------------------------------------------------------
# Start to change values from here

System.thFarPoints: 20.0
System.loopClosing: 1

# Close/Far threshold. Baseline times.
Stereo.ThDepth: 5.0

# ORB Extractor: Number of features per image
ORBextractor.nFeatures: 4000

#--------------------------------------------------------------------------------------------
# The changing of the following parameters should not infect the result too much
#--------------------------------------------------------------------------------------------

# ORB Extractor: Scale factor between levels in the scale pyramid
ORBextractor.scaleFactor: 1.2

# ORB Extractor: Number of levels in the scale pyramid
ORBextractor.nLevels: 9

# ORB Extractor: Fast threshold
# Image is divided in a grid. At each cell FAST are extracted imposing a minimum response.
# Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST
# You can lower these values if your images have low contrast
ORBextractor.iniThFAST: 5
ORBextractor.minThFAST: 2

#--------------------------------------------------------------------------------------------
# Viewer Parameters
#--------------------------------------------------------------------------------------------
Viewer.KeyFrameSize: 0.05
Viewer.KeyFrameLineWidth: 1.0
Viewer.GraphLineWidth: 0.9
Viewer.PointSize: 2.0
Viewer.CameraSize: 0.08
Viewer.CameraLineWidth: 3.0
Viewer.ViewpointX: 0.0
Viewer.ViewpointY: -0.7
Viewer.ViewpointZ: -3.5
Viewer.ViewpointF: 500.0

Viewer.Enable: 0
Loading