Commit Graph

13 Commits (760f61ce4bfcc9730a62dacdde9d0c75b23787eb)

Author SHA1 Message Date
Kai Ni e2728184b9 normalize cos and sin when there is numerical error, which does happen sometimes when composing two rotations 2010-04-29 21:28:24 +00:00
Frank Dellaert b9045528ee no more normalize. in compose?
Also moved constructors around, one inline in h, others to cpp
2010-03-03 05:35:00 +00:00
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 4cb59438f7 documentation 2010-03-01 01:37:50 +00:00
Chris Beall a956c1a8be svn restored from 1733.
this commit updates gtsam to version 1774, which now appears as 1734.
2010-01-16 01:16:59 +00:00
Frank Dellaert 5c0cd093fd moved relative_bearing to Rot2, changed derivatives to new-style 2010-01-14 16:57:48 +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
Richard Roberts 7161878285 Small changes: standardized constructors, added log() and unit tests, removed +,- ops, angle() changed to theta(), print functions 2009-12-18 00:09:54 +00:00
Richard Roberts 94f986bbe7 Indentation 2009-12-15 00:00:02 +00:00
Richard Roberts c4b60bfd65 Closing # 118: Made Pose2 use Rot2, added 'compose' for Pose2, made slight modifications to Rot2. Also added additional unit tests. This change shouldn't break anything but let me know if it does. 2009-12-14 03:02:05 +00:00
Frank Dellaert abc268a13d quick cleanup - expmap comments 2009-12-11 14:22:35 +00:00
Frank Dellaert 7d4de3ec20 Added a 1D manifold implementation of 2D rotations. The new representation stores (cos theta, sin theta) rather than theta itself, ensuring that (a) rotate and unrotate do not call cos/sin, (b) same for all derivatives of rotate and unrotate, (c) when you call angle(), you always get the standardized answer given by atan2. The idea is that we will use this new type in Pose2 instead of angle. 2009-12-09 21:50:27 +00:00