ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.2k stars 9.71k forks source link

return valid ratio = 0 on msf location module #14067

Open marf-cn opened 3 years ago

marf-cn commented 3 years ago

Describe the bug A clear and concise description of what the bug is. 我使用系统提供的msf_simple_map_create创建了msf的局部地图,当我用同样的数据回放是,msf中的lidar_locate定位返回-2,理论上同样的数据应该返回完整的定位才是。

To Reproduce Steps to reproduce the behavior: 1 使用x86工控机,软件基线版本 origin/v6.0_edu 2 创建地图 msf_simple_map_creator.sh /apollo/data/bag/2021-08-25-14-51-02 /apollo/modules/localization/msf/params/velodyne_params/velodyne16_novatel_extrinsics.yaml 50 /apollo/modules/map/data/casia lidar16 3 运行命令:cyber_launch modules/localization/launch/msf_localization.launch 4 回放数据 :cyber_recorder play -f /apollo/data/bag/2021-08-25-14-51-02/xxxxxxxx.0000* 5 使用主线的 third_party/localization_msf/x86_64/lib/liblocalization_msf.so (修复了coredump问题)

Expected behavior A clear and concise description of what you expected to happen. 由于创建地图的数据和我回放用的是同样的数据,理论上激光雷达定位应该很准才对,但回放的数据定位激光点云匹配有效为0,无法进行激光定位,问题在哪儿呢? E:\apollo\modules\localization\msf\local_integ\localization_lidar.cc\int LocalizationLidar::Update(const unsigned int frame_idx, const Eigen::Affine3d& pose, const Eigen::Vector3d velocity, const LidarFrame& lidar_frame, bool use_avx) 162行 // compute int error = lidarlocator->Compute( pose_trans(0), pose_trans(1), pose_trans(2), pose_quat.x(), pose_quat.y(), pose_quat.z(), pose_quat.w(), use_avx); 返回 -2

Screenshots If applicable, add screenshots to help explain your problem. [localization] entropy 5.439353907461532 [localization] discret_cloud size: 6435 [localization] delta_yaw: 0 , cur limit: 0.02617991666666666 [localization] PCD Projeciton Elapsed time: 11574us [localization] Mean diff: nan [localization] Call calculate_sad_avx [localization] the current imu time and measure time: 1629874632.4 1629874632 [localization] the chi is large: 7.815000 8.369508 [localization] the chi: 1 3.841000 6.466764 [localization] the chi is large: 5.991000 247.688108 [localization] the chi: 0 3.841000 247.254163 [localization] SAD computation Elapsed time: 16793us [localization] SAD Sum: 1.028667356493192e-132 [localization] SAD Sum: 2.589223227395138e-122 [localization] Weight debug: 48.00000000000023, 48.00000000000016, 2.000000000000067, 2.000000000000033, 0.4999999999999933, 0.5000000000000068 [localization] SAD Sum: 0.9999999999999912 [localization] KL 0.2485916297227745 inverse 1 [localization] valid ratio: 0 [localization] Range: 4, 12, 4, 12 [localization] Std of location: std_x = 0.4025053612987121, std_y = 0.399456964473541 [localization] Compute localization Elapsed time: 415us [localization] Others Elapsed time: 14us [localization] The valid ratio is lower than given thresold.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

PeterJaq commented 3 years ago

I meet same problem too ! Can anyone solve it?

wqklihbf commented 8 months ago

@marf-cn 我能请教一下你是怎么创建msf地图的吗? 我运行命令/apollo/scripts/msf_simple_map_creator.sh /apollo/record_file/0226/ /apollo/modules/localization/msf/params/velodyne_params/velodyne128_novatel_extrinsics.yaml 31 /apollo/records/map后报错Can't find the file: /apollo/records/map/lossy_map//map/000/north/10/00012797/00012799