raulmur / ORB_SLAM2

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Other
9.37k stars 4.69k forks source link

Pose of each camera frame of a monocular camera #436

Open Morpheusai opened 7 years ago

Morpheusai commented 7 years ago

Hi, i'm using a monocular camera. I want to get trajectory of every frame. ORB_SLAM and ORB_SLAM2 don't support out pose of each frame, but only the keyFrame. Please tell me why? thanks a lot.

tednav commented 6 years ago

Hi, you can use this in ros_mono.cc cv::Mat Tcw= mpSLAM->TrackMonocular(cv_ptr->image,cv_ptr->header.stamp.toSec());

ichlubna commented 3 years ago

Hello, thank you @tednav for the answer. I have tried adding simply: std::cerr << SLAM.TrackMonocular(im,tframe) << std::endl; to Examples/Monocular/mono_tum.cc but this returns only keyframe poses as the OP mentioned. Is there anything specific in _rosmono.cc that I need to get the position for every frame?