VIS4ROB-lab / covins

COVINS-(G) -- A (Generic) Framework for Collaborative Visual-Inertial SLAM and Multi-Agent 3D Mapping
394 stars 64 forks source link

Cannot connect to server for ORB-SLAM3 Front-End and ORB-SLAM3 ROS Front-End #60

Closed EmmanuelMess closed 1 year ago

EmmanuelMess commented 1 year ago

We are a team working on using this paper and code for mapping a small house as part of the final project for mobile robotics subject at FCEIA university.

Running in docker on Ubuntu 20.04 host, we are stuck at "--> Connect to server" for both ORB-SLAM3 Front-End and ORB-SLAM3 ROS Front-End. We could successfully start roscore, the server, rviz and the ROS Front-End Wrapper (the wrapper does nothing). The ip and port for the server are correct. Logs:

./run.sh -c

... logging to /root/.ros/log/cb22246c-8c82-11ee-8adf-18c04d2178a9/roslaunch-emmanuel-A320M-S2H-55.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://emmanuel-A320M-S2H:40619/
ros_comm version 1.14.13

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.13

NODES

auto-starting new master
process[master]: started with pid [69]
ROS_MASTER_URI=http://emmanuel-A320M-S2H:11311/

setting /run_id to cb22246c-8c82-11ee-8adf-18c04d2178a9
WARNING: Package name "ORB_SLAM3" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
process[rosout-1]: started with pid [80]
started core service [/rosout]
./run.sh -s ../covins_comm/config/config_comm.yaml ../covins_backend/config/config_backend.yaml
+++ COVINS Back-End +++
++++++++++ System ++++++++++
server_ip: 192.168.0.102
port: 9033

++++++++++ Communication ++++++++++
send_updates: 1
data_to_client: 0
start_sending_after_kf: 50
kf_buffer_withold: 5
max_sent_kfs_per_iteration: 2
update_window_size: 5
to_agent_freq: 5
++++++++++ ORB-SLAM3 ++++++++++
activate_visualization: 0
imu_stamp_max_diff: 2

++++++++++ System ++++++++++
threads_server: 8
covis_thres: 10
map_path0: /home/manthan/ws2/covins_ws/src/covins/covins_backend/output/map_data
map_path1: 
map_path2: 
map_path3: 
map_path4: 
map_path5: 
map_path6: 
map_path7: 
map_path8: 
map_path9: 
map_path10: 
map_path11: 
--------------------------
ORB Voc dir: /root/covins_ws/src/covins/covins_backend/config/ORBvoc.txt
--------------------------
output_dir: /root/covins_ws/src/covins/covins_backend/output/
trajectory_format: TUM

++++++++++ Feature Extraction ++++++++++
feature type: ORB
desc_length: 32
num_octaves: 1
scale_factor: 2
++++++++++ Feature Matching ++++++++++
desc_matching_th_low: 50
desc_matching_th_high: 100
search_radius_SE3: 9.5
search_radius_proj: 10
search_radius_fuse: 10
image_matching_threshold (COVINS_G): 40
ratio_threshold (COVINS_G): 0.8
++++++++++ Mapping ++++++++++
activate_lm_culling: 1
kf_culling_th_red: 0.95
kf_culling_max_time_dist: 1
++++++++++ Place Rec ++++++++++
active: 1
type: COVINS_G
start_after_kf: 7
consecutive_loop_dist: 10
min_loop_dist: 100
cov_consistency_thres: 3
matches_thres: 25
inliers_thres: 20
total_matches_thres: 40
matches_thres_merge: 25
inter_map_matches_only: 0
exclude_kfs_with_id_less_than: 7
--- RANSAC ---
min_inliers: 6
probability: 0.99
max_iterations: 300
class_threshold: 25
-- COVINS_G Parameters --
--- Non-Central Rel Pose ---
non_central_rel_pose_rep_err: 1.5
non_central_rel_pose_rep_err_cov: 10
non_central_rel_pose_min_inliers: 100
non_central_rel_pose_max_iters: 4000
non_central_rel_pose_cov_thres: 10
non_central_rel_pose_cov_iters: 30
non_central_rel_pose_cov_max_iters: 300
--- Rel Pose ---
rel_pose_err_thres: 16
rel_pose_min_inliers: 20
rel_pose_max_iters: 200
rel_pose_min_img_matches: 20
--- Loop Thresholds ---
max yaw (deg): 50
max trans (m): 2
++++++++++ Opt ++++++++++
gba_iteration_limit: 10
th_outlier_align: 1.3
th_gba_outlier_global: 0.92
pgo_iteration_limit: 10
gba_use_map_loop_constraints: 1
perform_pgo: 1
pgo_use_neighbor_kfs: 1
pgo_use_robust_loss: 1
pgo_fix_kfs_after_gba: 1
pgo_fix_poses_loaded_maps: 0
gba_fix_poses_loaded_maps: 0
++++++++++ Vis ++++++++++
active: 1
showcovgraph: 1
showlandmarks: 1
showtraj: 1
showkeyframes: 1
covgraph_minweight: 10
covgraph_shared_edges_only: 1
scalefactor: 1
trajmarkersize: 0.08
covmarkersize: 0.008
loopmarkersize: 0.05
camsize: 0.1
camlinesize: 0.01

