Commit Graph

11 Commits (266ad062fe79c40b43a615bd50b90a23e367be31)

Author SHA1 Message Date
Frank Dellaert 707627fb3a Rot2 "named constructors" (http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.8):
/** Named constructor from angle == exponential map at identity */
  static Rot2 fromAngle(double theta) { return Rot2(cos(theta),sin(theta));}

  /** Named constructor from cos(theta),sin(theta) pair, will *not* normalize! */
  static Rot2 fromCosSin(double c, double s);

  /** Named constructor that behaves as atan2, i.e., y,x order (!) and normalizes */ 
  static Rot2 atan2(double y, double x);

which are a bit more verbose, but at least won't cause hours of bug-tracking :-(

I also made most compose, inverse, and rotate functions into methods, with the global functions mostly calling the methods. Methods have privileged access to members and hence are typically much more readable.
2010-03-03 03:31:53 +00:00
Frank Dellaert 1093317fdc wedge 2010-03-02 02:25:27 +00:00
Frank Dellaert 5e00c58ea7 Baker–Campbell–Hausdorff formula: in non-commutative Lie groups, when composing exp(Z) = exp(X)exp(Y) it is not true that Z = X+Y. Instead, Z can be calculated using the BCH formula:
Z = X + Y + [X,Y]/2 + [X-Y,[X,Y]]/12 - [Y,[X,[X,Y]]]/24 + ...
See http://en.wikipedia.org/wiki/Baker–Campbell–Hausdorff_formula
2010-02-27 14:58:54 +00:00
Richard Roberts b82d054aaa Definitions of Lie::between, Pose2::compose, expmap, and derivatives were not correct. Fixed, but changes some behavior (iSAM and CitySLAM already fixed), will send email about this change. 2010-01-26 20:00:17 +00:00
Frank Dellaert 8088aea598 Added double as Lie type, needed to remove Lie.h include from Vector.h 2010-01-14 05:58:58 +00:00
Richard Roberts 1dcc864d97 Comment cleanup to /** style and adding global print functions 2010-01-10 22:41:23 +00:00
Frank Dellaert 92c58e50a1 Small changes, mainly const correctness 2010-01-10 14:59:22 +00:00
Frank Dellaert ec1b57ed08 Added Lie required functions (trivial) for Vector. Not in Vector.h as this becomes circular. 2010-01-10 12:22:59 +00:00
Richard Roberts 4fa53a1f79 Merging lieconfig branch - LieConfig works but currently requires Lie objects to have a global print function. 2010-01-10 06:35:16 +00:00
Richard Roberts 2b82ff65e7 Deriving Lie objects from a base class Lie<T>, which provides member functions to access global functions, for use in MATLAB. 2010-01-09 23:15:06 +00:00
Richard Roberts 19a3e228d7 Large refactoring - made several Lie group functions global, which used to be member functions, to treat Lie groups more uniformly. Also created Lie.h, and a preprocessor flag in numericalDerivative to change the coordinate frame derivatives are reported in. gtsam and easylib build and pass unit tests, but this will probably break other projects, which will require a few small changes to work again. Email coming in a few minutes to describe the changes. 2010-01-08 00:40:17 +00:00