-
Notifications
You must be signed in to change notification settings - Fork 64
HdMapUtils refactor (PR 3/6) - use lanelet_wrapper wide in behavior_tree_plugin, remove unused methods #1479
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
Draft
dmoszynski
wants to merge
81
commits into
ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance
Choose a base branch
from
ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
base: ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…raffic_lights_base for architecture changes
…apper in behavior_tree_plugin
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nd traffic_source
…): remove unused hdmap_utils
…ep-2' of https://github.com/tier4/scenario_simulator_v2 into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…let-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…let-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…let-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…ange and use it in splineDistanceToBoundingBox - as on master
…let-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
…let-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
…let-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…et-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…et-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…flictingPose Signed-off-by: Mateusz Palczuk <[email protected]>
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…et-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
…et-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
Signed-off-by: Mateusz Palczuk <[email protected]>
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…et-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
…et-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…et-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
Failure optional scenariosNote This is an experimental check and does not block merging the pull-request. scenario failed: execution_time_test <failure type="SimulationFailure" message="CustomCommandAction typed "exitFailure" was triggered by the named Conditions {"update time checker", "avoid startup"}: {"update time checker": Is the /simulation/interpreter/execution_time/update (= 0.006347000000000000211053396981) is greaterThan 0.005?}, {"avoid startup": Is the simulation time (= 9.900000000000005684341886080801) is greaterThan 1.000000000000000000000000000000?}" /> |
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…nto ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2
…et-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
…et-wrapper-distance' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-step-2 Signed-off-by: Mateusz Palczuk <[email protected]>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
Abstract
This is the third PR of 6 related to the
HdMapUtils
refactor (for the first one, see #1472 and for the second see #1478).For a full overview of changes that all 6 PRs will introduce, please see the Abstract of the first PR.
Background
The changes focus on using
lanelet_wrapper
namespace in thebehavior_tree_plugin
.Thus, the
HdMapUtils
is not used inbehavior_tree_plugin
after the changes.As a result of changes mentioned above, some
behavior_tree_plugin
functions have been moved to other parts oftraffic_simulator
, sometimes with slight modifications of the functionality.In other cases, functions inside
behavior_tree_plugin
have been refactored to better suit their purpose.Additionally, the member functions of
HdMapUtils
that after these changes became unused were removed.Details
The main goal of this PR was to extend the usage of
lanelet_wrapper
namespace and remove usage ofHdMapUtils
class inbehavior_tree_plugin
.This was also a good opportunity to slightly tidy up the
behavior_tree_plugin
.Minor changes were introduced - for example in the
ActionNode
class, where generic member functions were extracted as free functions in utils namespaces.Examples of changes made to the
behavior_tree_plugin
Before
scenario_simulator_v2/simulation/behavior_tree_plugin/src/vehicle/follow_lane_sequence/follow_front_entity_action.cpp
Line 80 in fc56adc
After
scenario_simulator_v2/simulation/behavior_tree_plugin/src/vehicle/follow_lane_sequence/follow_front_entity_action.cpp
Line 80 in e6a8a68
Before
scenario_simulator_v2/simulation/behavior_tree_plugin/src/vehicle/follow_lane_sequence/follow_front_entity_action.cpp
Line 100 in fc56adc
After
scenario_simulator_v2/simulation/behavior_tree_plugin/src/vehicle/follow_lane_sequence/follow_front_entity_action.cpp
Lines 104 to 108 in e6a8a68
Before
scenario_simulator_v2/simulation/behavior_tree_plugin/src/vehicle/follow_lane_sequence/stop_at_crossing_entity_action.cpp
Line 114 in fc56adc
After
scenario_simulator_v2/simulation/behavior_tree_plugin/src/vehicle/follow_lane_sequence/stop_at_crossing_entity_action.cpp
Lines 114 to 116 in e6a8a68
Examples of changes made to the functions
Function
ActionNode::getDistanceToTrafficLightStopLine
scenario_simulator_v2/simulation/behavior_tree_plugin/include/behavior_tree_plugin/action_node.hpp
Lines 61 to 63 in fc56adc
Has been converted to
TrafficLightsBase::getDistanceToActiveTrafficLightStopLine
scenario_simulator_v2/simulation/traffic_simulator/include/traffic_simulator/traffic_lights/traffic_lights_base.hpp
Lines 74 to 76 in e6a8a68
Function
ActionNode::getRightOfWayEntities
scenario_simulator_v2/simulation/behavior_tree_plugin/include/behavior_tree_plugin/action_node.hpp
Lines 65 to 66 in fc56adc
Has been converted to
ActionNode::isNeedToRightOfWay
which does not return statuses, but only information whether there are any right of way entities.This change could have been made, because the original implementation was only ever used to check whether the returned vector was empty.
scenario_simulator_v2/simulation/behavior_tree_plugin/include/behavior_tree_plugin/action_node.hpp
Line 53 in e6a8a68
List of all functions changed
Apart from changes in the
behavior_tree_plugin
implementation, which are not covered in great detail here, some changes to free functions and member functions inscenario_simulator_v2
were introduced.These changes have a potential to break some code that is developed in parallel and should be stated explicitly - that is why the table below has been prepared. It lists all changes made to function signatures, whether the functions have been renamed, removed, added or their functionality was altered.
Most functions marked as removed were removed because they were no longer used anywhere - they were fully replaced by other functions from utils namespaces.
CatmullRomSplineInterface::getAltitudeRange
CatmullRomSubspline::getAltitudeRange
CatmullRomSpline::getAltitudeRange
ActionNode::foundConflictingEntity
ActionNode::getDistanceToTrafficLightStopLine
TrafficLightsBase::getDistanceToActiveTrafficLightStopLine
ActionNode::getRightOfWayEntities
ActionNode::isNeedToRightOfWay
with changes so that no entities are returnedActionNode::getDistanceToConflictingEntity
distance::distanceToNearestConflictingPose
with changes so that all statuses have to be passedActionNode::getOtherEntitiesCanonicalizedEntityStatuses
distance::distanceToNearestConflictingPose
ActionNode::getDistanceToTargetEntity
distance::splineDistanceToBoundingBox
ActionNode::getDistanceToTargetEntityOnCrosswalk
ActionNode::getConflictingEntityStatus
ActionNode::getConflictingEntityStatusOnCrossWalk
ActionNode::getConflictingEntityStatusOnLane
ActionNode::isOtherEntityAtConsideredAltitude
HdMapUtils::clipTrajectoryFromLaneletIds
HdMapUtils::filterLaneletIds
lanelet_wrapper::lanelet_map::filterLaneletIds
HdMapUtils::getClosestLaneletId
HdMapUtils::getCollisionPointInLaneCoordinate
HdMapUtils::getConflictingCrosswalkIds
lanelet_wrapper::lanelet_map::conflictingCrosswalkIds
HdMapUtils::getConflictingLaneIds
lanelet_wrapper::lanelet_map::conflictingLaneIds
HdMapUtils::getAltitude
HdMapUtils::getLaneletPolygon
HdMapUtils::getRightOfWayLaneletIds
HdMapUtils::getRightOfWayLaneletIds
HdMapUtils::isInIntersection
lanelet_wrapper::lanelet_map::isInIntersection
HdMapUtils::isInLanelet
HdMapUtils::toMapBin
lanelet_wrapper::LaneletLoader::convertMapToBin
HdMapUtils::toMapPoints
HdMapUtils::absoluteHull
HdMapUtils::calcEuclidDist
HdMapUtils::filterLanelets
HdMapUtils::mapCallback
HdMapUtils::toPoint2d
HdMapUtils::toPolygon
lanelet_wrapper::pose::isAltitudeMatching
lanelet_wrapper::pose::isAltitudeWithinThreshold
lanelet_wrapper::pose::isAltitudeWithinRange
ScenarioSimulator::getOrigin
HdMapUtils::getNearbyLaneletIds
References
INTERNAL LINK
Destructive Changes
For code developped in parallel please see List of all functions changed.
Known Limitations