berndpfrommer/tagslam

Question: GTSAM Interface

Closed this issue · 1 comments

I am wondering what is the interface between the april tag detection and the GTSAM optimizer? We are trying to use april tags to test a different optimizer.

Sorry for the late reply, it was a particularly busy weekend.

Have a look at the optimizer.h header file:
https://github.com/berndpfrommer/tagslam/blob/master/include/tagslam/optimizer.h
It defines the interface that an optimizer must implement. Currently, the only optimizer that is implemented is gtsam_optimizer.h, but I structured the code such that it should not be too hard to supply a different optimizer:

  1. copy gtsam_optimizer.h and gtsam_optimizer.cpp, rename to foo_optimizer.h and foo_optimizer.cpp, change class names etc
  2. In graph.cpp, include foo_optimizer.h and replace optimizer_.reset(new GTSAMOptimizer()) with optimizer_.reset(new FooOptimizer())

Note that you may not have to implement all the factors (like e.g. distance factors) to get simple SLAM off the ground.

Let me know how it goes...