RJD-1509 Filter nearest NPCs to calculate distance#48
Open
gmajrobotec wants to merge 2 commits intoRJD-1509/methods_optimizationfrom
Open
RJD-1509 Filter nearest NPCs to calculate distance#48gmajrobotec wants to merge 2 commits intoRJD-1509/methods_optimizationfrom
gmajrobotec wants to merge 2 commits intoRJD-1509/methods_optimizationfrom
Conversation
dmoszynski
reviewed
Apr 7, 2025
dmoszynski
reviewed
Apr 7, 2025
dmoszynski
reviewed
Apr 7, 2025
dmoszynski
reviewed
Apr 7, 2025
dmoszynski
reviewed
Apr 7, 2025
dmoszynski
reviewed
Apr 7, 2025
simulation/traffic_simulator/include/traffic_simulator/behavior/behavior_plugin_base.hpp
Outdated
Show resolved
Hide resolved
dmoszynski
reviewed
Apr 7, 2025
simulation/traffic_simulator/include/traffic_simulator/entity/entity_manager.hpp
Outdated
Show resolved
Hide resolved
dmoszynski
reviewed
Apr 7, 2025
dmoszynski
reviewed
Apr 7, 2025
dmoszynski
reviewed
Apr 7, 2025
3adec57 to
ef231da
Compare
ef231da to
5b6c046
Compare
dmoszynski
reviewed
Apr 10, 2025
| } | ||
|
|
||
| for (const auto & [euclidean_distance, name] : euclidean_distances) { | ||
| const auto quat = math::geometry::getRotation( |
dmoszynski
reviewed
Apr 10, 2025
| return false; | ||
| } | ||
|
|
||
| void EntityBase::setDistances(const std::shared_ptr<EuclideanDistancesMap> & distances) |
dmoszynski
reviewed
Apr 10, 2025
| distances.emplace_back(distance.value()); | ||
| if (euclidean_distances_map != nullptr) { | ||
| std::map<double, std::string> euclidean_distances; | ||
| double stopDistance = calculateStopDistance(behavior_parameter.dynamic_constraints); |
dmoszynski
reviewed
Apr 10, 2025
| if ( | ||
| std::fabs(math::geometry::convertQuaternionToEulerAngle(quat).z) <= | ||
| boost::math::constants::half_pi<double>()) { | ||
| const auto distance = getDistanceToTargetEntity(spline, other_entity_status.at(name)); |
dmoszynski
reviewed
Apr 10, 2025
| entities.emplace_back(name); | ||
| distances.emplace_back(distance.value()); | ||
| if (euclidean_distances_map != nullptr) { | ||
| std::map<double, std::string> euclidean_distances; |
c58be5a to
dc503c6
Compare
5b6c046 to
49a9ef5
Compare
dmoszynski
reviewed
Apr 10, 2025
| distances.emplace_back(distance.value()); | ||
| if (euclidean_distances_map != nullptr) { | ||
| std::map<double, std::string> local_euclidean_distances_map; | ||
| const double stopDistance = calculateStopDistance(behavior_parameter.dynamic_constraints); |
49a9ef5 to
4beca20
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements optimization of calculating actual distance in ActionNode::getDistanceToTargetEntity only for nearest NPCs.
Abstract
ActionNode::getDistanceToTargetEntity should calculate boundingBoxLaneLongitudinalDistance only for nearest NPC. This is done based on DistancesMap containg shortest distance between mapPose of NPCs.
Details
Destructive Changes
--
Known Limitations
--
References
RJD-1509