Giter Club home page Giter Club logo

m-loam's Introduction

Dataset download link is here


M-LOAM

Robust Odometry and Mapping for Multi-LiDAR Systems with Online Extrinsic Calibration

M-LOAM is a robust system for multi-LiDAR extrinsic calibration, real-time odometry, and mapping. Without manual intervention, our system can start with several extrinsic-uncalibrated LiDARs, automatically calibrate their extrinsics, and provide accurate poses as well as a globally consistent map.

Authors: Jianhao Jiao, Haoyang Ye, Yilong Zhu, Linxin Jiang, Ming Liu from RAM-LAB, HKUST

Project website: https://ram-lab.com/file/site/m-loam

Videos:

mloam

(Video link for mainland China friends: Video)

Related Papers in Solving Different Subproblems for Multi-LiDAR Systems

  • Robust Odometry and Mapping for Multi-LiDAR Systems with Online Extrinsic Calibration, Jianhao Jiao, Haoyang Ye, Yilong Zhu, Ming Liu, IEEE Transactions on Robotics (T-RO), 2021. pdf

    • Tackle the extrinsic calibration, multi-LiDAR fusion, pose drift, and mapping uncertainty.
  • Greedy-Based Feature Selection for Efficient LiDAR SLAM, Jianhao Jiao, Yilong Zhu, Haoyang Ye, Huaiyang Huang, Peng Yun, Linxin Jiang, Lujia Wang, Ming Liu, International Conference on Robotics and Automation (ICRA) 2021 , Xi An, China. pdf

    • Tackle the algorithm latency issue.
  • MLOD: Awareness of Extrinsic Perturbation in Multi-LiDAR 3D Object Detection for Autonomous Driving, Jianhao Jiao*, Peng Yun*, Lei Tai, Ming Liu, IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) 2020. pdf

    • Tackle the multi-LiDAR-based 3D object detection against the hardware failure (injected large extrinsic perturbation).

If you use M-LOAM for your academic research, please cite one of our paper. bib

1. Prerequisites

1.1 Ubuntu and ROS

Ubuntu 64-bit 16.04 or 18.04. ROS Kinetic or Melodic. ROS Installation

1.2. Ceres Solver && Eigen3 && GLOG

 ./setup/install_eigen3_ceres.sh

1.3. OpenMP

  sudo apt install libomp-dev

1.4. PCL-1.8

2. Build M-LOAM on ROS

  mkdir -p ~/catkin_ws/src
  cd ~/catkin_ws/src
  git clone https://github.com/gogojjh/M-LOAM.git
  catkin build mloam
  source ~/catkin_ws/devel/setup.bash

3. Example

  • Datasets collected with different platforms:

    1. Simulation Robot (SR)
    2. Real Handheld Device (RHD)
    3. Real Vechile (RV)
    4. Oxford RoboCar (OR)
  • Run M-LOAM and baseline methods

    1. We provide a script to perform batch testing of M-LOAM with baseline methods
    2. Enter the script folder: roscd mloam/script/
    3. Modify the python script: run_mloam.py for specific platforms with correct path
    4. Modify the shell files for methods in xx_main.sh
    5. Run the python script:
    • python2 run_mloam.py -program=single_test -sequence=SR -start_idx=0 -end_idx=4
      • You will broadcast the SR01.bag, SR02.bag, SR03.bag, SR04.bag, SR05.bag respectively to test the M-LOAM system.
    • python2 run_mloam.py -program=single_test -sequence=RHD -start_idx=0 -end_idx=2
      • You will broadcast the RHD02lab.bag, RHD03garden.bag, RHD04building.bag respectively to test the M-LOAM system.
    • python2 run_mloam.py -program=single_test -sequence=RHD -start_idx=1 -end_idx=1
      • You will broadcast the RV01.bag to test the M-LOAM system.

4. System pipeline

This could help you to understand the pipeline of M-LOAM (loop closure part is not finished).

And you can also refer to M-LOAM's pipeline for a more detailed diagram and code review.

5. Acknowledgements

Thanks for these great works from which we learned to develop M-LOAM

Thanks for Ming Cao for providing a clear diagram and code review of M-LOAM

6. Licence

The source code is released under GPLv3 license.

For any technical issues, please contact Dr. Jianhao Jiao [email protected]. For commercial inquiries, please contact Prof.Ming Liu [email protected].

m-loam's People

Contributors

gogojjh avatar jianglingxin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m-loam's Issues

after cd M-LOAM, I cann't compile the M-LOAM project!

in "2. Build M-LOAM on ROS", after "cd M-LOAM" run "catkin build mloam" I cann't compile the project and give me the information:
353871315
I can compile the project in "catkin_ws_M-LOAM1" directory--the top directory. Is there something wrong with my ROS environment?

without extrinsic optimization ?

First of all, thank you for your great work.
from the config parameter "estimate_extrinsic", it's set as '0', which means have an accurate extrinsic and will not optimize it ?
image

How to do time synchronization for multi LiDAR?

Dear doctor jiao,
Thanks for your contribution to the community!
When I was trying to use multiple LiDARs, I found that LiDARs get the scan at different moments. So I would like to consult how to synchronize the clocks of multiple LiDARs through hardware. Thank you!

LiDAR and IMU

Thank you for your excellent work. May I ask if this system has been calibrated for LiDAR and IMU?

How to acquire a dense map instead of feature map?

What a wonderful job, Dr. Jiao. Thank for your work's contribution.
However, I am researching M-LOAM. The issue I meeting is that when I use the "mloam_handheld.launch" to run mloam with my custom dataset. When the bag finishs, I just find the pcd files of features and pose in /tmp, which are to sparse to evaluate the results.
Sincerely, how can I get a dense map and tum format trajectory?
Thanks!

Question about LocalPoseParamters.

Hello and thank you for your works.

In pose_local_parameterization.cpp.

// calculate the jacobian of [p, q] w.r.t [dp, dq]
// turtial: https://blog.csdn.net/hzwwpgmwy/article/details/86490556
bool PoseLocalParameterization::ComputeJacobian(const double *x, double *jacobian) const
{
    Eigen::Map<Eigen::Matrix<double, 7, 6, Eigen::RowMajor> > j(jacobian);
    j.topRows<6>().setIdentity();
    j.bottomRows<1>().setZero();
    return true;
}

