Velocity3 default constructor does not zero

release/4.3a0
Frank Dellaert 2015-07-17 22:09:49 -07:00
parent 233cabb3fb
commit 2c765c735a
2 changed files with 4 additions and 4 deletions

View File

@ -34,11 +34,11 @@ public:
PoseRTV(const Rot3& rot, const Point3& t, const Velocity3& vel)
: Base(Pose3(rot, t), vel) {}
explicit PoseRTV(const Point3& t)
: Base(Pose3(Rot3(), t),Velocity3()) {}
: Base(Pose3(Rot3(), t),Vector3::Zero()) {}
PoseRTV(const Pose3& pose, const Velocity3& vel)
: Base(pose, vel) {}
explicit PoseRTV(const Pose3& pose)
: Base(pose,Velocity3()) {}
: Base(pose,Vector3::Zero()) {}
// Construct from Base
PoseRTV(const Base& base)

View File

@ -32,7 +32,7 @@ TEST( testPoseRTV, constructors ) {
PoseRTV state2;
EXPECT(assert_equal(Point3(), state2.t(), tol));
EXPECT(assert_equal(Rot3(), state2.R(), tol));
EXPECT(assert_equal(Velocity3(), state2.v(), tol));
EXPECT(assert_equal(zero(3), state2.v(), tol));
EXPECT(assert_equal(Pose3(), state2.pose(), tol));
PoseRTV state3(Pose3(rot, pt), vel);
@ -44,7 +44,7 @@ TEST( testPoseRTV, constructors ) {
PoseRTV state4(Pose3(rot, pt));
EXPECT(assert_equal(pt, state4.t(), tol));
EXPECT(assert_equal(rot, state4.R(), tol));
EXPECT(assert_equal(Velocity3(), state4.v(), tol));
EXPECT(assert_equal(zero(3), state4.v(), tol));
EXPECT(assert_equal(Pose3(rot, pt), state4.pose(), tol));
Vector vec_init = (Vector(9) << 0.1, 0.2, 0.3, 1.0, 2.0, 3.0, 0.4, 0.5, 0.6).finished();