FangGet / BundleFusion_Ubuntu_Pangolin

a porting for BundleFusion working on ubuntu, with Pangolin as visualizer
Other
122 stars 32 forks source link

Hi! Can I use it as a interface(just like Elasticfusion) to do something else? like 3D Semantic Reconstruct. #12

Closed ghost closed 3 years ago

ghost commented 3 years ago

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!

ph-code-repo commented 2 years ago

@luodamao Did you get this working, would be interested to know how you got it to output the trajectory too.