Commit Graph

30 Commits

Author SHA1 Message Date
Evan Levine f1414cb5bd Correct spelling in comments and docs.
Change-Id: Iad9a0599d644d3b3cd54244edaf64d408cb1308e
2022-04-24 21:40:13 -07:00
Sameer Agarwal 4dff3ea2c4 Fix a number of typos in rotation.h
Thanks to @yiping for reporting these.
https://github.com/ceres-solver/ceres-solver/issues/672

Change-Id: I9c59d2b666430edf33f10aaba0d0ee4cd520e0a4
2021-09-13 17:19:49 -07:00
Mykyta Kozlov 66b4c33e81 updated unit quaternion rotation
Change-Id: I3e5a2ca8e19c1d66437ac16d615867e2a12f8e60
2020-11-18 17:00:13 +00:00
Alex Stewart 5cb5b35a93 Fixed incorrect argument name in RotationMatrixToQuaternion()
- Raised as: https://github.com/ceres-solver/ceres-solver/pull/607 by
  Frank Dellaert

Change-Id: Id3e9f190e814cf18206e2f8c3b1b67b995c21dd5
2020-07-26 20:42:12 +01:00
Darius Rueckert e751d6e4f0 Remove AutodiffCodegen
- Remove Codegen files
- Revert Jet and Rotation

Change-Id: I005c5f98f2b6dfa5c7fd88d998b6aa83e47dab60
2020-04-08 10:43:53 +02:00
Darius Rueckert edd54b83e1 Update Jet.h and rotation.h to use the new IF/ELSE macros
Also use branchless implementation for isfinite(Jet),
isinf(Jet), isnan(Jet), and isnormal(Jet).

Change-Id: Ia881df03ba873e0560d67e976ab1e99e199eb523
2019-12-09 18:30:30 +01:00
Sameer Agarwal 4362a21699 Run clang-format on the public headers.
Also update copyright year.

Change-Id: I8508d4fd4564c646ec2281a1b3b2c36136b54b46
2019-12-03 14:50:37 -08:00
Sameer Agarwal d7f428e5c7 Add a missing cast in rotation.h
Thanks to Lukas Post (@deutschepost) for reporting this.

https://github.com/ceres-solver/ceres-solver/issues/497

Change-Id: I6d9d0ca5feab3a1f4cf47613537e8cd7ab1ba479
2019-08-07 06:42:28 -07:00
Sameer Agarwal 57441fe909 Fix two bugs.
1. ProblemEvaluateResidualTest was leaking the loss_function in cases
where it was not being used.
2. Fix a grammo in rotation.h

Change-Id: If94ae1624033c8f6d1934dc2f40fa0dfe4e025c3
2019-04-29 10:59:09 -07:00
Johannes Beck c0aa9a2631 Add checks in rotation.h for inplace operations.
Some rotation functions like UnitQuaternionRotatePoint,
QuaternionRotatePoint, etc. will calculate bad results if the input
point and output point points to the same memory (inplace operation).

This CL adds checks in debug mode to guard against it.

Change-Id: Id0a30e9a0286b340757f0790d417d9f9a3409810
2019-04-16 21:45:36 +02:00
Kuang Fangjun 0d3a84fce5 Fix typos in doc and errors in the demo code.
Change-Id: I237402958ed8747ae438643132fcab90113ac27d
2018-09-22 12:01:20 +08:00
Rob Carroll e69bd2a206 Add missing T() wrappers for constants.
Needed for instantiation with Jet<float,N>.

Change-Id: I8ec07a844cc911a3c7f24c25797bd21c0bee07b5
2016-10-31 12:51:44 -07:00
Sameer Agarwal 8590e6e8e0 Remove two checks from rotation.h
This allows rotation.h to remove its dependency on glog.

Change-Id: Ia6aede93ee51a4bd4039570dc8edd100a7045329
2016-10-27 12:36:13 -07:00
Keir Mierle 7492b0d8de Update copyright headers with new year and URL
Since Ceres is moving to using GitHub for issues, and the Google
Code URL in the current copyright header will soon become invalid,
update all the headers.

Change-Id: I1fce70375d1bcf098591f07b4d8f01a5c1e0789c
2015-03-18 05:43:23 +00:00
Sameer Agarwal bcc865f81c Remove using namespace std;
For historical reasons we had a "using namespace std;" in port.h. This
is generally a bad idea. So removing it and along the way doing a bunch
of cpplint cleanup.

Change-Id: Ia125601a55ae62695e247fb0250df4c6f86c46c6
2015-01-07 14:26:53 -08:00
Sameer Agarwal c9be6a6f3e More lint cleanup.
Change-Id: I74f586ac357df055e944f359463562197db79f1d
2014-11-13 23:19:05 -08:00
Sameer Agarwal 730aa537cd Add RotationMatrixToQuaternion.
Use this function to implement RotationMatrixToAngleAxis.
This simplifies the implementation of RotationMatrixToAngleAxis,
just like Eigen does. It is also autodiff compatible, unlike the
Eigen based version.

Also significantly improve the test coverage of
RotationMatrixToAngleAxis.

Change-Id: Ic192a12fb5de952197ee24b0deedc45f195477f1
2014-11-14 06:57:30 +00:00
Sameer Agarwal cd358c760f Fix RotationMatrixToAngleAxis near Pi.
Use Eigen's much more complicated conversion routine
when we encounter cases where the angle of rotation is
close to Pi.

Along the way also fix the way angle_axis vectors are
compared by making the matcher more robust.

Thanks to Tobias Strauss for reporting this.

Change-Id: Ia7e65dafad92c48d29d5f3cd22c4d6534789c183
2014-11-12 22:56:38 -08:00
Sameer Agarwal c6bafdd02c Comments from Jim Roseborough.
1. Fix the tolerance on the rotation matrix conversion test.
2. Fix some out of date comments.

Change-Id: I65e80da1f96d7b4d9ac0630ad8cb708c41739840
2013-10-28 19:38:08 -07:00
Sameer Agarwal 21d6a99fe6 Fix AngleAxisToRotationMatrix near zero.
The Taylor series approximation had its sign flipped and the
tests did not catch it since we were switching exactly at zero,
which was not getting triggered.

This changes modifies the tolerance, adds a test that triggers
and fixes the bug.

Thanks to Michael Samples for reporting this.

Change-Id: I6f92f6348e5d4421ffe194fba92c04285449484c
2013-10-25 13:53:52 -07:00
Sameer Agarwal 39a427c736 Speed up AngleAxisRotatePoint.
This leads to a ~11% speedup on my mac using clang.

Based on suggestions by Thad Hughes.

Change-Id: If8495c8de6e28f63fb065e35bd6f382dd9fcbbea
2013-10-23 11:45:57 -07:00
Sameer Agarwal 58b8c68f29 Clean up rotation.h
Change-Id: I3370c9883728cda068c9650a2c2a50641fd8299c
2013-03-09 17:17:43 -08:00
Sameer Agarwal 509f68cfe3 Problem::Evaluate implementation.
1. Add Problem::Evaluate and tests.
2. Remove Solver::Summary::initial/final_*
3. Remove Solver::Options::return_* members.
4. Various cpplint cleanups.

Change-Id: I4266de53489896f72d9c6798c5efde6748d68a47
2013-02-24 19:04:21 +00:00
Sameer Agarwal beb4505311 Minor fixes
Based on William Rucklidge's review, including
a nasty bug in parameter block removal.

Change-Id: I3a692e589f600ff560ecae9fa85bb0b76063d403
2013-02-22 13:37:05 -08:00
Keir Mierle 3e2c4ef9ad Add adapters for column/row-major matrices to rotation.h
This patch introduces a matrix wrapper (MatrixAdapter) that allows to
transparently pass pointers to row-major or column-major matrices
to the conversion functions.

Change-Id: I7f1683a8722088cffcc542f593ce7eb46fca109b
2013-02-19 08:40:09 +00:00
Sameer Agarwal 383c04f423 Fix QuaternionToAngleAxis to ensure rotations are between -pi and pi.
Thanks to Guoxuan Zhang for reporting this.

Change-Id: I2831ca3a04d5dc6467849c290461adbe23faaea3
2012-08-17 14:32:23 -07:00
Sameer Agarwal 0beab86dfa Fix glog includes and include sorting order.
Change-Id: I0ec85218e82d1714279d41f7635104d480fb91c3
2012-08-13 15:47:24 -07:00
Sameer Agarwal 104ad902b6 Fixed Jet to integer comparison.
Thanks to Keith Leung for reporting this.

Change-Id: I97c2eb87a5cf6779779e659aaa716dc507824def
2012-07-17 11:30:31 -07:00
Keir Mierle efe7ac60a0 Port Ceres to Windows
This is a preliminary, but full, port of Ceres to Windows.
Currently all tests compile and run, with only system_test
failing to work correctly due to a path issue.

Change-Id: I4152c1588bf51ffd7f4d9401ef9759f5d28c299c
2012-06-24 23:22:04 -07:00
Keir Mierle 8ebb073038 Initial commit of Ceres Solver. 2012-04-30 23:09:08 -07:00