-
Notifications
You must be signed in to change notification settings - Fork 178
Description
Hi,
I’m experimenting with the new rig support in GLOMAP and I’m running into an issue where rigged cameras drift relative to each other, even though the exact same database and rig configuration works correctly in COLMAP.
I would like to share my setup, the commands I ran, and the behavior I’m observing, in case I’m missing something or if this is a limitation / bug in the current implementation.
COLMAP pipeline (works correctly)
I start by running a standard COLMAP rig pipeline. This produces perfectly rigid camera clusters, where all 6 cameras share the same center and form the expected cube-like configuration.
colmap feature_extractor ^
--image_path T:\Test\cubes\images ^
--database_path T:\Test\colmap_rig\database.db ^
--ImageReader.single_camera_per_folder 1
colmap rig_configurator ^
--database_path T:\Test\colmap_rig\database.db ^
--rig_config_path T:\Test\cubes\rig_config.json
colmap sequential_matcher ^
--database_path T:\Test\colmap_rig\database.db
colmap mapper ^
--database_path T:\Test\colmap_rig\database.db ^
--image_path T:\Test\cubes\images ^
--output_path T:\Test\colmap_rig ^
--Mapper.ba_refine_sensor_from_rig 1
This reconstruction is correct and stable:
- All 6 cameras remain rigid
- All cameras share the same center
- No translation drift between sensors
- Exactly what I expect from this rig
Rig configuration (known good)
This is the rig_config.json I use.
It works correctly with COLMAP and represents a pure rotational cube rig (all translations are zero):
[{
"cameras": [
{
"image_prefix": "posx/",
"ref_sensor": true,
"camera_model_name": "PINHOLE",
"camera_params": [600, 600, 600, 600]
},
{
"image_prefix": "negx/",
"cam_from_rig_rotation": [0, 0, 1, 6.123234e-17],
"cam_from_rig_translation": [0, 0, 0],
"camera_model_name": "PINHOLE",
"camera_params": [600, 600, 600, 600]
},
{
"image_prefix": "posy/",
"cam_from_rig_rotation": [0, 0, 0.707106781, 0.707106781],
"cam_from_rig_translation": [0, 0, 0],
"camera_model_name": "PINHOLE",
"camera_params": [600, 600, 600, 600]
},
{
"image_prefix": "negy/",
"cam_from_rig_rotation": [0, 0, -0.707106781, 0.707106781],
"cam_from_rig_translation": [0, 0, 0],
"camera_model_name": "PINHOLE",
"camera_params": [600, 600, 600, 600]
},
{
"image_prefix": "posz/",
"cam_from_rig_rotation": [-0.5, -0.5, -0.5, 0.5],
"cam_from_rig_translation": [0, 0, 0],
"camera_model_name": "PINHOLE",
"camera_params": [600, 600, 600, 600]
},
{
"image_prefix": "negz/",
"cam_from_rig_rotation": [0.5, 0.5, -0.5, 0.5],
"cam_from_rig_translation": [0, 0, 0],
"camera_model_name": "PINHOLE",
"camera_params": [600, 600, 600, 600]
}
]
}]
GLOMAP pipeline (problematic)
I then run GLOMAP on the same database generated by COLMAP.
After testing many parameter combinations, the best result I can achieve so far is:
glomap mapper ^
--database_path T:\Test\colmap_rig\database.db ^
--image_path T:\Test\cubes\images ^
--output_path T:\Test\glomap ^
--output_format txt ^
--skip_view_graph_calibration 1 ^
--BundleAdjustment.optimize_intrinsics 0 ^
--BundleAdjustment.optimize_rig_poses 1 ^
--RelPoseEstimation.max_epipolar_error 4 ^
--Thresholds.max_reprojection_error 4 ^
--Thresholds.max_angle_error 10
This produces less drift than other configurations, but the result is still not rigid:
- The 6 cameras drift relative to each other
- Most visible drift is in Y, but X and Z are also affected
- Cameras no longer share the same center
- The cube-like rig structure collapses slightly
Disabling optimize_rig_poses makes the result even worse.
Expected behavior
Given that:
- The rig is purely rotational (all translations are zero)
- The same database and rig config works perfectly in COLMAP
- Rig support was recently added to GLOMAP
I expected GLOMAP to preserve rigid translation constraints between sensors, similar to COLMAP, or at least converge to a comparable result.
Related work / prior art
I have read through this PR and the related discussion:
https://github.com/colmap/glomap/pull/201
including comments about:
- Initializing translations as NaN
- Optimizing rig poses during BA
- Differences between COLMAP and GLOMAP behavior
However, even after applying these ideas and extensive parameter testing, I still cannot obtain a rigid result comparable to COLMAP.
Environment
- OS: Windows 10
- COLMAP: 3.12.6 (official prebuilt wheel)
- GLOMAP: 1.2 (official prebuilt wheel for Windows)
Questions
- Is translation rigidity between sensors currently soft-constrained in GLOMAP?
- Is this a known limitation of the current global positioning / BA pipeline?
- Is there a recommended way to fully lock sensor translations within a rig?
- Would you expect this setup (pure rotation rig) to be solvable without drift?
I’m happy to provide:
- Database
- Rig config
privately
Thanks a lot for your work on rig support — and for any guidance you can provide!