scenario_simulator_v2 C++ API
pose.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__UTILS__POSE_HPP_
16 #define TRAFFIC_SIMULATOR__UTILS__POSE_HPP_
17 
19 
20 namespace traffic_simulator
21 {
22 inline namespace pose
23 {
24 // Constructors
25 auto quietNaNPose() -> geometry_msgs::msg::Pose;
26 
28 
29 // Conversions
30 auto canonicalize(
31  const LaneletPose & lanelet_pose,
32  const std::shared_ptr<hdmap_utils::HdMapUtils> & hdmap_utils_ptr) -> CanonicalizedLaneletPose;
33 
34 auto toMapPose(const CanonicalizedLaneletPose & lanelet_pose) -> const geometry_msgs::msg::Pose;
35 
36 auto toLaneletPose(
37  const geometry_msgs::msg::Pose & map_pose, bool include_crosswalk,
38  const std::shared_ptr<hdmap_utils::HdMapUtils> & hdmap_utils_ptr)
39  -> std::optional<CanonicalizedLaneletPose>;
40 
41 // Relative msg::Pose
42 auto relativePose(const geometry_msgs::msg::Pose & from, const geometry_msgs::msg::Pose & to)
43  -> std::optional<geometry_msgs::msg::Pose>;
44 
45 auto relativePose(const geometry_msgs::msg::Pose & from, const CanonicalizedLaneletPose & to)
46  -> std::optional<geometry_msgs::msg::Pose>;
47 
48 auto relativePose(const CanonicalizedLaneletPose & from, const geometry_msgs::msg::Pose & to)
49  -> std::optional<geometry_msgs::msg::Pose>;
50 
52  const geometry_msgs::msg::Pose & from,
53  const traffic_simulator_msgs::msg::BoundingBox & from_bounding_box,
54  const geometry_msgs::msg::Pose & to,
55  const traffic_simulator_msgs::msg::BoundingBox & to_bounding_box)
56  -> std::optional<geometry_msgs::msg::Pose>;
57 
58 // Relative LaneletPose
60  const CanonicalizedLaneletPose & from, const CanonicalizedLaneletPose & to,
61  bool allow_lane_change, const std::shared_ptr<hdmap_utils::HdMapUtils> & hdmap_utils_ptr)
63 
65  const CanonicalizedLaneletPose & from,
66  const traffic_simulator_msgs::msg::BoundingBox & from_bounding_box,
67  const CanonicalizedLaneletPose & to,
68  const traffic_simulator_msgs::msg::BoundingBox & to_bounding_box, bool allow_lane_change,
69  const std::shared_ptr<hdmap_utils::HdMapUtils> & hdmap_utils_ptr)
71 } // namespace pose
72 } // namespace traffic_simulator
73 #endif // TRAFFIC_SIMULATOR__UTILS__POSE_HPP_
Definition: lanelet_pose.hpp:27
auto toMapPose(const CanonicalizedLaneletPose &lanelet_pose) -> const geometry_msgs::msg::Pose
Definition: pose.cpp:53
auto quietNaNPose() -> geometry_msgs::msg::Pose
Definition: pose.cpp:24
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, bool allow_lane_change, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> traffic_simulator::LaneletPose
Definition: pose.cpp:136
auto quietNaNLaneletPose() -> traffic_simulator::LaneletPose
Definition: pose.cpp:34
auto boundingBoxRelativePose(const geometry_msgs::msg::Pose &from, const traffic_simulator_msgs::msg::BoundingBox &from_bounding_box, const geometry_msgs::msg::Pose &to, const traffic_simulator_msgs::msg::BoundingBox &to_bounding_box) -> std::optional< geometry_msgs::msg::Pose >
Definition: pose.cpp:93
auto relativePose(const geometry_msgs::msg::Pose &from, const geometry_msgs::msg::Pose &to) -> std::optional< geometry_msgs::msg::Pose >
Definition: pose.cpp:71
auto toLaneletPose(const geometry_msgs::msg::Pose &map_pose, bool include_crosswalk, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> std::optional< CanonicalizedLaneletPose >
Definition: pose.cpp:58
auto canonicalize(const LaneletPose &lanelet_pose, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> CanonicalizedLaneletPose
Definition: pose.cpp:46
auto relativeLaneletPose(const CanonicalizedLaneletPose &from, const CanonicalizedLaneletPose &to, bool allow_lane_change, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> traffic_simulator::LaneletPose
Definition: pose.cpp:113
Definition: api.hpp:48
traffic_simulator_msgs::msg::LaneletPose LaneletPose
Definition: lanelet_pose.hpp:22