scenario_simulator_v2 C++ API
lane_change.hpp
Go to the documentation of this file.
1 // Copyright 2024 TIER IV, Inc. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef TRAFFIC_SIMULATOR__LANELET_WRAPPER_LANE_CHANGE_HPP_
16 #define TRAFFIC_SIMULATOR__LANELET_WRAPPER_LANE_CHANGE_HPP_
17 
20 
21 namespace traffic_simulator
22 {
23 namespace lanelet_wrapper
24 {
25 namespace lane_change
26 {
31 
32 auto canChangeLane(
33  const lanelet::Id from_lanelet_id, const lanelet::Id to_lanelet_id,
34  const RoutingGraphType type = RoutingConfiguration().routing_graph_type) -> bool;
35 
37  const lanelet::Id lanelet_id, const Direction & direction,
38  const RoutingGraphType type = RoutingConfiguration().routing_graph_type)
39  -> std::optional<lanelet::Id>;
40 
42  const lanelet::Id lanelet_id, const Direction & direction, const std::uint8_t shift,
43  const RoutingGraphType type = RoutingConfiguration().routing_graph_type)
44  -> std::optional<lanelet::Id>;
45 
46 auto countLaneChanges(
47  const lanelet::Id & from_lanelet_id, const lanelet::Id & to_lanelet_id,
48  const RoutingConfiguration & routing_configuration = RoutingConfiguration())
49  -> std::optional<std::pair<int, int>>;
50 
51 // Trajectory
53  const Pose & from_pose, const LaneletPose & to_lanelet_pose,
54  const TrajectoryShape & trajectory_shape, const double tangent_vector_size) -> Curve;
55 
57  const LaneletPose & from_lanelet_pose, const Parameter & lane_change_parameter)
58  -> std::optional<std::pair<Curve, double>>;
59 
61  const Pose & from_pose, const Parameter & lane_change_parameter,
62  const double maximum_curvature_threshold, const double target_trajectory_length,
63  const double forward_distance_threshold) -> std::optional<std::pair<Curve, double>>;
64 } // namespace lane_change
65 } // namespace lanelet_wrapper
66 } // namespace traffic_simulator
67 #endif // TRAFFIC_SIMULATOR__LANELET_WRAPPER_LANE_CHANGE_HPP_
TrajectoryShape
Definition: lane_change.hpp:31
Direction
Definition: lane_change.hpp:29
traffic_simulator::lane_change::Constraint Constraint
Definition: lane_change.hpp:29
auto laneChangeTrajectory(const Pose &from_pose, const LaneletPose &to_lanelet_pose, const TrajectoryShape &trajectory_shape, const double tangent_vector_size) -> Curve
Definition: lane_change.cpp:107
auto laneChangeableLaneletId(const lanelet::Id lanelet_id, const Direction &direction, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> std::optional< lanelet::Id >
Definition: lane_change.cpp:40
auto canChangeLane(const lanelet::Id from_lanelet_id, const lanelet::Id to_lanelet_id, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> bool
Definition: lane_change.cpp:31
traffic_simulator::lane_change::Parameter Parameter
Definition: lane_change.hpp:27
auto countLaneChanges(const lanelet::Id &from_lanelet_id, const lanelet::Id &to_lanelet_id, const RoutingConfiguration &routing_configuration=RoutingConfiguration()) -> std::optional< std::pair< int, int >>
Definition: lane_change.cpp:75
geometry_msgs::msg::Pose Pose
Definition: lanelet_wrapper.hpp:70
traffic_simulator_msgs::msg::LaneletPose LaneletPose
Definition: lanelet_wrapper.hpp:68
math::geometry::HermiteCurve Curve
Definition: lanelet_wrapper.hpp:66
RoutingGraphType
Definition: routing_graph_type.hpp:24
Definition: api.hpp:32
Definition: routing_configuration.hpp:24
Definition: lane_change.hpp:44
parameters for behavior plugin
Definition: lane_change.hpp:75