Skip to content

Commit a8e86c7

Browse files
committed
Fix metrics bug and update sophuspy installation instructions
1 parent 1a437ff commit a8e86c7

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,11 @@ The most complete example on how to use ArgMin is in this test: [TestArgMinExamp
3737
## ArgMin: Documentation
3838
The most complete documentation of ArgMin's SSEOptimizer can be found [here](docs/source/SSEOptimizer.md)
3939

40+
## Running QDVO
41+
42+
### Running Tests
43+
To build and run QDVO's unit tests and benchmarks, see the [test README](test/README.md) for detailed Docker-based instructions.
44+
45+
### Running Evaluation
46+
To evaluate QDVO on EuRoC format datasets and compute trajectory accuracy metrics, see the [tools README](tools/README.md) for evaluation scripts and usage instructions.
47+

tools/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ cmake --build build
6161
# Install basic Python packages
6262
pip3 install --break-system-packages numpy scipy termcolor
6363

64-
# Build and install sophuspy from source
64+
# Build and install sophuspy from source with explicit compiler settings
6565
git clone https://github.com/craigstar/SophusPy
6666
cd SophusPy
67+
export CC=clang
68+
export CXX=clang++
6769
pip3 install --break-system-packages .
6870
cd ..
6971
```
7072

73+
**Note:** Setting `CC` and `CXX` to use clang ensures sophuspy is compiled with the same compiler as QDVO, preventing ABI compatibility issues that can cause segmentation faults.
74+
7175
### 6. Run Evaluation
7276

7377
```bash

tools/sim3TrajectoryError.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
def quaternionToSO3(w, x, y, z):
10-
r = R.from_quat([w, x, y, z])
10+
r = R.from_quat([x, y, z, w])
1111
return sophus.SO3(np.array(r.as_matrix()))
1212

1313

@@ -78,15 +78,15 @@ def computeTrajectoryError(trajectory1, trajectory2):
7878
# dR(phi)_dphi = Jrinv((R1.inverse() * R_sim * R2).log()) * R2.inverse()
7979

8080
# Order: [translation, rotation, scale]
81-
R_sim = sophus.SO3.exp([0, 0, 0])
81+
R_sim = sophus.SO3.exp(np.array([0.0, 0.0, 0.0]))
8282
t_sim = np.zeros([3, 1])
8383
scale = 1.0
8484

8585
# dx order: [translation, rotation, scale]
8686
# output: [rotation, translation, scale]
8787
def applyUpdate(R_sim, t_sim, scale, dx):
8888
return R_sim * sophus.SO3.exp(
89-
dx[3:6, 0:1]), t_sim + dx[0:3, 0:1], scale + dx[6:7, 0:1]
89+
dx[3:6, 0]), t_sim + dx[0:3, 0:1], scale + dx[6, 0]
9090

9191
# output: [dt, dR]
9292
def computeError(R1, t1, R2, t2, R_sim, t_sim, scale):
@@ -217,7 +217,7 @@ def computeOdometryError():
217217
rotErrorPerFrame, transErrorPerFrame, bearingErrorPerFrame, scaleErrorPerFrame = computeOdometryError(
218218
)
219219
return posRMSE, rotRMSE, abs(
220-
scale[0, 0]
220+
scale
221221
), rotErrorPerFrame, transErrorPerFrame, bearingErrorPerFrame, scaleErrorPerFrame
222222

223223

0 commit comments

Comments
 (0)