Skip to content

Add GTSAM preintegration navigation backend - #741

Draft
ApatShe wants to merge 2 commits into
fix/eskf-navigationfrom
feat/eskf-gtsam-preintegration
Draft

ApatShe wants to merge 2 commits into
fix/eskf-navigationfrom
feat/eskf-gtsam-preintegration

Conversation

@ApatShe

@ApatShe ApatShe commented Sep 22, 2026

Copy link
Copy Markdown

Add an alternative GTSAM manifold-preintegration and fixed-lag navigation backend on top of the ESKF navigation fix in #740. Includes the GTSAM estimator, launch path, validation notes, and tests.

Patrick Sheehan added 2 commits September 16, 2026 21:14
# Conflicts:
#	navigation/eskf/CMakeLists.txt
#	navigation/eskf/launch/eskf.launch.py
#	navigation/eskf/test/ros_contract_test.py
@ApatShe
ApatShe marked this pull request as draft September 22, 2026 15:59
double keyframe_interval = 0.2;
double integration_covariance = 1e-8;
};
class GtsamNavigation : public NavigationEstimator {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It strikes me as somewhat strange to use the NavigationEstimator interface to implement an fgo backend. NIS doesn't really make sense in this context (just use one of the robust noise models if you want something "similar"), etc

Better to treat these as two separate filters entirely?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(that is to say, you can pretty comfortably get away with gtsam's "predict" and not have to think about anything eskf :))

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh lord you're already here hahahaa. I meant to create this as a draft.

Thank you very much for the feedback already though!

(Have you implemented something like this?)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hahahahaha i get notifications 🫶

draft PRs are really really nice, makes for a better feedback loop. I'm familiar yes, figured I could give some initial pointers, and a more thorough review once its out of draft, if desired

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would love that yes!

I like draft as a place for conversations and visibility so those who'd like to give advice can do so early :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very neat, final thing for now I'd say keep things simple, rather that than immediately having all the bells and whistles (read in Edmund voice)

you'll run into plenty of issues with any filter ever, especially when running it live, so best do your future selves a favour 🤞

gtsam::Values values;
gtsam::FixedLagSmoother::KeyTimestampMap stamps;
impl_->append_keyframe(factors, values, stamps);
impl_->solve(factors, values, stamps);

@chrstrom chrstrom Sep 22, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Letting the solver be IMU-driven can get a bit fucky when you start adding sensors or get multiple non-imu measurements as input in a row (i.e. lag in the output vs what information you technically have available), should double check that this is fine for you. Good that the aiding sensor handlers do solves too, but running it keyframe style seems a bit like "i want solves at a minimum rate", which if you want something like anchoring out of sequence measurements you dont really need to solve. You might also want to look at outputting odometry at imu-rate with last solve + prop state

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Also, its not a bad idea to run the solver periodically in case of imu free run, but that can be at a much lower rate than keyframing for out-of-sequence)

class DvlFactor
: public gtsam::NoiseModelFactor2<gtsam::Pose3, gtsam::Vector3> {
public:
DvlFactor(gtsam::Key pose, gtsam::Key velocity, const SensorDVL& sensor)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you wanna be fancy you can support along-beam velocities too !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants