Skip to content

Commit

Permalink
Merge branch 'feature/default_matching_distance' of https://github.co…
Browse files Browse the repository at this point in the history
…m/tier4/scenario_simulator_v2 into feature/default_matching_distance
  • Loading branch information
hakuturu583 committed Feb 21, 2024
2 parents e687bec + 2e82078 commit 586ad81
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ class EntityManager
FORWARD_TO_ENTITY(getCurrentAccel, const);
FORWARD_TO_ENTITY(getCurrentAction, const);
FORWARD_TO_ENTITY(getCurrentTwist, const);
FORWARD_TO_ENTITY(getDefaultMatchingDistanceForLaneletPoseCalculation, const);
FORWARD_TO_ENTITY(getDistanceToLaneBound, );
FORWARD_TO_ENTITY(getDistanceToLaneBound, const);
FORWARD_TO_ENTITY(getDistanceToLeftLaneBound, );
Expand Down Expand Up @@ -526,7 +525,19 @@ class EntityManager
pose, parameters.bounding_box,
entity_status.type.type == traffic_simulator_msgs::msg::EntityType::PEDESTRIAN ||
entity_status.type.type == traffic_simulator_msgs::msg::EntityType::MISC_OBJECT,
getDefaultMatchingDistanceForLaneletPoseCalculation(name));
[](const auto & parameters) {
if constexpr (std::is_same_v<
std::decay_t<Parameters>,
traffic_simulator_msgs::msg::VehicleParameters>) {
return std::max(
parameters.axles.front_axle.track_width,
parameters.axles.rear_axle.track_width) *
0.5 +
1.0;
} else {
return parameters.bounding_box.dimensions.y * 0.5 + 1.0;
}
}(parameters));
lanelet_pose) {
entity_status.lanelet_pose = *lanelet_pose;
entity_status.lanelet_pose_valid = true;
Expand Down

0 comments on commit 586ad81

Please sign in to comment.