And I wanna know how to save the Trajetory data like TUM?
I've found this function:
void StopScanningAndExit ( bool aborted = false )
In this function, I saw the "write trajectory"
{ //write trajectory
const std::string saveFile = GlobalAppState::get().s_binaryDumpSensorFile;
std::vector trajectory;
g_bundler->getTrajectoryManager()->getOptimizedTransforms ( trajectory );
numValidTransforms = PoseHelper::countNumValidTransforms ( trajectory );
numTransforms = ( unsigned int ) trajectory.size();
if ( numValidTransforms < ( unsigned int ) std::round ( 0.5f numTransforms ) ) valid = false; // not enough valid transforms
std::cout << "#VALID TRANSFORMS = " << numValidTransforms << std::endl;
( ( SensorDataReader ) g_RGBDSensor )->saveToFile ( GlobalAppState::get().s_binaryDumpSensorFile + "sequence.sens", trajectory ); //overwrite the original file
}
So I just put the " ( ( SensorDataReader* ) g_RGBDSensor )->saveToFile ( GlobalAppState::get().s_binaryDumpSensorFile + "sequence.sens", trajectory ); //overwrite the original file" in BundleFusion.cpp . In line 368. The project just run one frame.
And I wanna know how to save the Trajetory data like TUM?
I've found this function: void StopScanningAndExit ( bool aborted = false )
In this function, I saw the "write trajectory" { //write trajectory const std::string saveFile = GlobalAppState::get().s_binaryDumpSensorFile; std::vector trajectory;
g_bundler->getTrajectoryManager()->getOptimizedTransforms ( trajectory );
numValidTransforms = PoseHelper::countNumValidTransforms ( trajectory );
numTransforms = ( unsigned int ) trajectory.size();
if ( numValidTransforms < ( unsigned int ) std::round ( 0.5f numTransforms ) ) valid = false; // not enough valid transforms
std::cout << "#VALID TRANSFORMS = " << numValidTransforms << std::endl;
( ( SensorDataReader ) g_RGBDSensor )->saveToFile ( GlobalAppState::get().s_binaryDumpSensorFile + "sequence.sens", trajectory ); //overwrite the original file
}
So I just put the " ( ( SensorDataReader* ) g_RGBDSensor )->saveToFile ( GlobalAppState::get().s_binaryDumpSensorFile + "sequence.sens", trajectory ); //overwrite the original file" in BundleFusion.cpp . In line 368. The project just run one frame.
I really hope you can give me some suggestions!