minwoo0611 / MA-LIO

Asynchronous Multiple LiDAR-Inertial Odometry using Point-wise Inter-LiDAR Uncertainty Propagation
GNU General Public License v2.0
287 stars 36 forks source link

fail #3

Closed HIT-Ygq closed 7 months ago

HIT-Ygq commented 1 year ago

Very good work! I can runroslaunch ma_lio mapping_city.launch successfully, but roslaunch ma_lio mapping_urban.launchwill fail, have you encountered this? err01

minwoo0611 commented 1 year ago

It appears that your issue may have been resolved, but I've added some additional comments to further clarify things.

The launch file I utilize for urbanNav is designed for a 2 LiDAR system, whereas for the city dataset, it is tailored for a 3 LiDAR system. As detailed in the ReadMe, should you wish to operate MA-LIO with a different number of LiDARs, certain portions of the code need to be altered in accordance with the instructions provided in the ReadMe.

I appreciate your efforts in testing MA-LIO. Should you have any additional questions or concerns, please feel at ease to raise them in the issue tab.

HIT-Ygq commented 1 year ago

Thanks, I'm testing a single LiDAR. Would you be able to write a detailed description?

minwoo0611 commented 1 year ago

If your intention is to use a single LiDAR system, modifications need to be made in both the yaml file and the code. Here are the three key changes:

  1. Modify the yaml file. You should adjust each variable, as outlined in the ReadMe, to be a 1 size array with a single element.
  2. Update the laserMapping.cpp file. The ApproximateTime, Synchronizer, and cbk function should all be modified. Instructions on how to adapt the code for a single LiDAR in the MA-LIO can be found within the function. To find this information easily, you can search for the word "Especially" within laserMapping.cpp.
  3. Lastly, the use-ikfom.hpp needs to be adjusted. The extrinsic variable should match the number of your LiDARs, in this case, 1.

I sincerely hope that these instructions will be beneficial to your project. Thank you for your ongoing engagement.

HIT-Ygq commented 1 year ago

I modified the following points, but the compilation error, can you provide comments? 101 102 103 104

minwoo0611 commented 1 year ago

As I've noted in the code, the lidar_cbk_ function should contains a single function with two inputs. So, to implement your desired changes, your code adjustments would look like this:

  1. For the Synchronizer part:

    • Original:

      sync->registerCallback(boost::bind(&lidar_cbk_, _1, _1));

    • Modified for readability:

      sync->registerCallback(boost::bind(&lidar_cbk_, _1, _2));

  2. For the cbk function part:

    • Original:

      void lidar_cbk_(const sensor_msgs::PointCloud2::ConstPtr &scanMsg_)
      {
       standard_pcl_cbk(scanMsg_, 0);
       standard_pcl_cbk(scanMsg_, 0);
      }
    • Modified:

      void lidar_cbk_(const sensor_msgs::PointCloud2::ConstPtr &scanMsg_, const sensor_msgs::PointCloud2::ConstPtr &scanMsg2_)
      {
       standard_pcl_cbk(scanMsg_, 0);
      }

The registerCallback function has two variables. Therefore, lidarcbk must have two inputs. However, since the two inputs are identical, only one LiDAR message needs to be processed.

These alterations should help you adjust the code for a single LiDAR setup.

hr2894235132 commented 7 months ago

I modified the following points, but the compilation error, can you provide comments? 101 102 103 104

Hello, how did you test a single lidar?

minwoo0611 commented 7 months ago

@hr2894235132 Hello HaoRui, can you give me a more information about your problem?

hr2894235132 commented 7 months ago

@hr2894235132 Hello HaoRui, can you give me a more information about your problem?

Thank you for your prompt reply! First of all, thank you very much for your excellent work for me to learn. in fact, I have been doing fast-lio and voxel_Map related tests before, and I saw that the friend above tested the MA-LIO single lidar, so I want to understand the effect of the MA-LIO single lidar first.

minwoo0611 commented 7 months ago

You're welcome! It's great to hear about your interest and experiments with fast-lio and voxel_Map. Regarding the use of MA-LIO with a single LiDAR, here are some key points to consider:

  1. Undistortion of Points: MA-LIO enhances point undistortion by utilizing a continuous trajectory estimator. This approach provides a smoother outcome compared to traditional linear time interpolation, leading to more accurate point undistortion.

  2. Residual Weight Adjustment: In environments where the signal might be degenerate, MA-LIO adjusts the residual weight between the LiDAR and IMU based on localization weight, which could be beneficial even for a single LiDAR setup.

  3. Lidar Uncertainty: The concept of LiDAR uncertainty, a feature of MA-LIO, is also applicable to single LiDAR systems. This means each measurement can have a varying weight, enhancing the accuracy of the data.

It's important to note that while MA-LIO is primarily designed for asynchronous multiple LiDAR integration, these features can still be effectively applied to a single LiDAR setup, although the overall impact might be less pronounced compared to a multi-LiDAR configuration.

hr2894235132 commented 7 months ago

You're welcome! It's great to hear about your interest and experiments with fast-lio and voxel_Map. Regarding the use of MA-LIO with a single LiDAR, here are some key points to consider:

  1. Undistortion of Points: MA-LIO enhances point undistortion by utilizing a continuous trajectory estimator. This approach provides a smoother outcome compared to traditional linear time interpolation, leading to more accurate point undistortion.
  2. Residual Weight Adjustment: In environments where the signal might be degenerate, MA-LIO adjusts the residual weight between the LiDAR and IMU based on localization weight, which could be beneficial even for a single LiDAR setup.
  3. Lidar Uncertainty: The concept of LiDAR uncertainty, a feature of MA-LIO, is also applicable to single LiDAR systems. This means each measurement can have a varying weight, enhancing the accuracy of the data.

It's important to note that while MA-LIO is primarily designed for asynchronous multiple LiDAR integration, these features can still be effectively applied to a single LiDAR setup, although the overall impact might be less pronounced compared to a multi-LiDAR configuration.

Thank you for your patient reply, it helped me a lot! I took the time to test the single lidar.