rpg_svo_pro_open icon indicating copy to clipboard operation
rpg_svo_pro_open copied to clipboard

How can I get the trajectory?

Open zhangxrr opened this issue 3 years ago • 7 comments

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.

zhangxrr avatar Jul 18 '21 11:07 zhangxrr

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.

manojsharma221 avatar Aug 20 '21 20:08 manojsharma221

@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

Ciao-li avatar Sep 15 '21 01:09 Ciao-li

save pose in function CeresBackendPublisher::publishImuPose

WangxingboWWW avatar Nov 05 '21 12:11 WangxingboWWW

Wow, thank you very much for your answer😀

Ciao-li avatar Nov 08 '21 01:11 Ciao-li

Wow, thank you very much for your answer😀

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

RuiYangQuan avatar Jan 12 '22 03:01 RuiYangQuan

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.

kfu02 avatar Jul 20 '23 22:07 kfu02

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
  1. 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?

TakShimoda avatar Sep 29 '23 21:09 TakShimoda