I am wondering why the jacobian is Identity for quanternion? It is conflict with the CSDN blog.

how to run this project

[mloam_node_sr-2] process has died [pid 46963, exit code -11, cmd /home/happy/catkin_ws/devel/lib/mloam/mloam_node_sr -config_file=/home/happy/catkin_ws/src/M-LOAM/estimator/config/config_simu_jackal.yaml -result_save=true -output_path=/home/happy/catkin_ws/src/trajectory_results/simu_jackal_mloam __name:=mloam_node_sr __log:=/home/happy/.ros/log/b32e4e6a-21a8-11ef-b5c9-48e7da414c13/mloam_node_sr-2.log].
log file: /home/happy/.ros/log/b32e4e6a-21a8-11ef-b5c9-48e7da414c13/mloam_node_sr-2*.log
================================================================================REQUIRED process [rosbag-9] has died!
process has finished cleanly
log file: /home/happy/.ros/log/b32e4e6a-21a8-11ef-b5c9-48e7da414c13/rosbag-9*.log
Initiating shutdown!

[rosbag-9] killing on exit
[static_tf_base_sensor_into_base_link-8] killing on exit
[static_tf_laser_into_laser_right-7] killing on exit
[static_tf_laser_into_laser_left-6] killing on exit
[static_tf_world_sensor_into_base_sensor-5] killing on exit
[static_tf_world_base_into_world_sensor-4] killing on exit
[lidar_mapper_keyframe-3] killing on exit
[lidar_mapper] press ctrl-c
mapping drop frame: 0
Saving mapping statistics
Saving keyframe poses & map cloud (corner + surf) /tmp/mloam_*.pcd
global keyframes num: 6
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
can you help me solve this problem

Estimator::evaluateFeatJacobian()

Hi author,
I'm curious about in case ESTIMATE_EXTRINSIC == 0, when we calculating jacobian of corner points, it directly is Eigen::Matrix<double, 1, 6>::Identity(), estimator.cpp#L1342, we don't use LidarPureOdomEdgeFactor::Evaluate(). For surf points, we calculate jacobians with LidarPureOdomPlaneNormFactor::Evaluate().
Could you please give a little explaination :), thanks for your help and time!

calTimestamp function in feature_extract.cpp

Thanks to your project, M-LOAM.
I am really interested in your paper and code, so I studied your code narrowly.

Firstly, I have a question about calTimestamp function in feature_extract.cpp which calculates rel_time.

When I tested your code with SR2 sequence, it shows various values whose sign are minus and plus.
Also, it does not show continuous rel_time.
For example, SR2 sequence's start_ori and end_ori are pi and 3pi(-pi+2pi+2pi).
Because atan2 is utilized to measure the angle, ori gets value from -pi to pi.

  1. When the value is between pi and pi/2, rel_time has a minus value because there is no change in the value of ori.
  2. For values ​​between pi/2 and 0, ori is smaller than start_ori by pi/2, 2pi is added, and half_passed is passed. This translates to a range between 5pi/2 and 2pi to calculate rel_time.
  3. When it has a value between 0 and -pi/2, 2pi is added and converted to a value between 2pi and 3/2pi to calculate rel_time.
  4. Values ​​between -pi/2 and -pi are converted to values ​​between 3/2pi and pi by adding 2pi. Also, since it is more than 3/2pi less than end_ori, it converts to a value between 7/2pi and 3pi. At this time, rel_time is calculated.

The calculated rel_time is discontinuous, producing values ​​greater than SCAN_PERIOD or negative values.

Q1) Can you explain exactly the criteria for calculating rel_time?

Second, After the calculation of rel_time, it is injected to intensity filed.
However, this intensity filed is utilized to save row_index by merging in image_segment function.

Q2) Is row_index is related with rel_time?

I'm looking forward to receiving your answer.

Thank you.

按照教程安装失败

看作者提供的工程包缺少顶层的cmaklist文件,按照安装教程无法正确的build。

Run rhd01corridor.bag data package, the final calibration result is much different from the ground truth given by the author, especially the translation!!!

Run rhd01corridor.bag data package, the final calibration result is much different from the ground truth given by the author, especially the translation!!!
As follows:
Results displayed on the terminal:
optimization result: t [161.427,1.533,-16.342], q [0.121,-0.027,-0.006,0.992], td [0.000]

Results in file "stamped_mloam_map_estimate_wo_gf_1.000000.txt":
1586084335.6935 161.4273 1.5325944 -16.341969 0.12116445 -0.027335021 -0.0061564814 0.9922369
However, the ground truth given by the author:

# qx qy qz qw tx ty tz
left to right lidar: 
0.32182, -0.00094, 0.00744, 0.94677, 0.06641, -0.49424, -0.11251

After "roslaunch mloam mloam_handheld.launch" running successfully, no results can be seen under the output_path path

Hello, thank you very much for this outstanding work,After "roslaunch mloam mloam_handheld.launch" running successfully, no results can be seen under the output_path path,Start the launch file command:

roslaunch mloam mloam_handheld.launch run_mloam:=true run_mloam_mapping:=true with_ua:=true gf_method:=wo_gf gf_ratio_ini:=1.0 result_save:=true bag_file:=/home/x/data/RHD01corridor.bag output_path:=/home/x/data/output_m_loam

launch partial log:
`x@x:~$ roslaunch mloam mloam_handheld.launch run_mloam:=true run_mloam_mapping:=true with_ua:=true gf_method:=wo_gf gf_ratio_ini:=1.0 result_save:=true bag_file:=/home/x/data/RHD01corridor.bag output_path:=/home/x/data/output_m_loam
... logging to /home/x/.ros/log/74fa8702-3b06-11ec-a0c0-709cd122d215/roslaunch-x-568.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://x:42509/

SUMMARY

PARAMETERS

  • /rosdistro: melodic
  • /rosversion: 1.14.12
  • /use_sim_time: True

NODES
/
lidar_mapper_keyframe (mloam/lidar_mapper_keyframe)
mloam_node_rhd (mloam/mloam_node_rhd)
rosbag (rosbag/play)
static_tf_base_sensor_into_base_link (tf/static_transform_publisher)
static_tf_laser_into_laser_left (tf/static_transform_publisher)
static_tf_laser_into_laser_right (tf/static_transform_publisher)
static_tf_world_base_into_world_sensor (tf/static_transform_publisher)
static_tf_world_sensor_into_base_sensor (tf/static_transform_publisher)

auto-starting new master
process[master]: started with pid [578]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 74fa8702-3b06-11ec-a0c0-709cd122d215
process[rosout-1]: started with pid [591]
started core service [/rosout]
process[mloam_node_rhd-2]: started with pid [597]
process[lidar_mapper_keyframe-3]: started with pid [599]
process[static_tf_world_base_into_world_sensor-4]: started with pid [600]
process[static_tf_world_sensor_into_base_sensor-5]: started with pid [601]
process[static_tf_laser_into_laser_left-6]: started with pid [606]
process[static_tf_laser_into_laser_right-7]: started with pid [612]
process[static_tf_base_sensor_into_base_link-8]: started with pid [619]
process[rosbag-9]: started with pid [624]
save result (0/1): 1 to /home/x/data/output_m_loam
with the awareness of uncertainty (0/1): 1
gf method: wo_gf, gf ratio: 1.000000
config file: /home/x/catkin_m_loam/src/M-LOAM/estimator/config/config_handheld.yaml
laser number 2
cloud_topic: /left/velodyne_points
cloud_topic: /right/velodyne_points
window_size: 4, opt_window_size: 2
fix extrinsic param
Synchronized sensors, fix time offset
map corner resolution:0.200000, surf resolution:0.400000, surround kf resolution:1.000000
map kf radius: 30.000000, kf dis:1.000000, ori:1.000000
uct ext ratio: 1.000000
Mapping as 5.000000hz
Accurate extrinsic calibration!
extract surrounding keyframes: 0.000237ms
input surf num: 573 corner num: 719
map surf num: 0, corner num: 0
Map surf num is not enough
optimization time: 0.002609ms
current keyframes size: 1
save keyframes time: 0.012119ms
frame: 1, whole mapping time: 2.29646ms

Accurate extrinsic calibration!
corner/surf: before ds: 719, 573; after ds: 719, 573
filter time: 0.096265ms
extract surrounding keyframes: 0.499952ms
input surf num: 636 corner num: 665
map surf num: 573, corner num: 719
build time 0.123544ms

gf_method: wo_gf, num of all features: 665, sel features: 310
gf_method: wo_gf, num of all features: 636, sel features: 509
matching features time: 2.100704ms
Ceres Solver Report: Iterations: 7, Initial cost: 4.877573e+00, Final cost: 4.242189e+00, Termination: CONVERGENCE
mapping solver time: 2.043575ms

gf_method: wo_gf, num of all features: 665, sel features: 334
gf_method: wo_gf, num of all features: 636, sel features: 518
matching features time: 2.221940ms
Ceres Solver Report: Iterations: 7, Initial cost: 4.731431e+00, Final cost: 4.612786e+00, Termination: CONVERGENCE
mapping solver time: 2.289895ms
trace: 0
evaluate H: 0.432120ms
`
If you can help, thank you very much!!!

Estimator::buildCalibMap()

Hi doctor jiao,
Thanks for your excellent work!
When we building local map for each laser sensor, for auxiliary lidar(its index n ≠ IDX_REF), why we assign primary lidar's point into auxiliary lidar, surf_points_local_map_[n], when the for loop n ≠ IDX_REF. pose_local_[n][i] is the transform from primary lidar's pivot frame to auxiliary lidar's i frame, including primary lidar to itself. For example the line 1095 and the 1099.
I'm curious about this, don't guess the reason. Could you please give a little explain :), thanks in advance!

