Getting tangent vector from gtsam::Value

41 views
Skip to first unread message

Terry

unread,
Jun 23, 2025, 5:53:42 PMJun 23
to gtsam users
I'm looking for an abstract way to turn an abstract Value (as found in Values) into a vector of the same dimension. 

If I know the type I can do something like:
auto vec = traits<T>::Local(traits<T>::Identity(), value)

But I'm not sure that this will always give what I want, for all types, and for Lie types would be something like:

GenericValue value(Pose2{1,2,3});
auto t_vec = value.tangentVector();

such that  t_vec == Vector3{1, 2, 3}

Ideally, this would be part of the Value interface (like value->localCoordinates_(...) etc.)

Dellaert, Frank

unread,
Jun 30, 2025, 8:06:37 AMJun 30
to Terry, gtsam users

GTSAM takes a manifold optimization POV and hence it does not make sense for all types of interest to convert to a vector. For Lie groups, the traits expression you suggested works. But, for general manifold types, you will always have to provide a reference for the tangent plane.

 

--
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 visit https://groups.google.com/d/msgid/gtsam-users/899593a2-77cd-4112-a29a-8997215ba258n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages