real-stanford/universal_manipulation_interface

Any method that I can visualize the ORB SLAM results?

ysyyork opened this issue · 3 comments

This would be very helpful and more straightforward than pure CSV and other text file formats.

You can probably visualise by passing in enable_gui=true in the ORB_SLAM3 package

bool enable_gui = false;
  app.add_flag("-g,--enable_gui", enable_gui);
.
.
.
.
cv::Ptr<cv::aruco::Dictionary> aruco_dict = cv::aruco::getPredefinedDictionary(aruco_dict_id);
  ORB_SLAM3::System SLAM(
    vocabulary, setting, 
    ORB_SLAM3::System::IMU_MONOCULAR, 
    enable_gui, load_map, save_map, // make enable gui ---> true
    aruco_dict, init_tag_id, init_tag_size
  );

passing that here(03_batch_slam.py) as --enable-gui true should launch the built-in gui tool by ORB SLAM3

cmd = [
      'docker',
      'run',
      '--rm', # delete after finish
      '--volume', str(video_dir) + ':' + '/data',
      '--volume', str(map_mount_source.parent) + ':' + str(map_mount_target.parent),
      docker_image,
      '/ORB_SLAM3/Examples/Monocular-Inertial/gopro_slam',
      '--vocabulary', '/ORB_SLAM3/Vocabulary/ORBvoc.txt',
      '--setting', '/ORB_SLAM3/Examples/Monocular-Inertial/gopro10_maxlens_fisheye_setting_v1_720.yaml',
      '--input_video', str(video_path),
      '--input_imu_json', str(json_path),
      '--output_trajectory_csv', str(csv_path),
      '--load_map', str(map_mount_target),
      '--mask_img', str(mask_path),
      '--max_lost_frames', str(max_lost_frames),
      '--enable-gui', 'true' # or make it a user argument in some config file or command itself
]

but before that you also need to enable gui in docker by running the xhost + or xhost +docker command in the particular terminal window