for (size_t n = 0; n < NUM_OF_LASER; n++)
{
Pose pose_ext = Pose(qbl_[n], tbl_[n]);
for (size_t i = 0; i < WINDOW_SIZE + 1; i++)
{
Pose pose_i(Qs_[i], Ts_[i]);
pose_local_[n][i] = Pose(pose_pivot.T_.inverse() * pose_i.T_ * pose_ext.T_);
PointICloud surf_points_trans, corner_points_trans;
if (i == WINDOW_SIZE) continue;
// if ((n != IDX_REF) && (i > pivot_idx)) continue;
pcl::transformPointCloud(surf_points_stack_[IDX_REF][i], surf_points_trans, pose_local_[IDX_REF][i].T_.cast<float>());
// for (auto &p: surf_points_trans.points) p.intensity = i;
surf_points_local_map_[n] += surf_points_trans;
pcl::transformPointCloud(corner_points_stack_[IDX_REF][i], corner_points_trans, pose_local_[IDX_REF][i].T_.cast<float>());
// for (auto &p: corner_points_trans.points) p.intensity = i;
corner_points_local_map_[n] += corner_points_trans;
}

不知道你们什么时候可以上传代码?

您好
我已经拜读了您的论文,写的非常好,也非常想看看你们的代码,不知道你们什么时候可以上传代码?如果需要帮忙我也可以忙你们改改代码或者测试。

python run_mloam.py error

Hello, thank you very much for this outstanding work. After I compile it,When starting with python run_mloam.py -program=single_test -sequence=SR -start_idx=0 -end_idx=4 , the following error occurred:

testing sequence: SR01
Traceback (most recent call last):
  File "run_mloam.py", line 267, in <module>
    single_test(args.start_idx, args.end_idx)
  File "run_mloam.py", line 64, in single_test
    os.environ['data_path'] = '{}/home/x/data/{}.bag'.format(os.environ['DATA_PATH'], seq_name[idx])
  File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'DATA_PATH'

I put the dataset under /home/x/data/,change the data_path path in run_mloam.py to {}/home/x/data/{}.bag as follows:
os.environ['data_path'] = '{}/home/x/data/{}.bag'.format(os.environ['DATA_PATH'], seq_name[idx])
I didn't use Python very much before, so I don't know how to modify it. If you can help, thank you very much!!!

How to get calibration parameter?

First of all, thanks for the great job!
When I tried to reproduce your project using the Oxford dataset,I ran into some problems:
My purpose is to run multi-lidar calibration with Oxford dataset,so I run the python file “run_mloam.py”:
python2 run_mloam.py -program=calib_test -sequence=OR -start_idx=0 -end_idx=0
However,when the srcipt stoped, I did not receive the parameter output.
Screenshot from 2022-03-23 21-21-39
Before that, I have hardcoded the output path in the file
"catkin_ws_mloam/src/localization/M-LOAM/estimator/launch/mloam_realvehicle_oxford.launch"
Screenshot from 2022-03-23 21-25-19
But when the program ends, the folder is empty.
I hope to get your help!

undistort points

Hi doctor jiao @gogojjh,
Thanks for your excellent work and sharing to the community ! I download the smaller bag RHD to test.

  • Q1: When we undistort points, is it a typo pose_undist[IDX_REF], it seems that pose_undist[n] ?
    In config yaml file, IDX_REF default value is 0. So the pose_undist[0] is laser0 from k frame to k+1 frame delta transform, pose_undist[1] is the laser1 sensor.
    for (PointI &point : cur_feature_.second[n]["corner_points_less_sharp"]) TransformToEnd(point, point, pose_undist[IDX_REF], true, SCAN_PERIOD);
    for (PointI &point : cur_feature_.second[n]["surf_points_less_flat"]) TransformToEnd(point, point, pose_undist[IDX_REF], true, SCAN_PERIOD);
    for (PointI &point : cur_feature_.second[n]["laser_cloud"]) TransformToEnd(point, point, pose_undist[IDX_REF], true, SCAN_PERIOD);
  • Q2: When we assign cur_feature_ to the prev_feature_, where cur_feature_ is the raw current feature points, not be deskewed. I found in the Estimator::undistortMeasurements() function, we evently convert current feature points into current end instant according to the estimated relative transform from k to k+1 frame. If we after this moment assign cur_feature_ to the prev_feature_, the prev_feature_ is current feature points in current end instant. Then for next frame loop, we convert current feature points into current start instant using the linearly and slerp interpolation of last estimated delta transform, accordint to every point's time ratio,

feature_extract.hpp#L154 && #292: TransformToStart(cloud_data.points[i], point_sel, pose_local, false, SCAN_PERIOD);

it seems make sense as prev_feature kd-tree points and the cur_feature_ points in the same frame. I'm not sure i correctly understand code totally.

// pass cur_feature to prev_feature
prev_time_ = cur_time_;
prev_feature_.first = prev_time_;
prev_feature_.second.clear();
prev_feature_.second.resize(NUM_OF_LASER);
for (size_t n = 0; n < NUM_OF_LASER; n++)
{
prev_feature_.second[n].insert(make_pair("corner_points_less_sharp",
cur_feature_.second[n].find("corner_points_less_sharp")->second));
prev_feature_.second[n].insert(make_pair("surf_points_less_flat",
cur_feature_.second[n].find("surf_points_less_flat")->second));
}

f_extract_.matchCornerFromScan(kdtree_corner_last, *corner_points_last, *corner_points_sharp, pose_local, corner_scan_features);
f_extract_.matchSurfFromScan(kdtree_surf_last, *surf_points_last, *surf_points_flat, pose_local, surf_scan_features);

  • Q3: In the above, TransformToStart(cloud_data.points[i], point_sel, pose_local, false, SCAN_PERIOD); feature_extract.hpp#L292, why we call TransformToStart() with b_distortion = false. According to my understanding, i think we should call with b_distortion = true, because current feature points is raw points, not be deskewed. I don't understand this code.

  • BTW: should we comment this line?

    for (size_t i = NUM_OF_LASER; i < 2; i++) sub_lidar[i] = new LidarSubType(nh, CLOUD_TOPIC[0], 1);

If i don't describle my problem clearly, please tell me, i will add more info. Look forward to discuss with you, thanks for your help and time in advance!

Best regards
jxl

Request for Dataset

I wanted to do some experiments with the dataset mentioned in this article. However, I was unable to download these datasets via the website link given in the article. I would appreciate it if you could share the dataset with me.

question on solving iterative reighted least-squares

hello, i am confused about the inference of equation(2)in your paper:“Greedy-Based Feature Selection for Efficient LiDAR SLAM”. The variab to be optimized is x, while it turns to be delta x after locally linearizing the objective function at an initial guess. It is known that delta x is calculated in the process of iterative reighted least-squares in practice. Is there a omitted step that the residual in equation (2) is transformed into a function with respect to delta x. Then the state x is calculated with optimized delta x and an initial guess.
I am really looking forward to your reply.

lidarMapper::goodFeatureMatching()

Hi author,

  • When gf_method == "fps" in lidarMapper::goodFeatureMatching(), lidar_mapper.h#L353, I'm curious that we don't distinguish the type(surf or corner) of the starting point k, which is selected randomly. Should we distinguish it ?
  • lidar_mapper.h#L159, the res[1] seems doesn't exist, right?
  • associate_uct.hpp#L26, there is a typo, should be "plus" according to eq.45 of barfoot's paper. Thanks for your help!
    image

I cann't download the datasets for M-LOAM

Thank you for uploading your source code of M-LOAM. I want to run your M-LOAM with the datasets, your give,But I cann't download them. And give me the following message:

1439240266

PCL incompatibility: no matching function for call to multiple pcl functions

Hi,

Very grateful for your contributions to the community. But could you make it clear which pcl version you are using? I got errors when compiling your codes, mainly the no matching function for call to pcl::VoxelGrid and pcl::KdTreeFLANN functions. I guess it might be because the pcl version incompatibility. Note that I am using pcl-1.11

I attach my error logs as follows, many thanks!


peter@peter-ThinkStation-P330:~/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM$ catkin build mloam

Profile: default
Extending: [cached] /opt/ros/melodic
Workspace: /home/peter/HDD2T/workspace/1_opensource/mloam_ws

Build Space: [exists] /home/peter/HDD2T/workspace/1_opensource/mloam_ws/build
Devel Space: [exists] /home/peter/HDD2T/workspace/1_opensource/mloam_ws/devel
Install Space: [unused] /home/peter/HDD2T/workspace/1_opensource/mloam_ws/install
Log Space: [exists] /home/peter/HDD2T/workspace/1_opensource/mloam_ws/logs
Source Space: [exists] /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src
DESTDIR: [unused] None

Devel Space Layout: linked
Install Space Layout: None

Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False

Whitelisted Packages: None
Blacklisted Packages: None

Workspace configuration appears valid.

[build] Found '8' packages in 0.0 seconds.
[build] Package table is up to date.
Starting >>> mloam_common
Starting >>> mloam_msgs
Starting >>> mloam_pcl
Finished <<< mloam_msgs [ 0.1 seconds ]
Finished <<< mloam_common [ 0.1 seconds ]
Finished <<< mloam_pcl [ 0.1 seconds ]
Starting >>> mloam


Errors << mloam:make /home/peter/HDD2T/workspace/1_opensource/mloam_ws/logs/mloam/build.make.002.log
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/featureExtract/feature_extract.cpp: In member function ‘void FeatureExtract::extractCloud(const PointICloud&, const ScanInfo&, cloudFeature&)’:
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/featureExtract/feature_extract.cpp:125:73: error: conversion from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to non-scalar type ‘const Ptr {aka const std::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ requested
const PointICloud::Ptr laser_cloud = boost::make_shared(laser_cloud_in);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/lidarTracker/lidar_tracker.cpp: In member function ‘Pose LidarTracker::trackCloud(const cloudFeature&, const cloudFeature&, const Pose&)’:
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/lidarTracker/lidar_tracker.cpp:31:72: error: conversion from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to non-scalar type ‘common::PointICloudPtr {aka std::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ requested
PointICloudPtr corner_points_last = boost::make_shared(prev_cloud_feature.find("corner_points_less_sharp")->second);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/lidarTracker/lidar_tracker.cpp:32:70:** error:** conversion from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to non-scalar type ‘common::PointICloudPtr {aka std::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ requested
PointICloudPtr surf_points_last = boost::make_shared(prev_cloud_feature.find("surf_points_less_flat")->second);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/lidarTracker/lidar_tracker.cpp:37:73: error: conversion from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to non-scalar type ‘common::PointICloudPtr {aka std::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ requested
PointICloudPtr corner_points_sharp = boost::make_shared(cur_cloud_feature.find("corner_points_sharp")->second);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/lidarTracker/lidar_tracker.cpp:38:70: error: conversion from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to non-scalar type ‘common::PointICloudPtr {aka std::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ requested
PointICloudPtr surf_points_flat = boost::make_shared(cur_cloud_feature.find("surf_points_flat")->second);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp: In member function ‘void Estimator::process()’:
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:488:94:** error**: no matching function for call to ‘pcl::VoxelGridpcl::PointXYZI::setInputCloud(boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type)’
down_size_filter_corner_.setInputCloud(boost::make_shared(corner_points));
^
In file included from /usr/local/include/pcl-1.11/pcl/correspondence.h:45:0,
from /usr/local/include/pcl-1.11/pcl/cloud_iterator.h:43,
from /usr/local/include/pcl-1.11/pcl/common/centroid.h:46,
from /usr/local/include/pcl-1.11/pcl/common/transforms.h:44,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.h:36,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:14:
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: candidate: void pcl::PCLBase::setInputCloud(const PointCloudConstPtr&) [with PointT = pcl::PointXYZI; pcl::PCLBase::PointCloudConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >]
setInputCloud (const PointCloudConstPtr &cloud);
^~~~~~~~~~~~~
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: no known conversion for argument 1 from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to ‘const PointCloudConstPtr& {aka const std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >&}’
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:493:90: error: no matching function for call to ‘pcl::VoxelGridpcl::PointXYZI::setInputCloud(boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type)’
down_size_filter_surf_.setInputCloud(boost::make_shared(surf_points));
^
In file included from /usr/local/include/pcl-1.11/pcl/correspondence.h:45:0,
from /usr/local/include/pcl-1.11/pcl/cloud_iterator.h:43,
from /usr/local/include/pcl-1.11/pcl/common/centroid.h:46,
from /usr/local/include/pcl-1.11/pcl/common/transforms.h:44,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.h:36,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:14:
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: candidate: void pcl::PCLBase::setInputCloud(const PointCloudConstPtr&) [with PointT = pcl::PointXYZI; pcl::PCLBase::PointCloudConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >]
setInputCloud (const PointCloudConstPtr &cloud);
^~~~~~~~~~~~~
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: no known conversion for argument 1 from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to ‘const PointCloudConstPtr& {aka const std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >&}’
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp: In member function ‘void Estimator::buildCalibMap()’:
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:1106:98: error: no matching function for call to ‘pcl::VoxelGridpcl::PointXYZI::setInputCloud(boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type)’
down_size_filter.setInputCloud(boost::make_shared(surf_points_local_map_[n]));
^
In file included from /usr/local/include/pcl-1.11/pcl/correspondence.h:45:0,
from /usr/local/include/pcl-1.11/pcl/cloud_iterator.h:43,
from /usr/local/include/pcl-1.11/pcl/common/centroid.h:46,
from /usr/local/include/pcl-1.11/pcl/common/transforms.h:44,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.h:36,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:14:
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: candidate: void pcl::PCLBase::setInputCloud(const PointCloudConstPtr&) [with PointT = pcl::PointXYZI; pcl::PCLBase::PointCloudConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >]
setInputCloud (const PointCloudConstPtr &cloud);
^~~~~~~~~~~~~
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: no known conversion for argument 1 from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to ‘const PointCloudConstPtr& {aka const std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >&}’
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:1108:100: error: no matching function for call to ‘pcl::VoxelGridpcl::PointXYZI::setInputCloud(boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type)’
down_size_filter.setInputCloud(boost::make_shared(corner_points_local_map_[n]));
^
In file included from /usr/local/include/pcl-1.11/pcl/correspondence.h:45:0,
from /usr/local/include/pcl-1.11/pcl/cloud_iterator.h:43,
from /usr/local/include/pcl-1.11/pcl/common/centroid.h:46,
from /usr/local/include/pcl-1.11/pcl/common/transforms.h:44,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.h:36,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:14:
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: candidate: void pcl::PCLBase::setInputCloud(const PointCloudConstPtr&) [with PointT = pcl::PointXYZI; pcl::PCLBase::PointCloudConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >]
setInputCloud (const PointCloudConstPtr &cloud);
^~~~~~~~~~~~~
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: no known conversion for argument 1 from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to ‘const PointCloudConstPtr& {aka const std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >&}’
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:1129:120:** error:** no matching function for call to ‘pcl::KdTreeFLANNpcl::PointXYZI::setInputCloud(boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type)’
kdtree_surf_points_local_map->setInputCloud(boost::make_shared(surf_points_local_map_filtered_[n]));
^
In file included from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/parameters.h:31:0,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.h:45,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:14:
/usr/local/include/pcl-1.11/pcl/kdtree/kdtree_flann.h:144:7: note: candidate: void pcl::KdTreeFLANN<PointT, Dist>::setInputCloud(const PointCloudConstPtr&, const IndicesConstPtr&) [with PointT = pcl::PointXYZI; Dist = flann::L2_Simple; pcl::KdTreeFLANN<PointT, Dist>::PointCloudConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >; pcl::KdTreeFLANN<PointT, Dist>::IndicesConstPtr = std::shared_ptr<const std::vector >]
setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices = IndicesConstPtr ()) override;
^~~~~~~~~~~~~
/usr/local/include/pcl-1.11/pcl/kdtree/kdtree_flann.h:144:7: note: no known conversion for argument 1 from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to ‘const PointCloudConstPtr& {aka const std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >&}’
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:1130:124: error: no matching function for call to ‘pcl::KdTreeFLANNpcl::PointXYZI::setInputCloud(boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type)’
kdtree_corner_points_local_map->setInputCloud(boost::make_shared(corner_points_local_map_filtered_[n]));
^
In file included from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/parameters.h:31:0,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.h:45,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:14:
/usr/local/include/pcl-1.11/pcl/kdtree/kdtree_flann.h:144:7: note: candidate: void pcl::KdTreeFLANN<PointT, Dist>::setInputCloud(const PointCloudConstPtr&, const IndicesConstPtr&) [with PointT = pcl::PointXYZI; Dist = flann::L2_Simple; pcl::KdTreeFLANN<PointT, Dist>::PointCloudConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >; pcl::KdTreeFLANN<PointT, Dist>::IndicesConstPtr = std::shared_ptr<const std::vector >]
setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices = IndicesConstPtr ()) override;
^~~~~~~~~~~~~
/usr/local/include/pcl-1.11/pcl/kdtree/kdtree_flann.h:144:7: note: no known conversion for argument 1 from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to ‘const PointCloudConstPtr& {aka const std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >&}’
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp: In member function ‘void Estimator::buildLocalMap()’:
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:1198:98: **error: **no matching function for call to ‘pcl::VoxelGridpcl::PointXYZI::setInputCloud(boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type)’
down_size_filter.setInputCloud(boost::make_shared(surf_points_local_map_[n]));
^
In file included from /usr/local/include/pcl-1.11/pcl/correspondence.h:45:0,
from /usr/local/include/pcl-1.11/pcl/cloud_iterator.h:43,
from /usr/local/include/pcl-1.11/pcl/common/centroid.h:46,
from /usr/local/include/pcl-1.11/pcl/common/transforms.h:44,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.h:36,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:14:
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: candidate: void pcl::PCLBase::setInputCloud(const PointCloudConstPtr&) [with PointT = pcl::PointXYZI; pcl::PCLBase::PointCloudConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >]
setInputCloud (const PointCloudConstPtr &cloud);
^~~~~~~~~~~~~
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: no known conversion for argument 1 from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to ‘const PointCloudConstPtr& {aka const std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >&}’
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:1202:100: **error: **no matching function for call to ‘pcl::VoxelGridpcl::PointXYZI::setInputCloud(boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type)’
down_size_filter.setInputCloud(boost::make_shared(corner_points_local_map_[n]));
^
In file included from /usr/local/include/pcl-1.11/pcl/correspondence.h:45:0,
from /usr/local/include/pcl-1.11/pcl/cloud_iterator.h:43,
from /usr/local/include/pcl-1.11/pcl/common/centroid.h:46,
from /usr/local/include/pcl-1.11/pcl/common/transforms.h:44,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.h:36,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:14:
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: candidate: void pcl::PCLBase::setInputCloud(const PointCloudConstPtr&) [with PointT = pcl::PointXYZI; pcl::PCLBase::PointCloudConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >]
setInputCloud (const PointCloudConstPtr &cloud);
^~~~~~~~~~~~~
/usr/local/include/pcl-1.11/pcl/pcl_base.h:95:7: note: no known conversion for argument 1 from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to ‘const PointCloudConstPtr& {aka const std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >&}’
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:1231:120: **error: **no matching function for call to ‘pcl::KdTreeFLANNpcl::PointXYZI::setInputCloud(boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type)’
kdtree_surf_points_local_map->setInputCloud(boost::make_shared(surf_points_local_map_filtered_[n]));
^
In file included from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/parameters.h:31:0,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.h:45,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:14:
/usr/local/include/pcl-1.11/pcl/kdtree/kdtree_flann.h:144:7: note: candidate: void pcl::KdTreeFLANN<PointT, Dist>::setInputCloud(const PointCloudConstPtr&, const IndicesConstPtr&) [with PointT = pcl::PointXYZI; Dist = flann::L2_Simple; pcl::KdTreeFLANN<PointT, Dist>::PointCloudConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >; pcl::KdTreeFLANN<PointT, Dist>::IndicesConstPtr = std::shared_ptr<const std::vector >]
setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices = IndicesConstPtr ()) override;
^~~~~~~~~~~~~
/usr/local/include/pcl-1.11/pcl/kdtree/kdtree_flann.h:144:7: note: no known conversion for argument 1 from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to ‘const PointCloudConstPtr& {aka const std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >&}’
/home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:1233:124: **error: **no matching function for call to ‘pcl::KdTreeFLANNpcl::PointXYZI::setInputCloud(boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type)’
kdtree_corner_points_local_map->setInputCloud(boost::make_shared(corner_points_local_map_filtered_[n]));
^
In file included from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/parameters.h:31:0,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.h:45,
from /home/peter/HDD2T/workspace/1_opensource/mloam_ws/src/M-LOAM/estimator/src/estimator/estimator.cpp:14:
/usr/local/include/pcl-1.11/pcl/kdtree/kdtree_flann.h:144:7: note: candidate: void pcl::KdTreeFLANN<PointT, Dist>::setInputCloud(const PointCloudConstPtr&, const IndicesConstPtr&) [with PointT = pcl::PointXYZI; Dist = flann::L2_Simple; pcl::KdTreeFLANN<PointT, Dist>::PointCloudConstPtr = std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >; pcl::KdTreeFLANN<PointT, Dist>::IndicesConstPtr = std::shared_ptr<const std::vector >]
setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices = IndicesConstPtr ()) override;
^~~~~~~~~~~~~
/usr/local/include/pcl-1.11/pcl/kdtree/kdtree_flann.h:144:7: note: no known conversion for argument 1 from ‘boost::detail::sp_if_not_array<pcl::PointCloudpcl::PointXYZI >::type {aka boost::shared_ptr<pcl::PointCloudpcl::PointXYZI >}’ to ‘const PointCloudConstPtr& {aka const std::shared_ptr<const pcl::PointCloudpcl::PointXYZI >&}’
make[2]: *** [CMakeFiles/mloam_lib.dir/src/featureExtract/feature_extract.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/mloam_lib.dir/src/lidarTracker/lidar_tracker.cpp.o] Error 1
make[2]: *** [CMakeFiles/mloam_lib.dir/src/estimator/estimator.cpp.o] Error 1
make[1]: *** [CMakeFiles/mloam_lib.dir/all] Error 2
make: *** [all] Error 2
cd /home/peter/HDD2T/workspace/1_opensource/mloam_ws/build/mloam; catkin build --get-env mloam | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -
.....................................................................................................................
Failed << mloam:make [ Exited with code 2 ]
Failed <<< mloam [ 48.7 seconds ]
[build] Summary: 3 of 4 packages succeeded.
[build] Ignored: 4 packages were skipped or are blacklisted.
[build] Warnings: None.
[build] Abandoned: None.
[build] Failed: 1 packages failed.
[build] Runtime: 48.9 seconds total.

calibExTranslationPlanar formula inference

Thx for your great work and the code in function calibExTranslationPlanar is vague that the paper didn't mention. Can you explain the code with formula?

const Eigen::Quaterniond &q_yx = calib_ext_[idx_data].q_; Eigen::MatrixXd G = Eigen::MatrixXd::Zero(v_pose_.size() * 2, 4); Eigen::MatrixXd w = Eigen::MatrixXd::Zero(v_pose_.size() * 2, 1); for (size_t i = 0; i < v_pose_.size(); i++) { const Pose &pose_ref = v_pose_[i][idx_ref]; const Pose &pose_data = v_pose_[i][idx_data]; AngleAxisd ang_axis_ref(pose_ref.q_); AngleAxisd ang_axis_data(pose_data.q_); double t_dis = abs(pose_ref.t_.dot(ang_axis_ref.axis()) - pose_data.t_.dot(ang_axis_data.axis())); double huber = t_dis > 0.04 ? 0.04 / t_dis : 1.0; Eigen::Matrix2d J = pose_ref.q_.toRotationMatrix().block<2,2>(0, 0) - Eigen::Matrix2d::Identity(); Eigen::Vector3d n = q_yx.toRotationMatrix().row(2); Eigen::Vector3d p = q_yx * (pose_data.t_ - pose_data.t_.dot(n) * n); Eigen::Matrix2d K; K << p(0), -p(1), p(1), p(0); G.block<2, 2>(i * 2, 0) = huber * J; G.block<2, 2>(i * 2, 2) = huber * K; w.block<2, 1>(i * 2, 0) = pose_ref.t_.block<2,1>(0,0); } Eigen::Vector4d m = G.jacobiSvd(Eigen::ComputeThinU | Eigen::ComputeThinV).solve(w); Eigen::Vector3d x(-m(0), -m(1), 0); double yaw = atan2(m(3), m(2)); Eigen::Quaterniond q_z(Eigen::AngleAxisd(yaw, Eigen::Vector3d::UnitZ())); calib_ext_[idx_data] = Pose(q_z*q_yx, x); return true;

ImageSegmenter::segmentCloud

Hello, author! Thanks for your effort with M-LOAM.
I have a question about segmentCloud function in image_segmenter.hpp.

dist = sqrt(d1 * d1 + d2 * d2 - 2 * d1 * d2 * cos(alpha));
alpha = iter->first == 0 ? segment_alphax_ : segment_alphay_;
angle = atan2(d2 * sin(alpha), (d1 - d2 * cos(alpha)));

To find the angle whether the criterion is met, first find the dist. However, in the process of finding dist, the value of alpha is not defined, and alpha is defined in the next line. 1) It is questionable whether the positions of these two lines should be swapped.

Also, when iter->first ==0 when calculating alpha, alpha has the value of segment_alphay_. By the way, iter->first == 0 means that they have the same row value, which seems to mean that the angle corresponding to horizontal should be used. According to image_segmenter.cpp, the angle corresponding to horizontal seems to be segment_alphax_, but 2) I wonder if alphax_ and alphay_ should be interchanged.

