Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions apps/lidar_odometry_step_1/lidar_odometry_utils_optimizers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1365,12 +1365,18 @@ void optimize_lidar_odometry(
ir + 1, ir + 1, 1.0 / (lidar_odometry_motion_model_fix_origin_y_1_sigma_m * lidar_odometry_motion_model_fix_origin_y_1_sigma_m));
tripletListP.emplace_back(
ir + 2, ir + 2, 1.0 / (lidar_odometry_motion_model_fix_origin_z_1_sigma_m * lidar_odometry_motion_model_fix_origin_z_1_sigma_m));
const double sigma_fix_origin_om = lidar_odometry_motion_model_fix_origin_om_1_sigma_deg * DEG_TO_RAD;
const double sigma_fix_origin_fi = lidar_odometry_motion_model_fix_origin_fi_1_sigma_deg * DEG_TO_RAD;
const double sigma_fix_origin_ka = lidar_odometry_motion_model_fix_origin_ka_1_sigma_deg * DEG_TO_RAD;
tripletListP.emplace_back(ir + 3, ir + 3, 1.0 / (sigma_fix_origin_om * sigma_fix_origin_om));
tripletListP.emplace_back(ir + 4, ir + 4, 1.0 / (sigma_fix_origin_fi * sigma_fix_origin_fi));
tripletListP.emplace_back(ir + 5, ir + 5, 1.0 / (sigma_fix_origin_ka * sigma_fix_origin_ka));
tripletListP.emplace_back(
ir + 3,
ir + 3,
1.0 / (lidar_odometry_motion_model_fix_origin_om_1_sigma_deg * lidar_odometry_motion_model_fix_origin_om_1_sigma_deg));
tripletListP.emplace_back(
ir + 4,
ir + 4,
1.0 / (lidar_odometry_motion_model_fix_origin_fi_1_sigma_deg * lidar_odometry_motion_model_fix_origin_fi_1_sigma_deg));
tripletListP.emplace_back(
ir + 5,
ir + 5,
1.0 / (lidar_odometry_motion_model_fix_origin_ka_1_sigma_deg * lidar_odometry_motion_model_fix_origin_ka_1_sigma_deg));

tripletListB.emplace_back(ir, 0, 0);
tripletListB.emplace_back(ir + 1, 0, 0);
Expand Down Expand Up @@ -2257,6 +2263,7 @@ bool process_worker_step_update_rgd_after(
{
acc_distance = 0;
std::scoped_lock lock(params.mutex_buckets_indoor, params.mutex_buckets_outdoor);
// the upstream decimate() below discards its result: the buffer is never decimated, so neither is this
const Eigen::Vector3d viewport = worker_data.intermediate_trajectory[0].translation();
++params.buckets_indoor_revision;
++params.buckets_outdoor_revision;
Expand Down Expand Up @@ -2290,7 +2297,7 @@ bool process_worker_step_update_rgd_after(
// decimate
if (params.decimation > 0)
{
points_global = decimate(points_global, params.decimation, params.decimation, params.decimation);
decimate(points_global, params.decimation, params.decimation, params.decimation);
}

if (params.ablation_study_use_hierarchical_rgd)
Expand Down
1 change: 0 additions & 1 deletion apps/lidar_odometry_step_1/points_global_spill.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//! reset: its second half becomes the new buffer and is folded into the buckets point by point, in order. Kept in a
//! file instead of RAM, and streamed back in the same order with the ray-cast decision of its whole size, the buckets
//! and so the trajectory are the ones the in-memory buffer gives; the RAM is one chunk. Empty directory = in memory.
//! The exception is params.decimation > 0: the in-memory buffer is decimated at a reset and this one is not, so they differ.
//!
//! One spill file per compute_step_2 call, owned by a PointsGlobalSpill on that call's stack and reached through
//! LidarOdometryParams::points_global_spill: created on entry, its final close checked on success, removed on every exit.
Expand Down
Loading