uzh-rpg / rpg_svo_pro_open

GNU General Public License v3.0
1.4k stars 388 forks source link

How can I get the trajectory? #2

Open zhangxrr opened 3 years ago

zhangxrr commented 3 years ago

I want to evaluate ATE,but I am confused about the path of the results. Could you please tell me the path of the saved trajectory in which I can get the results of running dataset.

manojsharma221 commented 3 years ago

One way I use to get trajectory is to write a ROS subscriber that subscribes to the pose topic of SVO. After that it's just accessing the position and quarternion values from the received pose msg and save it to a text file using ofstream object.

Ciao-li commented 3 years ago

@manojsharma221 @zhangxrr Hello, could you please elaborate on how it is done? I currently want to evaluate the trajectory, but the author does not seem to have generated a trajectory file. So I tried to use the svo_benchmarking package provided by the author according to the author's prompt, but I encountered a problem, which has not been solved so far. Because I am not familiar with ROS, I don't quite understand what you said before. thank you very much

WangxingboWWW commented 2 years ago

save pose in function CeresBackendPublisher::publishImuPose

Ciao-li commented 2 years ago

Wow, thank you very much for your answer😀

RuiYangQuan commented 2 years ago

Wow, thank you very much for your answer😀

I have the same question, may I ask how it is realized in detail, thank you

kfu02 commented 1 year ago

The best way I found was actually to save the /svo/pose_cam/0 topic with rostopic echo /svo/pose_cam/0 > somefile.txt and then parse somefile.txt with a Python script. I believe the /svo/backend_pose_imu topic does not have the smoothed-out IMU trajectory.

TakShimoda commented 1 year ago

I did what @kfu02 suggested. I'm not running this exact library, but a forked version that's used in a multi-robot back-end system called covins, but it should be the same.

What I did was test on EuRoC Machine Hall 1 and do the following:

  1. Listen to the topics /svo/pose_cam/0, /svo/pose_cam/1, and /svo/pose_imu and recorded them in the TUM format
  2. Evaluated the APE and RPE of each of them with evo.
    • What I found is that the imu topic gave the best results. The results for APE were:
    • /svo/pose_cam/0:
      max  0.289747
      mean  0.088210
      median  0.074669
      min  0.013184
      rmse  0.097988
      sse  34.930530
      std  0.042668
    • /svo/pose_cam/1:
      max  0.276685
      mean  0.083299
      median  0.076632
      min  0.013427
      rmse  0.092428
      sse  31.079362
      std  0.040053
    • /svo/pose_imu
      max  0.243172
      mean  0.079981
      median  0.067228
      min  0.005057
      rmse  0.086558
      sse  27.257242
      std  0.033098
  3. Realized maybe the cameras may be in the wrong frame (the camera frames instead of the body frame to properly compare with ground truth) so I transformed the results by the sensor extrinsic matrices provided in the EuRoC ground-truth folder, but got the exact same results for the cameras.

I'm assuming these are the correct results and reasonable values for the trajectory estimates. Can anyone else confirm?