Custom Between Factor

822 views
Skip to first unread message

Haggi Do

unread,
Nov 11, 2019, 1:00:53 AM11/11/19
to gtsam users
Dear all,

I am trying to implement a 6DOF (x,y,z,roll,pitch,yaw) SLAM on MATLAB. But I have a between factor measurement that only updates 3 of the states (y,z,roll). Is there any way to create a custom between factor for such measurements? I've looked into the guide, but it only seems to mention custom unary factors. It would be a huge help if anyone can tell me how to implement this.

Thank you!

Mike Sheffler

unread,
Nov 11, 2019, 10:25:08 PM11/11/19
to Haggi Do, gtsam users
Try the RelativeElevationFactor in gtsam_unstable/slam:


It's a binary factor that affects a subset of the states of one of the keyed variables (specifically, 'Z' in the position portion of the pose).

Mike Sheffler

--
You received this message because you are subscribed to the Google Groups "gtsam users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gtsam-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gtsam-users/7fd0dd34-8596-4ed3-95ad-f4330d770721%40googlegroups.com.

Frank Dellaert

unread,
Nov 11, 2019, 10:37:03 PM11/11/19
to gtsam users
This is easy with expressions.
You would need to create an Expression<Vector3> that is the measurement function (Pose3 -> Vector3) and then instantiate an ExpressionFactor. See examples folder.
Frank

Pascal Lieberherr

unread,
Jun 21, 2021, 3:05:35 PM6/21/21
to gtsam users
Were you able to implement the between factor? I have the same problem. I do 6DOF pose estimation but wheel odometry just gives x,y and yaw measurements.
I'm wondering how you designed the measurement function (Pose3 -> Vector3), particularly the jacobians?
Thanks you!
Reply all
Reply to author
Forward
0 new messages