Repository navigation
Conversation
Read beam counts, remission counts and range limits per scan so mixed ROBOTLASER1 records retain their ranges, timestamp and valid points. Co-Authored-By: ChatGPT (GPT-6 Astra Pro) <noreply@openai.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 15 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Initialize the first-scan beam count and avoid shadowing range in scanxy to resolve the two new Codacy annotations. Co-Authored-By: ChatGPT (GPT-6 Astra Pro) <noreply@openai.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.
Problem
PoseGraph(lidar=True)reads the beam count only from the firstROBOTLASER1record, assumes that every record has zero remission values, and filters every scan using the first scan's maximum range. Valid mixed records can therefore silently lose range samples, read a pose field as the timestamp, or discard valid points.For example, a two-beam record followed by a three-beam record with ranges
[2, 3, 4]and timestamp456currently produces[2, 3]and timestamp0. A nonempty remission array also shifts the timestamp without being accounted for.Change
Read each record's beam and remission counts before locating its ranges and acquisition timestamp. Store its maximum range with the scan and use that limit in
scanxy(). Keep the existing range/bearing return format and first-scan summary properties; clarify that verbose beam information describes the first scan.The record offsets match the upstream g2o
RobotLaser::read()implementation: ranges, remissions, two poses, five motion/safety fields, then the acquisition timestamp.Validation
pytest tests/test_posegraph_lidar_records.py tests/test_mobile_posegraph.py tests/test_posegraph_indices.py tests/test_graph_planners.py -q --timeout=30: 86 passed, 18 subtests passed, including the existing realkillian.g2o.zipfixture.mypy: all 166 source files passed. The new test module passes Ruff lint, both changed files pass Ruff formatting, andgit diff --checkpasses.Prior work
Checked all 91 existing fork heads and upstream PRs/issues. The two earlier fork branches that change
PoseGraph.pyconcern weighted optimization cost and retain the old first-record layout assumptions. #770 addresses graph vertex indices and #783 addresses graph access and diagnostics; their actual patches do not change the lidar record layout.Primary contributor: Afloat16.
Prepared with ChatGPT (GPT-6 Astra Pro) assistance.