thien94 / orb_slam3_ros

A ROS implementation of ORB_SLAM3
GNU General Public License v3.0
261 stars 81 forks source link

Questions about the release of location information topics #14

Closed Shang-cl closed 1 year ago

Shang-cl commented 1 year ago

I have the following doubts in the process of reading your source code:

  1. In the process of publishing pose information (my understanding is positioning information), why use the additional function pSLAM->GetCamTwc() to obtain instead of directly using pSLAM->TrackStereo(imLeft, imRight, tImLeft, vImuMeas)The return value of this function is published as location information.
  2. In the function pSLAM->GetCamTwc(), I noticed that your return value is the inverse matrix return (mCurrentFrame.GetPose()).inverse()of the pose of the current frame. I want to know why the inversion is in Is there any special need in the follow-up processing?
  3. I have conducted many tests outdoors and found that there seems to be a certain gap between my positioning distance and the actual distance. For example, the actual distance from point a to point b is 25m, but I can only reach 18m during the test. I don't know if it's because you answered my vision degradation question earlier.
  4. My RealSense D455 camera is now working at 30FPS, IMU is 200HZ, I am wondering if I properly reduce the rate of camera image release, will it have a certain impact on the positioning accuracy, because reducing the frame rate means that at the same The motion velocity and time-to-time image change is greater, which will be beneficial to motion estimation.
  5. During the test, I found it difficult to complete the loopback. My terminal will output ""BAD LOOP!!!"" many times. Does this have a lot to do with my test environment? Sorry to bother you with these stupid questions again! The following is a video of my actual test environment and testing process:Video
thien94 commented 1 year ago

Thanks for the questions.

  1. The function pSLAM->TrackStereo(imLeft, imRight, tImLeft, vImuMeas) returns the camera pose from the Tracking thread of ORB-SLAM3. However, this camera pose can be further refined by other threads within ORB-SLAM3 (Mapping, Loop Closure etc.) As such, the pSLAM->GetCamTwc() will give you the latest optimized result, whereas pSLAM->TrackStereo() will be the first result in the SLAM pipeline.
  2. Internally, ORB-SLAM3 stores the pose of world in camera frame (i.e., mCurrentFrame.GetPose() returns Tcw), whereas for ROS we want the camera frame in world (i.e., we need Twc, or the inverse of Tcw). This distinction is due to the way visual odometry works (the first camera frame is the origin of the map, everything is modeled from the camera's perspective).
  3. Does the same issue occur in other settings (indoor, smaller scale areas)? If not, this might be indeed related to the degenerate cases. If the same issue persists, you might consider checking the calibration params. Even for the same camera brand, doing calibration for your specific cameras might lead to significant improvements in performance.
  4. In principle, you want to reduce the FPS if the processing power / memory on your computer is limited (e.g., you run on embedded platforms). As for accuracy, it is more important that all sensors are hard-synchronized and well-calibrated than the fps.
  5. Unfortunately, the BAD LOOP error is something I also don't know much about. You can find more info about it here https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/394 but basically, there are some "magic numbers" used in ORB-SLAM3 with regards to loop detection and I have no idea how to interpret them either.

Hope this helps.

Shang-cl commented 1 year ago

It's a great honor to get your answers to my questions again, while I'm calibrating my camera and IMU while waiting for your reply (I find that every time I'm waiting for your reply I'm always able to try ahead of time with suggestions you haven't given ,lol), in addition, I also noticed a problem, I saw a sentence somewhere "When actually using the BOW model, this model is best generated in a similar environment", I think this may also be the reason why the actual verification effect of this algorithm is not as good as that obtained by using the public data set test. Of course, this is just my guess, but I think this BOW is best to pass a large number of tests according to your actual application scenarios. Similar data training is obtained, so as to get the best effect.