Skip to content

17.0.0

Choose a tag to compare

@github-actions github-actions released this 06 Aug 06:31

Description

Abstract

This is the partial PR of the HdMapUtils refactor (PR 2/6) ( #1478 )

Details

Replace usage of HdMapUtils::getLongitudinalDistance with non-member function lanelet_wrapper::distance::longitudinalDistance

References

Destructive Changes

The hdmap_utils_ptr parameter has been removed from the following functions:

  • traffic_simulator::distance::longitudinalDistance
  • traffic_simulator::distance::boundingBoxLaneLongitudinalDistance
  • traffic_simulator::pose::relativeLaneletPose
  • traffic_simulator::pose::boundingBoxRelativeLaneletPose
  • traffic_simulator::follow_trajectory::makeUpdatedStatus

Migration Guide

Before (Old Signature)

auto longitudinalDistance(
  const CanonicalizedLaneletPose & from, const CanonicalizedLaneletPose & to,
  bool include_adjacent_lanelet, bool include_opposite_direction,
  const traffic_simulator::RoutingConfiguration & routing_configuration,
  const std::shared_ptr<hdmap_utils::HdMapUtils> & hdmap_utils_ptr) -> std::optional<double>;

auto boundingBoxLaneLongitudinalDistance(
  const CanonicalizedLaneletPose & from,
  const traffic_simulator_msgs::msg::BoundingBox & from_bounding_box,
  const CanonicalizedLaneletPose & to,
  const traffic_simulator_msgs::msg::BoundingBox & to_bounding_box, bool include_adjacent_lanelet,
  bool include_opposite_direction,
  const traffic_simulator::RoutingConfiguration & routing_configuration,
  const std::shared_ptr<hdmap_utils::HdMapUtils> & hdmap_utils_ptr) -> std::optional<double>;

auto relativeLaneletPose(
  const CanonicalizedLaneletPose & from, const CanonicalizedLaneletPose & to,
  const RoutingConfiguration & routing_configuration,
  const std::shared_ptr<hdmap_utils::HdMapUtils> & hdmap_utils_ptr) -> LaneletPose;

auto boundingBoxRelativeLaneletPose(
  const CanonicalizedLaneletPose & from,
  const traffic_simulator_msgs::msg::BoundingBox & from_bounding_box,
  const CanonicalizedLaneletPose & to,
  const traffic_simulator_msgs::msg::BoundingBox & to_bounding_box,
  const RoutingConfiguration & routing_configuration,
  const std::shared_ptr<hdmap_utils::HdMapUtils> & hdmap_utils_ptr) -> LaneletPose;

auto makeUpdatedStatus(
  const traffic_simulator_msgs::msg::EntityStatus &,
  traffic_simulator_msgs::msg::PolylineTrajectory &,
  const traffic_simulator_msgs::msg::BehaviorParameter &,
  const std::shared_ptr<hdmap_utils::HdMapUtils> &, double, double,
  std::optional<double> target_speed = std::nullopt) -> std::optional<EntityStatus>;

After (New Signature)

auto longitudinalDistance(
  const CanonicalizedLaneletPose & from, const CanonicalizedLaneletPose & to,
  const bool include_adjacent_lanelet, const bool include_opposite_direction,
  const RoutingConfiguration & routing_configuration) -> std::optional<double>;

auto boundingBoxLaneLongitudinalDistance(
  const CanonicalizedLaneletPose & from,
  const traffic_simulator_msgs::msg::BoundingBox & from_bounding_box,
  const CanonicalizedLaneletPose & to,
  const traffic_simulator_msgs::msg::BoundingBox & to_bounding_box,
  const bool include_adjacent_lanelet, const bool include_opposite_direction,
  const RoutingConfiguration & routing_configuration) -> std::optional<double>;

auto relativeLaneletPose(
  const CanonicalizedLaneletPose & from, const CanonicalizedLaneletPose & to,
  const RoutingConfiguration & routing_configuration) -> LaneletPose;

auto boundingBoxRelativeLaneletPose(
  const CanonicalizedLaneletPose & from,
  const traffic_simulator_msgs::msg::BoundingBox & from_bounding_box,
  const CanonicalizedLaneletPose & to,
  const traffic_simulator_msgs::msg::BoundingBox & to_bounding_box,
  const RoutingConfiguration & routing_configuration) -> LaneletPose;

auto makeUpdatedStatus(
  const traffic_simulator_msgs::msg::EntityStatus &,
  traffic_simulator_msgs::msg::PolylineTrajectory &,
  const traffic_simulator_msgs::msg::BehaviorParameter &, double, double,
  std::optional<double> target_speed = std::nullopt) -> std::optional<EntityStatus>;

const std::shared_ptr<hdmap_utils::HdMapUtils> & hdmap_utils_ptr parameter has been removed.
Remove the hdmap_utils_ptr argument from function call

Known Limitations

None.

Related Issues