Skip to content

Remove invalid reference_buckets binding in lidar_odometry_binding.cpp#354

Merged
JanuszBedkowski merged 2 commits intomainfrom
copilot/fix-lidar-odometry-binding-errors
Feb 15, 2026
Merged

Remove invalid reference_buckets binding in lidar_odometry_binding.cpp#354
JanuszBedkowski merged 2 commits intomainfrom
copilot/fix-lidar-odometry-binding-errors

Conversation

Copy link
Contributor

Copilot AI commented Feb 15, 2026

Build fails because pybind/lidar_odometry_binding.cpp binds reference_buckets, but this member is commented out in LidarOdometryParams (line 140 of apps/lidar_odometry_step_1/lidar_odometry_utils.h).

Changes

  • Removed .def_readwrite("reference_buckets", &LidarOdometryParams::reference_buckets) from line 69 of pybind/lidar_odometry_binding.cpp

Context

The struct definition shows:

// NDTBucketMapType reference_buckets;  // Commented out

But the binding was still active:

.def_readwrite("reference_buckets", &LidarOdometryParams::reference_buckets)  // Removed
Original prompt

Problem

The build is failing with the following error:

/home/runner/work/HDMapping/HDMapping/pybind/lidar_odometry_binding.cpp:69:67: error: 'reference_buckets' is not a member of 'LidarOdometryParams'
   69 |         .def_readwrite("reference_buckets", &LidarOdometryParams::reference_buckets)

This occurs because the Python binding file pybind/lidar_odometry_binding.cpp is trying to bind several member variables that don't exist in the actual LidarOdometryParams struct defined in apps/lidar_odometry_step_1/lidar_odometry_utils.h.

Root Cause

By comparing the Python binding file with the actual struct definition, the following members are being bound but don't exist in LidarOdometryParams:

  • m_g (line 57)
  • initial_points (line 58)
  • buckets_indoor (line 61)
  • buckets_outdoor (line 62)
  • consecutive_distance (line 64)
  • reference_points (line 67)
  • reference_buckets (line 69) - This is causing the build failure
  • working_directory_preview (line 70)
  • use_robust_and_accurate_lidar_odometry (line 75)
  • distance_bucket (line 76)
  • polar_angle_deg (line 77)
  • azimutal_angle_deg (line 78)
  • robust_and_accurate_lidar_odometry_iterations (line 79)
  • distance_bucket_rigid_sf (line 81)
  • polar_angle_deg_rigid_sf (line 82)
  • azimutal_angle_deg_rigid_sf (line 83)
  • robust_and_accurate_lidar_odometry_rigid_sf_iterations (line 85-86)
  • max_distance_lidar_rigid_sf (line 87)
  • rgd_sf_sigma_x_m (line 88)
  • rgd_sf_sigma_y_m (line 89)
  • rgd_sf_sigma_z_m (line 90)
  • rgd_sf_sigma_om_deg (line 91)
  • rgd_sf_sigma_fi_deg (line 92)
  • rgd_sf_sigma_ka_deg (line 93)
  • total_length_of_calculated_trajectory (line 94)
  • threshold_initial_points (line 98)
  • use_mutliple_gaussian (line 99)
  • num_constistency_iter (line 100)
  • threshould_output_filter (line 101)
  • ahrs_gain (line 102)
  • threshold_nr_poses (line 103)
  • current_output_dir (line 104)

Solution

Update pybind/lidar_odometry_binding.cpp to:

  1. Remove all .def_readwrite() calls for members that don't exist in the actual struct
  2. Keep only the members that are actually defined in LidarOdometryParams from apps/lidar_odometry_step_1/lidar_odometry_utils.h

The valid members that should remain are:

  • filter_threshold_xy_inner
  • filter_threshold_xy_outer
  • in_out_params_indoor
  • in_out_params_outdoor
  • use_motion_from_previous_step
  • nr_iter
  • useMultithread
  • decimation
  • sliding_window_trajectory_length_threshold
  • save_calibration_validation
  • calibration_validation_points
  • max_distance_lidar
  • All the lidar_odometry_motion_model_* parameters (lines 106-126)

Files to Modify

  • pybind/lidar_odometry_binding.cpp - Remove invalid member bindings from the LidarOdometryParams class binding (lines 52-126)

Expected Outcome

After this fix, the build should complete successfully without the compilation error.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: michalpelka <3209244+michalpelka@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build failure in lidar odometry Python binding Remove invalid reference_buckets binding in lidar_odometry_binding.cpp Feb 15, 2026
Copilot AI requested a review from michalpelka February 15, 2026 10:55
Copy link
Contributor

@michalpelka michalpelka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michalpelka michalpelka marked this pull request as ready for review February 15, 2026 12:52
@JanuszBedkowski JanuszBedkowski merged commit 686af0c into main Feb 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants