Skip to content

Downsampling the same trajectory over and over again #972

@smk-robotics

Description

@smk-robotics

There is a huge waste of resources in the autoware_motion_utils calcLateralOffset method. There is a removeOverlapPoints method which is called hundred of times for the same reference trajectory over and over again. Downsampling and removing overlapping point should be done before calling the calcLateralOffset method (or calcYawDeviation).

I suggest to remove removeOverlapPoints call from:

  1. autoware::motion_utils::calcLateralOffset
  2. autoware::motion_utils::calcYawDeviation
  3. autoware::motion_utils::calcLongitudinalOffsetToSegment

Downsampling and overlapping suppose to be called only once before calling these methods inside for loops. Example: calc_max_lateral_distance method in the control_validator_package.

Link to the line I suggest to remove to save resources and speed up the process:

const auto overlap_removed_points = removeOverlapPoints(points, 0);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions