Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nebula_tests): correct scan cutting in VLS128 unit test ground truth #150

Merged
merged 1 commit into from
May 20, 2024

Conversation

mojomex
Copy link
Collaborator

@mojomex mojomex commented May 20, 2024

PR Type

  • Bug Fix

Related Links

PR that uncovered this bug:

Description

The VelodyneScan messages in VLS128's ground truth rosbag used for its unit tests contained more than 260deg worth of packets, in fact it was close to 372deg:

PC from: 131.79 to 144.69
PC size: 134916

PC from: 144.88 to 157.73
PC size: 209429

PC from: 157.93 to 170.75
PC size: 209312

PC from: 170.95 to 184.39
PC size: 209349

This PR re-cuts the scans in the VLS128's ground truth rosbag and PCD file. This means that the VelodynePackets from before are still there, but are distributed differently across VelodyneScans. The scan messages now start/end at 0deg (the scan phase), except for the 1st pointcloud, which starts at 131deg since the first packet in the rosbag was at 131deg.

PC from: 131.79 to 0.26
PC size: 134916

PC from: 0.46 to 0.17
PC size: 209429

PC from: 0.37 to 0.07
PC size: 209312

PC from: 0.27 to 0.59
PC size: 209349

Review Procedure

Check that unit tests still pass, look at code and rosbag metadata. Confirm the PCD file looks good (e.g. via VS code plugin pcd-viewer).

Remarks

The last 0-183deg worth of packets were discarded as they do not contribute to any scan (scans complete at 0deg).

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

  • Assign PR to reviewer

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • (Optional) Unit tests have been written for new behavior
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR: Required to pass before the merge.

@mojomex mojomex requested a review from drwnz May 20, 2024 10:21
@mojomex mojomex self-assigned this May 20, 2024
Copy link
Collaborator

@drwnz drwnz left a comment

Choose a reason for hiding this comment

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

LGTM

@drwnz drwnz merged commit 0ae9198 into main May 20, 2024
8 checks passed
@mojomex mojomex deleted the vls128-unit-test-correct-scan-cutting branch May 20, 2024 11:34
mojomex added a commit that referenced this pull request May 22, 2024
* fix(hesai_hw_interface): add error handling

* check PTC command error codes, throw exception if necessary
* perform size checks before parsing responses
* emit errors on too-large payload size

* fix(hesai_decoder): print config instead of config address

* refactor(nebula_ros): combine Hesai wrapper nodes into one

This is step one of the single node refactoring of Nebula.
In this step, only the three Hesai wrapper nodes were combined into one, and no optimizations have been done that are made possible by this refactoring.

The next step is to do those optimizations (e.g. get rid of unnecessary pointcloud copying).

* refactor: remove pandarScan pub/sub, decode one packet at a time

* reword later

* temporary progress

* fix(hesai_ros_wrapper): remove changes wrongly merged during rebase

* fix(hesai_ros_wrapper): increase packet buffering to stop internal packet loss

* feat(nebula_common): add instrumentation tools

* feat(hesai_ros_wrapper): instrument code on critical path

* disable instrumentation

* feat(hesai): move received buffer into ros message instead of copy

