appliedAI-Initiative / orb_slam_2_ros

A ROS implementation of ORB_SLAM2
Other
605 stars 282 forks source link

Save camera trajectory #130

Open hongu0603 opened 2 years ago

hongu0603 commented 2 years ago

how do i get the camera trajectory and save after running orb_slam2_ros , like ORB_SLAM2 we cam get the txt file

WenyuLWY commented 1 year ago

hello, I solve it. Just add orb_slam_->SaveTrajectoryKITTI("your_path.txt"); in destructors.

For example, you could add it to RGBDNode.cc, then it looks like:

` RGBDNode::~RGBDNode () {

orbslam->SaveTrajectoryKITTI("/home/your_name/SaveTrajectoryKITTI.txt");

delete rgbsubscriber; delete depthsubscriber; delete sync_; } `