43 #include <Eigen/Geometry>
69 std::string output_filename_;
70 std::ofstream out_stream_;
76 output_filename_ (output_filename)
78 out_stream_.open (output_filename_.c_str () );
83 if (out_stream_.is_open ())
86 std::cout <<
"wrote camera poses to file " << output_filename_ << std::endl;
93 if (out_stream_.good ())
96 Eigen::Quaternionf q (pose.rotation ());
97 Eigen::Vector3f t (pose.translation ());
99 out_stream_ << t[0] <<
"," << t[1] <<
"," << t[2]
100 <<
"," << q.w () <<
"," << q.x ()
101 <<
"," << q.y ()<<
"," << q.z () << std::endl;
CameraPoseWriter writes all camera poses computed by the KinfuTracker to a file on disk...
virtual void processPose(const Eigen::Affine3f &pose)=0
process the camera pose, this method is called at every frame.
CameraPoseWriter(std::string output_filename)
void processPose(const Eigen::Affine3f &pose)
process the camera pose, this method is called at every frame.
virtual ~CameraPoseProcessor()
The CameraPoseProcessor class is an interface to extract camera pose data generated by the pcl_kinfu_...