Thank you and I await for your answer!.

Quaternion in Hamilton or JPL ?

Hi @gogojjh thanks for your great work!
I'm confused about the code in math.hpp.

Function LeftQuatMatrix looks like the quaternion in JPL. However, as far as I know, Eigen uses it in Hamilton.

Could you please help me clear my confusion?

lidar_pure_odom_factor

Hi doctor jiao,
Thanks for your hard work firsly!
I'm curious about the jacobians in lidar_pure_odom_factor.hpp and lidar_online_calib_factor.hpp, so i carefully calculate them, according to right pertubation of SO(3) and the jacobian's type is numerator layout.
Jacobians in lidar_online_calib_factor.hpp are all consistent with my result, but there are there mismatchs in lidar_pure_odom_factor.hpp. I'm not sure whether there are still some errors in my derivation, although i carefully checked the result twice. Thanks for your time and help a lot !

Jacobians of point to plane with point to line, the only difference is :
In point-to-plane there is a w.transpose() in the front.
In point-to-line w.transpose()is replaced by eta * Utility::skewSymmetric(ba - bb) in the code, according to link rules of derivate.

  • point to plane residual r wrt R_p, line 69, where R_p is the primary laser's pose at pivot frame.
    My result is
    jaco_pivot.rightCols<3>() = w.transpose() * Utility::skewSymmetric(Rp.transpose() * (Ri * Rext * point_ + Ri * t_ext + t_i - t_pivot)),
    In code it is
    jaco_pivot.rightCols<3>() = w.transpose() * (Rp.transpose() * Utility::skewSymmetric(Ri * Rext * point_ + Ri * t_ext + t_i - t_pivot));
    The difference is whether Rp.trans() in the skewSymmetric.

