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:
- autoware::motion_utils::calcLateralOffset
- autoware::motion_utils::calcYawDeviation
- 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); |
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:
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:
autoware_core/common/autoware_motion_utils/include/autoware/motion_utils/trajectory/trajectory.hpp
Line 659 in 9fe7ac2