Unit test failure, either retraction or localCoordinates is wrong for rotation

release/4.3a0
Paul Drews 2014-12-12 10:38:59 -05:00
parent c6e4cd5e03
commit a7b8e60272
1 changed files with 7 additions and 3 deletions

View File

@ -97,8 +97,7 @@ public:
// Also, how do we actually get s out? Seems like we need to store it somewhere.
return Similarity3( //
rotation().retract(v.head<3>()), // retract rotation using v[0,1,2]
translation().retract(v.segment<3>(3)),
scale() + v[6]); // finally, update scale using v[6]
translation().retract(v.segment<3>(3)), scale() + v[6]); // finally, update scale using v[6]
}
/// 7-dimensional vector v in tangent space that makes other = this->retract(v)
@ -172,6 +171,11 @@ TEST(Similarity3, Manifold) {
v3 << 0, 0, 0, 1, 1, 1, 0;
EXPECT(assert_equal(v3, sim2.localCoordinates(sim3)));
Similarity3 other = Similarity3(Rot3::ypr(1, 2, 3), Point3(4, 5, 6), 7);
// Similarity3 other = Similarity3(Rot3(),Point3(4,5,6),1);
EXPECT(sim.retract(sim.localCoordinates(other)) == other);
// TODO add unit tests for retract and localCoordinates
}