mpkuse / cerebro

Intelligent place recognition module for vins-fusion
166 stars 44 forks source link

relocalization error #12

Closed MoonUniverse closed 5 years ago

MoonUniverse commented 5 years ago

Hi,everyone! I can save the trajectories to file,but when i load the file for relocalization, I got a error.

[ INFO] [1565945296.388419850]: [Composer::setup_200hz_publishers] Publish to hz200/pose
[ INFO] [1565945296.388831153]: [Composer::setup_200hz_publishers] Publish to hz200/posestamped
[ INFO] [1565945296.389227159]: Subscribe to imu_worldpose_topic: /vins_estimator/imu_propagate
Start `periodic_publish_odoms`
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
Start reinit_ceres_problem_onnewloopedge_optimize6DOF()
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
---node_len=(0  to  402)    loopedge_len=(0 to 0)   
No new loop edge, sleep again!
[ERROR] [1565945296.487689565]: [NodeDataManager::get_imu_T_cam] posegraph solver, you requested imu_T_cam aka imu-cam extrinsic calib, but currently it is not available. FATAL ERROR.

[keyframe_pose_graph_slam_node-3] process has died [pid 1268, exit code 1, cmd /home/tmirobot/VSlam/Cerebro/devel/lib/solve_keyframe_pose_graph/keyframe_pose_graph_slam __name:=keyframe_pose_graph_slam_node __log:=/home/tmirobot/.ros/log/9375a8f0-c002-11e9-bd98-d0c6374d89b5/keyframe_pose_graph_slam_node-3.log].
log file: /home/tmirobot/.ros/log/9375a8f0-c002-11e9-bd98-d0c6374d89b5/keyframe_pose_graph_slam_node-3*.log
[ERROR] [1565945367.594421986]: [Cerebro::descriptor_computer_thread]Connection to server NOT successful. I tried waiting for 71 sec, still couldnt establish connection. Quiting the thread.

How can I solve this problem?

MoonUniverse commented 5 years ago
Matrix4d NodeDataManager::get_imu_T_cam() const
{
    std::lock_guard<std::mutex> lk(imu_cam_mx);
    // Remove this if, once i am confident everythinbg is ok!
    // if( imu_T_cam_available == false )
    // {
    //     ROS_ERROR( "[NodeDataManager::get_imu_T_cam] posegraph solver, you requested imu_T_cam aka imu-cam extrinsic calib, but currently it is not available. FATAL ERROR.\n");
    //     exit(1);
    // }
    assert( imu_T_cam_available );
    return imu_T_cam;
}

I removed this code and it works.But will this have other effects?

mpkuse commented 5 years ago

Vins fusion node (odometry) publishes the imu_t_cam pose. If u r just interested in camera poses u can safely delete that code. Also remember to not run the threads that publish at 200hz

MoonUniverse commented 5 years ago

Thanks! I will continue to test.