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_decoders_hesai) unify pointcloud order and filtering of all sensors #56

Closed
wants to merge 11 commits into from

Commits on Aug 21, 2023

  1. Fix XT32 always checking points against 1st block

    The XT32 decoder, in dual return mode, employs a check whether the
    two returned points are identical. The way the point for comparison was
    indexed was erroneous and ended up always being the 1st or 2nd block of
    the packet, although there are a total of 8 blocks.
    mojomex committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    fe2905f View commit details
    Browse the repository at this point in the history
  2. Include dual_return_distance_threshold when printing HesaiSensorConfig

    This field was missing earlier, leading to avoidable troubleshooting.
    mojomex committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    24b756a View commit details
    Browse the repository at this point in the history
  3. Fix dual return check ignoring some modes in XT32 decoder

    The XT32 decoder did not classify First+Last, First+Strongest as dual
    return in its check.
    
    Added the return mode constants to the header and to the check
    mojomex committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    2957e88 View commit details
    Browse the repository at this point in the history
  4. Change 40P output order from firing time to logical order

    The Pandar40P decoder decoded points in firing time order. Since all
    other sensors use logical ordering (by ascending index), Pandar40P is
    adapted to this convention.
    mojomex committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    0a4541a View commit details
    Browse the repository at this point in the history
  5. Increase Pandar40P distance accuracy

    LASER_RETURN_DISTANCE was defined as float, is now double. This brings
    Pandar40P distance accuracy up to the level of all other sensors,
    which calculate distance on the fly in higher precision.
    mojomex committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    d19bfc4 View commit details
    Browse the repository at this point in the history
  6. Adapt XT32M output order and scan completion check

    Other sensors output in `return_group > channel > block` order, the XT32M
    decoder was outputting `block > channel`.
    
    The XT32M scan completion check involved timing checks. These are
    currently unused and complicate the code.
    Further, they prevent a generic implementation.
    Thus, the check has been streamlined.
    mojomex committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    836b9c5 View commit details
    Browse the repository at this point in the history
  7. Implement/fix distance checks in Hesai decoders

    Fixes tier4#49, fixes tier4#48.
    
    Multiple decoders (QT64, QT128, 64, XT32, 128) had distance checks using
    comparison operators different to the other sensors
    (e.g. `>` instead of `>=`).
    
    Pandar40P had no min_range / max_range checks.
    
    AT128, XT32, XT32M had no dual_return_threshold checks.
    
    Identical points were not removed when
    dual_return_distance_threshold = 0.
    
    All of these checks are corrected/added with this commit.
    mojomex committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    47dcb4e View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2023

  1. Remove imprecise XT32M sin/cos tables

    The sin/cos azimuth lookup tables did not include the channel-wise
    azimuth offset in their calculation, leading to up to 0.166 deg of
    azimuth error in the output X/Y values.
    
    The tables have been replaced with sinf/cosf calls.
    mojomex committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    7934b7d View commit details
    Browse the repository at this point in the history
  2. Add return_distance_threshold = 0.1 to unit tests

    Unit tests for Hesai decoders were not setting
    `dual_return_distance_threshold` at all, causing it to be `0`
    implicitly. This caused a large number of duplicate points to be
    output by the decoders.
    
    The distance is set to `0.1 [m]` for all Hesai sensors now, which is the
    default in the Hesai launch file.
    mojomex committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    16d90c9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a0f5422 View commit details
    Browse the repository at this point in the history
  4. Update dictionary

    mojomex committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    4ee86a5 View commit details
    Browse the repository at this point in the history