@@ -24,6 +24,12 @@ using namespace std;
24
24
using namespace Eigen ;
25
25
using namespace msckf_vio ;
26
26
27
+ // Static member variables in CAMState class
28
+ Isometry3d CAMState::T_cam0_cam1 = Isometry3d::Identity();
29
+
30
+ // Static member variables in Feature class
31
+ Feature::OptimizationConfig Feature::optimization_config;
32
+
27
33
TEST (FeatureInitializeTest, sphereDistribution) {
28
34
// Set the real feature at the origin of the world frame.
29
35
Vector3d feature (0.5 , 0.0 , 0.0 );
@@ -73,15 +79,15 @@ TEST(FeatureInitializeTest, sphereDistribution) {
73
79
74
80
// Compute measurements.
75
81
random_numbers::RandomNumberGenerator noise_generator;
76
- vector<Vector2d , aligned_allocator<Vector2d > > measurements (6 );
82
+ vector<Vector4d , aligned_allocator<Vector4d > > measurements (6 );
77
83
for (int i = 0 ; i < 6 ; ++i) {
78
84
Isometry3d cam_pose_inv = cam_poses[i].inverse ();
79
85
Vector3d p = cam_pose_inv.linear ()*feature + cam_pose_inv.translation ();
80
86
double u = p (0 ) / p (2 ) + noise_generator.gaussian (0.0 , 0.01 );
81
87
double v = p (1 ) / p (2 ) + noise_generator.gaussian (0.0 , 0.01 );
82
88
// double u = p(0) / p(2);
83
89
// double v = p(1) / p(2);
84
- measurements[i] = Vector2d ( u, v);
90
+ measurements[i] = Vector4d (u, v, u, v);
85
91
}
86
92
87
93
for (int i = 0 ; i < 6 ; ++i) {
0 commit comments