22 #include <gtsam/base/DerivedValue.h>
41 LieVector(
const Eigen::Matrix<double, N, 1>& v) : Vector(v) {}
48 GTSAM_EXPORT
LieVector(
size_t m,
const double*
const data);
52 return static_cast<Vector
>(*this);
56 GTSAM_EXPORT
void print(
const std::string& name=
"")
const;
66 size_t dim()
const {
return this->size(); }
78 throw std::runtime_error(
"LieVector::identity(): Don't use this function");
88 boost::optional<gtsam::Matrix&> H1=boost::none,
89 boost::optional<gtsam::Matrix&> H2=boost::none)
const {
98 boost::optional<gtsam::Matrix&> H1=boost::none,
99 boost::optional<gtsam::Matrix&> H2=boost::none)
const {
101 if(H2) *H2 =
eye(l2.
dim());
123 friend class boost::serialization::access;
124 template<
class Archive>
125 void serialize(Archive & ar,
const unsigned int version) {
126 ar & boost::serialization::make_nvp(
"LieVector",
127 boost::serialization::base_object<Value>(*
this));
128 ar & boost::serialization::make_nvp(
"Vector",
129 boost::serialization::base_object<Vector>(*
this));
LieVector retract(const Vector &v) const
Update the LieVector with a tangent space update.
Definition: LieVector.h:69
static LieVector identity()
identity - NOTE: no known size at compile time - so zero length
Definition: LieVector.h:77
typedef and functions to augment Eigen's VectorXd
LieVector between(const LieVector &l2, boost::optional< gtsam::Matrix & > H1=boost::none, boost::optional< gtsam::Matrix & > H2=boost::none) const
between operation
Definition: LieVector.h:97
Base class and basic functions for Lie types.
size_t dim() const
Returns dimensionality of the tangent space.
Definition: LieVector.h:66
Matrix eye(size_t m, size_t n)
Creates an identity matrix, with matlab-like syntax.
Definition: Matrix.cpp:50
Vector localCoordinates(const LieVector &t2) const
Definition: LieVector.h:72
static LieVector Expmap(const Vector &v)
Expmap around identity.
Definition: LieVector.h:115
LieVector inverse(boost::optional< gtsam::Matrix & > H=boost::none) const
invert the object and yield a new one
Definition: LieVector.h:106
LieVector(double d)
wrap a double
Definition: LieVector.h:45
bool equals(const LieVector &expected, double tol=1e-5) const
equality up to tolerance
Definition: LieVector.h:59
GTSAM_EXPORT void print(const std::string &name="") const
print
Definition: LieVector.cpp:34
LieVector(const Vector &v)
initialize from a normal vector
Definition: LieVector.h:35
bool equal(const T &obj1, const T &obj2, double tol)
Call equal on the object.
Definition: Testable.h:75
static Vector Logmap(const LieVector &p)
Logmap around identity - just returns with default cast back.
Definition: LieVector.h:118
Vector vector() const
get the underlying vector
Definition: LieVector.h:51
LieVector is a wrapper around vector to allow it to be a Lie type.
Definition: LieVector.h:29
LieVector()
default constructor - should be unnecessary
Definition: LieVector.h:32
LieVector(const Eigen::Matrix< double, N, 1 > &v)
initialize from a fixed size normal vector
Definition: LieVector.h:41
LieVector compose(const LieVector &p, boost::optional< gtsam::Matrix & > H1=boost::none, boost::optional< gtsam::Matrix & > H2=boost::none) const
compose with another object
Definition: LieVector.h:87
Definition: DerivedValue.h:44