hku-mars / BALM

An efficient and consistent bundle adjustment for lidar mapping
GNU General Public License v2.0
700 stars 151 forks source link

Sliding Window BA #30

Open jkff00 opened 1 year ago

jkff00 commented 1 year ago

Dear Author. Hello! Sorry to disturb you, I have a question to ask you. We have a scene data of 3081 frames and using BALM 2.0 to optimize him, it results in memory overflow. Therefore, we would like to use a sliding window to optimize the whole scene step by step. Could you please tell me the size of the sliding window and what is the right number of frames to set for each slide, or your suggestion for parameter setting. Thank you very much!

Zale-Liu commented 1 year ago

3081 is definitely too big for a BA problem. We always use two approaches to solve this problem. First, you can down-sample the input frames from 10Hz to 2Hz, while it may lower the accuracy. Second, you can refer to the paper "Large-Scale LiDAR Consistent Mapping using Hierarchical LiDAR Bundle Adjustment" which deal with large-scale BA problem specially. The paper may provide some parameters you want.

jkff00 commented 1 year ago

Hello Author. Thank you very much for your last reply, I am currently reproducing your BA for a large scene. first, I build a factor map using the initial poses. Second, I set the window size to 6 and the step size to 3 to build a 3-layer pyramid structure. In the first layer, I add the results of the local BA into the factor graph to constrain the adjacent two frames of poses and update the factor graph. In the second layer, I obtain the pose of the corresponding step size from the factor graph and repeat the local BA. as in the first layer, I also update the factor graph. In the last layer, I perform global BA on the bit pose of the corresponding step, and then update the factor map and output the result. For my results, I found that in some areas, there are ghosting and most of the areas can be optimized well, is there something wrong with the above steps? (For fast reproduction, I fixed the noise model parameter of BA constraint in factor map to 1e-6, and the noise model parameter of initial poses was set to 1e-2)

jkff00 commented 1 year ago

The following figure, the left part is fine, the right part is shifted 2022-12-12 15-20-44 的屏幕截图

jkff00 commented 1 year ago

This is the pre-optimization 2022-12-12 15-22-40 的屏幕截图

HaisenbergPeng commented 1 year ago

3081 is definitely too big for a BA problem. We always use two approaches to solve this problem. First, you can down-sample the input frames from 10Hz to 2Hz, while it may lower the accuracy. Second, you can refer to the paper "Large-Scale LiDAR Consistent Mapping using Hierarchical LiDAR Bundle Adjustment" which deal with large-scale BA problem specially. The paper may provide some parameters you want.

Hi, any idea if the code implementation of the paper you referred will be open-sourced or not?

HaisenbergPeng commented 1 year ago

(For fast reproduction, I fixed the noise model parameter of BA constraint in factor map to 1e-6, and the noise model parameter of initial poses was set to 1e-2

Hi, it seems that your implementation is not the same as the referred paper "Large-Scale LiDAR Consistent Mapping using Hierarchical LiDAR Bundle Adjustment". Did you tried the method in the paper, i.e., to combine all pose constraints from the hierarchical BA?

jkff00 commented 1 year ago

Hi Author!   Thank you very much for your reply, I have reproduced the article and tested it a lot, and it works very well in large-scale scenes. However, in an indoor multi-floor narrow environment, constructing a 4-story hierarchical BA, in which GlobalBA often has insufficient constraints due to insufficient sparseness between frames, which may be a problem. Looking forward to your follow-up work!

 Regards  Jin Xiaofeng

WINNER 东区 @.***

 

------------------ 原始邮件 ------------------ 发件人: "hku-mars/BALM" @.>; 发送时间: 2023年3月17日(星期五) 上午10:08 @.>; 抄送: "WINNER @.**@.>; 主题: Re: [hku-mars/BALM] Sliding Window BA (Issue #30)

(For fast reproduction, I fixed the noise model parameter of BA constraint in factor map to 1e-6, and the noise model parameter of initial poses was set to 1e-2

Hi, it seems that your implementation is not the same as the referred paper "Large-Scale LiDAR Consistent Mapping using Hierarchical LiDAR Bundle Adjustment". Did you tried the method in the paper, i.e., to combine all pose constraints from the hierarchical BA?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

HaisenbergPeng commented 1 year ago

Hi Author!   Thank you very much for your reply, I have reproduced the article and tested it a lot, and it works very well in large-scale scenes. However, in an indoor multi-floor narrow environment, constructing a 4-story hierarchical BA, in which GlobalBA often has insufficient constraints due to insufficient sparseness between frames, which may be a problem. Looking forward to your follow-up work!  Regards  Jin Xiaofeng WINNER 东区 @.   ------------------ 原始邮件 ------------------ 发件人: "hku-mars/BALM" @.>; 发送时间: 2023年3月17日(星期五) 上午10:08 @.>; 抄送: "WINNER @*.**@*.>; 主题: Re: [hku-mars/BALM] Sliding Window BA (Issue #30) (For fast reproduction, I fixed the noise model parameter of BA constraint in factor map to 1e-6, and the noise model parameter of initial poses was set to 1e-2 Hi, it seems that your implementation is not the same as the referred paper "Large-Scale LiDAR Consistent Mapping using Hierarchical LiDAR Bundle Adjustment". Did you tried the method in the paper, i.e., to combine all pose constraints from the hierarchical BA? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

@jkff00 Hi, great to hear that you have reproduced the paper! Have you encountered the large covariance matrix from BA? https://github.com/hku-mars/BALM/issues/33#issue-1474454276

jkff00 commented 1 year ago

WINNER 东区 @.***

 Hello!I limit the number of frames in the last layer (the device has limited performance), and the number of layers of BA adjusts adaptively, so the covariance matrix of BA is always at a certain size.

------------------ 原始邮件 ------------------ 发件人: "hku-mars/BALM" @.>; 发送时间: 2023年3月17日(星期五) 中午1:59 @.>; 抄送: "WINNER @.**@.>; 主题: Re: [hku-mars/BALM] Sliding Window BA (Issue #30)

Hi Author!   Thank you very much for your reply, I have reproduced the article and tested it a lot, and it works very well in large-scale scenes. However, in an indoor multi-floor narrow environment, constructing a 4-story hierarchical BA, in which GlobalBA often has insufficient constraints due to insufficient sparseness between frames, which may be a problem. Looking forward to your follow-up work!  Regards  Jin Xiaofeng WINNER 东区 @.   … ------------------ 原始邮件 ------------------ 发件人: "hku-mars/BALM" @.>; 发送时间: 2023年3月17日(星期五) 上午10:08 @.>; 抄送: "WINNER @.@.>; 主题: Re: [hku-mars/BALM] Sliding Window BA (Issue #30) (For fast reproduction, I fixed the noise model parameter of BA constraint in factor map to 1e-6, and the noise model parameter of initial poses was set to 1e-2 Hi, it seems that your implementation is not the same as the referred paper "Large-Scale LiDAR Consistent Mapping using Hierarchical LiDAR Bundle Adjustment". Did you tried the method in the paper, i.e., to combine all pose constraints from the hierarchical BA? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

@jkff00 Hi, great to hear that you have reproduced the paper! Have you encountered the large covariance matrix from BA? https://github.com/hku-mars/BALM/issues/33#issue-1474454276

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

HaisenbergPeng commented 1 year ago

@jkff00 Hi, thanks for your reply! Recently I tried to implement the large-scale BA, but I couldn't figure out how to get the covariance matrix for the constraints between pose i and pose j, since we could only get the covariance matrix of pose i relative to a fixed pose. Greatly appreciated if you could share some thoughts.

jkff00 commented 1 year ago

Hi !     I have only used the H matrix,it's work. This may be the covariance matrix relative to the fixed poses you are talking about.

Are you Chinese too? Maybe we can add a WeChat to communicate. My phone number is: 13106026721.

WINNER 东区 @.***

 

------------------ 原始邮件 ------------------ 发件人: "hku-mars/BALM" @.>; 发送时间: 2023年3月20日(星期一) 下午4:27 @.>; 抄送: "WINNER @.**@.>; 主题: Re: [hku-mars/BALM] Sliding Window BA (Issue #30)

Hi, thanks for your reply! Recently I tried to implement the large-scale BA, but I couldn't figure out how to get the covariance matrix for the constraints between pose i and pose j, since we could only get the covariance matrix of pose i relative to a fixed pose. Greatly appreciated if you could share some thoughts.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

HaisenbergPeng commented 1 year ago

Sure. Let's talk in wechat

Woodpecker0 commented 1 year ago

@jkff00 @HaisenbergPeng Can I join your communication on wechat ? I have implement the work of 《Globally Consistent 3D LiDAR Mapping with GPU-accelerated GICP Matching Cost Factors》, and I tried to implement the large-scale BA with BALM and compare them.

jkff00 commented 1 year ago

sure,I'm glad to communicate with you.

---Original--- From: @.> Date: Thu, Mar 30, 2023 15:03 PM To: @.>; Cc: @.**@.>; Subject: Re: [hku-mars/BALM] Sliding Window BA (Issue #30)

@jkff00 @HaisenbergPeng Can I join your communication on wechat ? I have implement the work of 《Globally Consistent 3D LiDAR Mapping with GPU-accelerated GICP Matching Cost Factors》, and I tried to implement the large-scale BA with BALM and compare them.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

JzHuai0108 commented 1 year ago

In the end, I think the weighting matrix for relative pose constraints used in pose graph optimization is independent of the gauge fixation. This assertion is drawn after referring to Zichao Zhang's masterpiece.

jkff00 commented 1 year ago

Thank you for sharing, this is rigorous, I will have a clearer understanding of factor graph optimization.

---Original--- From: @.> Date: Sat, Apr 8, 2023 22:28 PM To: @.>; Cc: @.**@.>; Subject: Re: [hku-mars/BALM] Sliding Window BA (Issue #30)

In the end, I think the weighting matrix for relative pose constraints used in pose graph optimization is independent of the gauge fixation. This assertion is drawn after referring to Zichao Zhang's masterpiece.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>