Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Fisheye Camera SfM Example

A visualSLAM example for the structure-from-motion problem on a simulated dataset. This version uses a fisheye camera model and a GaussNewton solver to solve the graph in one batch.

Open In Colab

Problem Description

A structure-from-motion example with landmarks:

  • The landmarks form a 10 meter cube

  • The robot rotates around the landmarks, always facing towards the cube

This example demonstrates:

  • Camera observations of landmarks (pixel coordinates) stored as Point2 (x, y)

  • Each variable (poses and landmarks) identified with unique keys using Symbols

  • Projection factors to model camera’s landmark observations

  • Prior factors to initialize robot location

  • Fisheye camera model (Cal3Fisheye) with distortion parameters

Camera Setup, Data Generation

Factor Graph Setup

Add observations, initial estimates

Optimizing the factor graph
converged
errorThreshold: Optimization complete
4.55607e-21 <? 0
absoluteDecrease: 6.26303251472e-08 <? 1e-05
relativeDecrease: 1 <? 1e-05
iterations: 4 >? 10000

Results

initial error=152507.22412516878
final error=4.5560711028681596e-21
Saved graph to python/gtsam/examples/fisheye_batch.dot