++++++++++ Colors [R|G|B] ++++++++++
0: 0.55|0.83|0.78
1: 1|1|0.7
2: 0.75|0.73|0.85
3: 0.98|0.5|0.45
4: 0.5|0.69|0.83
5: 0.99|0.71|0.38
6: 0.7|0.87|0.41
7: 0.99|0.8|0.9
8: 0.85|0.85|0.85
9: 0.74|0.5|0.74
10: 0.8|0.92|0.77
11: 1|0.93|0.44
Covis: 0.6|0.6|0.6

Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!

+++++ KeyFrame Database Initialized +++++

./run.sh -r ../covins_comm/config/config_comm.yaml ../orb_slam3/Examples/ROS/ORB_SLAM3/launch/launch_docker_ros_euroc.launch

WARNING: Package name "ORB_SLAM3" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
... logging to /root/.ros/log/cb22246c-8c82-11ee-8adf-18c04d2178a9/roslaunch-emmanuel-A320M-S2H-79.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://emmanuel-A320M-S2H:37787/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.13

NODES
  /
    ORB_SLAM3_monoi0 (ORB_SLAM3/Mono_Inertial)

ROS_MASTER_URI=http://localhost:11311

WARNING: Package name "ORB_SLAM3" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
process[ORB_SLAM3_monoi0-1]: started with pid [92]

ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.

Input sensor was set to: Monocular-Inertial

Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!

Creation of new map with id: 0
Creation of new map with last KF id: 0
Seq. Name: 

Camera Parameters: 
- Camera: Pinhole
- fx: 458.654
- fy: 457.296
- cx: 367.215
- cy: 248.375
- k1: -0.283408
- k2: 0.0739591
- p1: 0.00019359
- p2: 1.76187e-05
- fps: 20
- color order: RGB (ignored if grayscale)

ORB Extractor Parameters: 
- Number of Features: 1000
- Scale Levels: 8
- Scale Factor: 1.2
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7

Left camera to Imu Transform (Tbc): 
[0.014865543, -0.99988091, 0.004140297, -0.021640146;
 0.99955726, 0.014967213, 0.02571553, -0.064676985;
 -0.025774436, 0.0037561883, 0.99966073, 0.0098107308;
 0, 0, 0, 1]

IMU frequency: 200 Hz
IMU gyro noise: 0.00017 rad/s/sqrt(Hz)
IMU gyro walk: 1.9393e-05 rad/s^2/sqrt(Hz)
IMU accelerometer noise: 0.002 m/s^2/sqrt(Hz)
IMU accelerometer walk: 0.003 m/s^3/sqrt(Hz)
>>> COVINS: Initialize communicator
++++++++++ System ++++++++++
server_ip: 192.168.0.102
port: 9033

++++++++++ Communication ++++++++++
send_updates: 1
data_to_client: 0
start_sending_after_kf: 50
kf_buffer_withold: 5
max_sent_kfs_per_iteration: 2
update_window_size: 5
to_agent_freq: 5
++++++++++ ORB-SLAM3 ++++++++++
activate_visualization: 0
imu_stamp_max_diff: 2

--> Connect to server
EmmanuelMess commented 1 year ago

The IP was in the wrong range. Workaround for single computer setup is to set the ip in config_comm.yaml to 127.0.0.102.