24
24
#include < autoware_planning_msgs/msg/path.hpp>
25
25
#include < autoware_planning_msgs/msg/trajectory.hpp>
26
26
27
+ #include < optional>
27
28
#include < string>
28
29
#include < vector>
29
30
@@ -64,15 +65,18 @@ std::optional<Trajectory<autoware_planning_msgs::msg::PathPoint>> from_autoware_
64
65
std::optional<Trajectory<autoware_planning_msgs::msg::TrajectoryPoint>> from_autoware_msgs (
65
66
const autoware_planning_msgs::msg::Trajectory & path, const bool use_akima = false );
66
67
68
+ namespace detail
69
+ {
70
+
67
71
/* *
68
72
* @brief if the input point size is less than 3, add 3rd point, otherwise return as is
69
73
* @param[in] inputs vector of point whose size is at least 2
70
74
* @return the vector of points whose size is at least 3, or error reason
71
75
* @note {x, y, z}/orientation are interpolated by Linear/SphericalLinear. other properties as
72
76
* interpolated by StairStep
73
77
*/
74
- tl::expected<std::vector<autoware_internal_planning_msgs::msg::PathPointWithLaneId>, std::string >
75
- populate3 ( const std::vector<autoware_internal_planning_msgs::msg::PathPointWithLaneId > & inputs);
78
+ template < typename PointType >
79
+ tl::expected< std::vector<PointType>, std::string> populate3 ( const std::vector<PointType > & inputs);
76
80
77
81
/* *
78
82
* @brief if the input point size is less than 4, add 4th point, otherwise return as is
@@ -82,8 +86,8 @@ populate3(const std::vector<autoware_internal_planning_msgs::msg::PathPointWithL
82
86
* @note {x, y, z}/orientation are interpolated by Linear/SphericalLinear. other properties as
83
87
* interpolated by StairStep
84
88
*/
85
- tl::expected<std::vector<autoware_internal_planning_msgs::msg::PathPointWithLaneId>, std::string >
86
- populate4 ( const std::vector<autoware_internal_planning_msgs::msg::PathPointWithLaneId > & inputs);
89
+ template < typename PointType >
90
+ tl::expected< std::vector<PointType>, std::string> populate4 ( const std::vector<PointType > & inputs);
87
91
88
92
/* *
89
93
* @brief if the input point size is less than 5, add 5th point, otherwise return as is
@@ -96,6 +100,7 @@ std::vector<autoware_internal_planning_msgs::msg::PathPointWithLaneId> populate5
96
100
const std::vector<autoware_internal_planning_msgs::msg::PathPointWithLaneId> & inputs,
97
101
const size_t minimum_number_of_points);
98
102
*/
103
+ } // namespace detail
99
104
100
105
} // namespace autoware::trajectory
101
106
#endif // AUTOWARE__TRAJECTORY__UTILS__AUTOWARE_MSGS_HPP_
0 commit comments