16.4.4
Description
Abstract
Introduced a device to speed up processing of scenario_simulator_v2
Background
There were some cases where unnecessary lane matching was being performed or where necessary lane matching might not be performed, so these were corrected.
Details
- Reserve 128 elements while initializing
entities_unorderd_map.- Changed the default reserve area of std::unoderd_map to 128 because it was found that the default reserve area of std::unoderd_map is 13 and the rehash process is run in some scenarios.
- Delay curventure calculation
- The curvature calculation is very computationally expensive, but it is executed inside the constructor, so the process was running every time.
- Interpolate waypoints before follow trajectory.
- The waypoint of FollowTrajcetroyAction was conventionally set to RoutePlanner without route completion, so there was a possibility that an unintended route was passed to RoutePlanner.
- Even when a waypoint section is a short distance, lane matching processing is performed more than necessary, reducing calculation efficiency.
enable_perfoption for cpp_mock_scenarios
References
tier4/sim_evaluation_tools#524 (comment)
Destructive Changes
N/A
Known Limitations
If the interval of waypoints of FollowTrajectoryAction is more than 1 m, the computational cost may conversely increase.
However, it was determined that it is unavoidable that there are cases where the calculation cost increases due to the possibility of passing waypoints that are not appropriate for RoutePlanner in the conventional implementation.