* feat(hesai_ros_wrapper: add thread-safe queue between udp receiver and decoder, decode in separate thread

* feat(nebula_common): more instrumentation tools

* fix: update link to transport_drivers fork

* fix(hesai_hw_monitor_ros_wrapper): fixed wrong range given for S/N copy

* update GitHub PR view

* fix(hesai): print uint8, uint16 as numbers

* refactor(mt_queue): make variables more readable

* perf(hesai_ros_wrapper): update queue capacity to alleviate packet drops on ECU

* chore(hesai_ros_wrapper): remove unused pub/sub

* refactor(hesai_ros_wrapper): clean up control flow, member variables

* feat(hesai_ros_wrapper): publish/subscribe to legacy pandar_packets on demand

* change launch file back to single-threaded container

* attempt to make queue contention less bad

* chore(hesai_ros_wrapper): reduce logging output

* feat(hesai_ros_wrapper): print warning when connected to HW and receiving /pandar_packets

* feat(nebula_launch.py): throw error when trying to launch Hesai sensor and refer to hesai_launch_all_hw.xml

* chore: update cspell ignore

* refactor(nebula_ros): split single wrapper file into 3 sub-wrappers

* chore(velodyne_calibration_decoder): fix spelling

* chore(nebula_common): remove debug code

* chore(velodyne_calibration_decoder): fix spelling

* fix(hesai_decoder):  initialize last_phase to prevent empty pointcloud published on startup

* fix(nebula_tests): make Hesai tests compile again

* fix(nebula_examples): make Hesai examples compile again

* chore(velodyne_calibration_decoder): fix spelling once and for all

* chore(velodyne_calibration_decoder): fix spelling once and for all

* fix(nebula_examples): fix test failure (remove ament_lint_common)

* fix(hesai_hw_interface): add missing check for PTC error, make error type more readable

* refactor(hesai): re-introduce parameter update mechanism

* feat(hesai_ros): add watchdog timer for pointcloud output

* fix(hesai): change to possibly more accurate high_resolution_clock

* fix(hesai): fix crash on QT128

* refactor(hesai_hw_interface): refactor repeated error handling code

* fix(hesai_launch_all_hw.xml): set valid RPM when AT128 is selected

* refactor(hesai_decoder): remove redundant arguments for correction/calibration

* refactor(nebula_ros): move mt_queue to common

* refactor(velodyne)!: unify wrapper nodes. Currently WIP but compiling

* fix(velodyne_decoders): after  the last commit, point clouds weren't reset correctly. fixed  in this  commit

* fix(velodyne_tests): make tests compile with the new decoder API

* fix(velodyne_examples): make examples compile with new decoder API

* feat(velodyne_hw_interface): synchronous, null- and thread-safe HTTP requests

* fix(velodyne_launch_all_hw.xml): refactor to single-node

* fix(velodyne): make hw interface wrapper work with new hw  interface API

* fix(velodyne): implement correct locking behavior in hw monitor wrapper

* fix(nebula_tests): re-cut scans in existing reference data correctly (360deg). has been ~372deg before (#150)

* chore(velodyne_scan_decoder.hpp): explicitly initialize some fields for clarity

* feat(nebula_ros): add velodyne json schema

Signed-off-by: amadeuszsz <[email protected]>

* chore(nebula_ros): update config

Signed-off-by: amadeuszsz <[email protected]>

* chore(nebula_ros): update schema

Signed-off-by: amadeuszsz <[email protected]>

* chore(nebula): add json schema workflow

Signed-off-by: amadeuszsz <[email protected]>

* ci(nebula): use of autoware actions repo

Signed-off-by: amadeuszsz <[email protected]>

* chore(nebula_ros): add schema composition

Signed-off-by: amadeuszsz <[email protected]>

* chore(pre-commit): autoupdate hooks

* fix(hesai_decoder): print config instead of config address

* refactor(nebula_ros): combine Hesai wrapper nodes into one

This is step one of the single node refactoring of Nebula.
In this step, only the three Hesai wrapper nodes were combined into one, and no optimizations have been done that are made possible by this refactoring.

The next step is to do those optimizations (e.g. get rid of unnecessary pointcloud copying).

* refactor: remove pandarScan pub/sub, decode one packet at a time

* reword later

* temporary progress

* fix(hesai_ros_wrapper): remove changes wrongly merged during rebase

* fix(hesai_ros_wrapper): increase packet buffering to stop internal packet loss

* feat(nebula_common): add instrumentation tools

* feat(hesai_ros_wrapper): instrument code on critical path

* disable instrumentation

* feat(hesai): move received buffer into ros message instead of copy

* feat(hesai_ros_wrapper: add thread-safe queue between udp receiver and decoder, decode in separate thread

* feat(nebula_common): more instrumentation tools

* fix: update link to transport_drivers fork

* update GitHub PR view

* refactor(mt_queue): make variables more readable

* perf(hesai_ros_wrapper): update queue capacity to alleviate packet drops on ECU

* chore(hesai_ros_wrapper): remove unused pub/sub

* refactor(hesai_ros_wrapper): clean up control flow, member variables

* fix(hesai_hw_interface): add error handling

* check PTC command error codes, throw exception if necessary
* perform size checks before parsing responses
* emit errors on too-large payload size

* fix(hesai_hw_monitor_ros_wrapper): fixed wrong range given for S/N copy

* fix(hesai): print uint8, uint16 as numbers

* feat(hesai_ros_wrapper): publish/subscribe to legacy pandar_packets on demand

* change launch file back to single-threaded container

* attempt to make queue contention less bad

* chore(hesai_ros_wrapper): reduce logging output

* feat(hesai_ros_wrapper): print warning when connected to HW and receiving /pandar_packets

* feat(nebula_launch.py): throw error when trying to launch Hesai sensor and refer to hesai_launch_all_hw.xml

* refactor(nebula_ros): split single wrapper file into 3 sub-wrappers

* chore: update cspell ignore

* chore(velodyne_calibration_decoder): fix spelling

* chore(nebula_common): remove debug code

* chore(velodyne_calibration_decoder): fix spelling

* fix(hesai_decoder):  initialize last_phase to prevent empty pointcloud published on startup

* fix(nebula_tests): make Hesai tests compile again

* fix(nebula_examples): make Hesai examples compile again

* chore(velodyne_calibration_decoder): fix spelling once and for all

* fix(nebula_examples): fix test failure (remove ament_lint_common)

* fix(hesai_hw_interface): add missing check for PTC error, make error type more readable

* refactor(hesai): re-introduce parameter update mechanism

* feat(hesai_ros): add watchdog timer for pointcloud output

* fix(hesai): change to possibly more accurate high_resolution_clock

* fix(hesai): fix crash on QT128

* refactor(hesai_hw_interface): refactor repeated error handling code

* fix(hesai_launch_all_hw.xml): set valid RPM when AT128 is selected

* refactor(hesai_decoder): remove redundant arguments for correction/calibration

* refactor(nebula_ros): move mt_queue to common

* chore(nebula_examples): change output rosbag format to NebulaPackets, clean up code

* chore(hesai/decoder_wrapper): clarify watchdog behavior in decoder

* chore(hesai/hw_monitor_wrapper): fix typo in diagnostics name

* chore(hesai_ros_decoder_test): fix unclear naming in console output

* chore(nebula_ros): add schema composition for robosense

Signed-off-by: amadeuszsz <[email protected]>

* chore: run pre-commit and implement suggested fixes (not including copyright yet)

* fix(expected.hpp): revert explicit constructors

* chore: remove erroneously added node_modules folder

* chore(gitconfig): exclude node_modules from git

* fix(nebula_tests): missing serialization format

Signed-off-by: amadeuszsz <[email protected]>

---------

Signed-off-by: amadeuszsz <[email protected]>
Signed-off-by: amadeuszsz <[email protected]>
Co-authored-by: Max SCHMELLER <[email protected]>
Co-authored-by: Abraham Monrroy Cano <[email protected]>
Co-authored-by: Maximilian Schmeller <[email protected]>
Co-authored-by: Max Schmeller <[email protected]>
mojomex added a commit to mojomex/nebula that referenced this pull request May 23, 2024
mojomex added a commit to mojomex/nebula that referenced this pull request May 23, 2024
mojomex added a commit that referenced this pull request May 24, 2024
…#148)

* refactor(velodyne)!: unify wrapper nodes. Currently WIP but compiling

* fix(velodyne_decoders): after  the last commit, point clouds weren't reset correctly. fixed  in this  commit

* fix(velodyne_tests): make tests compile with the new decoder API

* fix(velodyne_examples): make examples compile with new decoder API

* feat(velodyne_hw_interface): synchronous, null- and thread-safe HTTP requests

* fix(velodyne_launch_all_hw.xml): refactor to single-node

* fix(velodyne): make hw interface wrapper work with new hw  interface API

* fix(velodyne): implement correct locking behavior in hw monitor wrapper

* chore(velodyne_scan_decoder.hpp): explicitly initialize some fields for clarity

* fix(nebula_tests): re-cut scans in existing reference data correctly (360deg). has been ~372deg before (#150)

* fix: fix mistakes made during rebase

* chore(velodyne_ros_wrapper): fix PandarScan mention

* chore(velodyne): apply pre-commit (except copyright)

* chore(velodyne_scan_decoder): moved magic numbers to constants
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