Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(python): default LidarData point_cloud/segmentation to lists#9808

Open
Bartok9 wants to merge 1 commit into
microsoft:mainmicrosoft/AirSim:mainfrom
Bartok9:aerial/python-lidar-data-list-defaults-20260723Bartok9/AirSim:aerial/python-lidar-data-list-defaults-20260723Copy head branch name to clipboard
Open

fix(python): default LidarData point_cloud/segmentation to lists#9808
Bartok9 wants to merge 1 commit into
microsoft:mainmicrosoft/AirSim:mainfrom
Bartok9:aerial/python-lidar-data-list-defaults-20260723Bartok9/AirSim:aerial/python-lidar-data-list-defaults-20260723Copy head branch name to clipboard

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 23, 2026

Copy link
Copy Markdown

Summary

  • Default LidarData.point_cloud and LidarData.segmentation to empty lists.
  • Aligns Python defaults with C++ vector fields so sample clients can len() / slice before RPC fill.

Motivation

C++ SoT (CommonStructs.hpp / RpcLibAdaptorsBase::LidarData):

  • vector<real_T> point_cloud
  • vector<int> segmentation

Python historically used point_cloud = 0.0 and segmentation = 0. Public samples (drone_lidar.py, car_lidar.py, point-cloud scripts) call len(lidarData.point_cloud) and walk XYZ triplets — scalar defaults raise TypeError and mislead typed consumers. Same class of Python≠C++ default bug as BarometerData scalars.

Hunk is confined to LidarData class fields (orthogonal to open numpy2 ops / BarometerData / Magnetometer covariance on the same file).

Verification

cd PythonClient
PYTHONPATH=. python3.11 -m unittest tests.test_lidar_data_types -v
# 2 tests OK (offline; msgpackrpc stubbed; real numpy)

Did not change: Vector3r/Quaternionr ops, BarometerData, MagnetometerData, utils/pfm IO.

Notes

  • Spec: aerial-drone-pr-campaign/specs/airsim/2026-07-23-1.md
  • AI-assisted; human-reviewed.

Agent-Owner: sera · Platform: hermes · Claim-TTL: 24h

Match C++ LidarData (vector point_cloud + vector segmentation). Scalar
defaults made len()/slice paths in sample lidar clients raise TypeError
before any RPC payload was applied.

Signed-off-by: Bartok9 <danielrpike9@gmail.com>
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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.