We can see jacobians of point to line residual wrt R_p, line 249, Rp.trans() is in the skewSymmetric.

  • point to plane residual r wrt ΔR, line 95, where ΔR is from primary laser to auxiliary laser extrinsic rotation.
    My result is
    jaco_ex.rightCols<3>() = -w.transpose() * Rp.transpose() * Ri * Utility::skewSymmetric(Rext * point_) * Rext;
    In code it is
    jaco_ex.rightCols<3>() = -w.transpose() * Rp.transpose() * Ri * Utility::skewSymmetric(Rext * point_);
    The difference is whether multiply Rext, namelly ΔR.

  • point to line residual r wrt ΔR, line 274.
    My result is
    jaco_ex.rightCols<3>() =- eta * Utility::skewSymmetric(ba - bb) * Rp.transpose() * Ri * (Rext * Utility::skewSymmetric(point_)
    In code it is
    jaco_ex.rightCols<3>() =- eta * Utility::skewSymmetric(ba - bb) * Rp.transpose() * Ri * (Rext * Utility::skewSymmetric(point_) + Utility::skewSymmetric(t_ext));
    The difference is whether plus Utility::skewSymmetric(t_ext)

roslaunch

Hello professor!
I`m totally a freshman of SLAM, could you please provide the roslaunch method to launch the code? I got deadly puzzled about the .py method. Thanks very much!

about the evalDegenracy in M-LOAM

Thanks for sharing the great work! I have a question about the function of evalDegenracy.

First, the eigenvectors are columns corresponding using SelfAdjointEigenSolver as you mentioned in the code

        Eigen::SelfAdjointEigenSolver<Eigen::Matrix<double, 6, 6> > esolver(mat_H);
        Eigen::Matrix<double, 1, 6> mat_E = esolver.eigenvalues().real(); // 6*1
        Eigen::Matrix<double, 6, 6> mat_V_f = esolver.eigenvectors().real(); // 6*6, column is the corresponding eigenvector

And you update the column as zero vector, the same as setting Vu (without transpose) in Eq (16) in On Degeneracy of Optimization-based State Estimation Problems. I agree it is correct.

mat_V_p.col(j) = Eigen::Matrix<double, 6, 1>::Zero();

image

But the loam and liomapping is going to set the row data of the eigenVectors,

My question is does it have any difference in the definition of AtA? Or both codes are right? I am a little confused about the implementation of the paper.

https://github.com/laboshinl/loam_velodyne/blob/25db5dd5b2c135e779a50a11af0a53434598df7e/src/lib/BasicLaserOdometry.cpp#L581

            for (int i = 0; i < 6; i++)
            {
               if (matE(0, i) < eignThre[i])
               {
                  for (int j = 0; j < 6; j++)
                  {
                     matV2(i, j) = 0;
                  }
                  isDegenerate = true;
               }

https://github.com/hyye/lio-mapping/blob/8485a4d9c359b7e486ad019a10815ecb8fd1257f/src/point_processor/PointOdometry.cc#L600

          float eign_thre[6] = {10, 10, 10, 10, 10, 10};
          for (int i = 0; i < 6; i++) {
            if (mat_E(0, i) < eign_thre[i]) {
              for (int j = 0; j < 6; j++) {
                mat_V2(i, j) = 0;
              }

about the edge residual

in A. can-Based Motion Estimation of VI.INITIALIZATION in your paper:"Robust Odometry and Mapping for Multi-LiDARSystems with Online Extrinsic Calibration". I was confused with the edge residual. for "where[w1,d1]and[w2,d2]are the coefficients ofΠ1andΠ2,w1coincides with the projection direction fromLtop, andΠ2is perpendicular toΠ1s.t.w2⊥w1, andw2⊥L. " in your paper, I think p in Π2, so rH(x,p,Π2) is equal to zero for ever! Could you give me some explantaiton about this part?
Thank you very much!

image_segmenter.hpp

285,286行是不是写反了
dist = sqrt(d1 * d1 + d2 * d2 - 2 * d1 * d2 * cos(alpha));
alpha = iter->first == 0 ? segment_alphax_ : segment_alphay_;

Estimator::goodFeatureMatching()

Hi author,
When we select good matching of feature points, is there some reference material and theory to evaluate score behind estimator/estimator.cpp#L1483.
BTW,

  • estimator.cpp#L116, maybe is eig_thre_.block(OPT_WINDOW_SIZE + 1, 0, NUM_OF_LASER, 1)
  • initial_extrinsics.cpp#L146, according to our communication in the email, should be plus, compared with initial_extrinsics.cpp#L139

Thanks for your help and time in advance!

How are the results on KITTI

Hi, it is a very helpful work. I wonder how are your results on KITTI. I run mloam on kitti bag, but the number of keyframes is not equal to bag frames? I can't use kitti evaluation tool to plot path. Do you have tested on kitti?

如何使用两个雷达运行mloam.

作者你好,这个工作很出色,但我在使用两个雷达进行实验时出现了问题,程序虽然能够运行,但是rviz无地图出现,因此我想请教一下如何使用两个雷达运行mloam.

根据mloam_handheld.launch的内容,我提供了 /right/velodyne_points /left/velodyne_points 两个点云topic,
然后执行roslaunch mloam_handheld.launchrviz -d mloam.rviz. 结果却没有任何东西显示。

我需要做什么来正确运行程序?另外,m-loam应该并不需要IMU的topic吧?还是说使用bag和实时使用雷达数据有所区别呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.