@@ -56,7 +56,9 @@ int main(int argc, char **argv) {
56
56
(float )config.tsdf_truncation_ , trans, 40000 , 60000 );
57
57
cuda::RGBDImageCuda rgbd ((float )config.max_depth_ ,
58
58
(float )config.depth_factor_ );
59
- for (int i = begin; i < end; ++i) {
59
+
60
+ Eigen::Matrix4d pose, prev_pose;
61
+ for (int i = begin; i < begin + 13 ; ++i) {
60
62
utility::LogInfo (" Integrating frame {} ..." , i);
61
63
62
64
Image depth, color;
@@ -65,15 +67,23 @@ int main(int argc, char **argv) {
65
67
rgbd.Upload (depth, color);
66
68
67
69
/* Use ground truth trajectory */
68
- Eigen::Matrix4d pose = pose_graph.nodes_ [i - begin].pose_ ;
69
- trans.FromEigen (pose);
70
-
71
- tsdf_volume.Integrate (rgbd, intrinsic, trans);
70
+ if (i - begin <= 10 ) {
71
+ pose = pose_graph.nodes_ [i - begin].pose_ ;
72
+ trans.FromEigen (pose);
73
+ } else {
74
+ trans.FromEigen (prev_pose);
75
+ auto result =
76
+ RGBDToTSDFRegistration (rgbd, tsdf_volume, intrinsic, trans);
77
+ pose = std::get<1 >(result);
78
+ trans.FromEigen (pose);
72
79
73
- if (i > 10 ) {
74
- RGBDToTSDFRegistration (rgbd, tsdf_volume, intrinsic, trans);
75
- break ;
80
+ std::cout << " ------\n " ;
81
+ std::cout << pose << " \n " ;
82
+ std::cout << pose_graph.nodes_ [i - begin].pose_ << " \n " ;
83
+ std::cout << " ------\n " ;
76
84
}
85
+ tsdf_volume.Integrate (rgbd, intrinsic, trans);
86
+ prev_pose = pose;
77
87
}
78
88
79
89
tsdf_volume.GetAllSubvolumes ();
0 commit comments