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#9808Bartok9 wants to merge 1 commit intomicrosoft:mainmicrosoft/AirSim:mainfrom Bartok9:aerial/python-lidar-data-list-defaults-20260723Bartok9/AirSim:aerial/python-lidar-data-list-defaults-20260723Copy head branch name to clipboard
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LidarData.point_cloudandLidarData.segmentationto empty lists.vectorfields so sample clients canlen()/ slice before RPC fill.Motivation
C++ SoT (
CommonStructs.hpp/RpcLibAdaptorsBase::LidarData):vector<real_T> point_cloudvector<int> segmentationPython historically used
point_cloud = 0.0andsegmentation = 0. Public samples (drone_lidar.py,car_lidar.py, point-cloud scripts) calllen(lidarData.point_cloud)and walk XYZ triplets — scalar defaults raiseTypeErrorand mislead typed consumers. Same class of Python≠C++ default bug as BarometerData scalars.Hunk is confined to
LidarDataclass fields (orthogonal to open numpy2 ops / BarometerData / Magnetometer covariance on the same file).Verification
Did not change: Vector3r/Quaternionr ops, BarometerData, MagnetometerData, utils/pfm IO.
Notes
aerial-drone-pr-campaign/specs/airsim/2026-07-23-1.mdAgent-Owner:
sera· Platform: hermes · Claim-TTL: 24h