Skip to content

Conversation

Copy link

Copilot AI commented Nov 12, 2025

Refactored variable and function names to improve code clarity and maintainability without changing functionality.

Changes by file

Python scripts (logger.py, evaluation.py)

  • Single-letter variables → descriptive names (Ttransform_matrix, pcpoint_cloud, gtground_truth, trajtrajectory)
  • Fixed typo: calc_picth_distributioncalc_pitch_distribution

C++ preprocessing (preprocess.h, preprocess.cpp)

  • Point cloud members: pl_surfpoint_cloud_surface, pl_cornpoint_cloud_corner, pl_buffpoint_cloud_buffer, typesspoint_types
  • Threshold variables: disA/disBdistance_threshold_A/distance_threshold_B, p2l_ratiopoint_to_line_ratio, edgea/edgebedge_threshold_a/edge_threshold_b
  • Function parameters: plpoint_cloud

C++ voxel mapping (voxelMapping.cpp)

  • Feature variables: feats_undistortfeatures_undistorted, feats_down_bodyfeatures_downsampled_body, normvecnormal_vectors
  • Counters: iterCountiteration_count, effct_feat_numeffective_feature_num

Build config

  • Added __pycache__ and *.pyc to .gitignore

Example

# Before
def calc_picth_distribution(pc_origin):
    x = pc_origin[:, 0]
    y = pc_origin[:, 1]
    z = pc_origin[:, 2]
    
# After
def calc_pitch_distribution(point_cloud_origin):
    x_coords = point_cloud_origin[:, 0]
    y_coords = point_cloud_origin[:, 1]
    z_coords = point_cloud_origin[:, 2]
// Before
PointCloudXYZI pl_surf, pl_corn, pl_buff[128];
double disA, disB, p2l_ratio;

// After
PointCloudXYZI point_cloud_surface, point_cloud_corner, point_cloud_buffer[128];
double distance_threshold_A, distance_threshold_B, point_to_line_ratio;
Original prompt

Suggest more descriptive variable and function names


💡 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.

Copilot AI and others added 4 commits November 12, 2025 07:46
Co-authored-by: HViktorTsoi <25725035+HViktorTsoi@users.noreply.github.com>
Co-authored-by: HViktorTsoi <25725035+HViktorTsoi@users.noreply.github.com>
Co-authored-by: HViktorTsoi <25725035+HViktorTsoi@users.noreply.github.com>
Co-authored-by: HViktorTsoi <25725035+HViktorTsoi@users.noreply.github.com>
Copilot AI changed the title [WIP] Suggest more descriptive variable and function names Improve variable and function naming conventions across Python and C++ codebase Nov 12, 2025
Copilot AI requested a review from HViktorTsoi November 12, 2025 07:57
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.

2 participants