You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[View in Drawio]({{ drawio("/common/autoware_trajectory/images/overview/interpolators.drawio.svg") }})
22
19
23
-
Given `bases` and `values`, the builder internally executes interpolation and return the result in the form of `expected<T, E>`. If successful, it contains the interpolator object.
20
+
The builder internally executes interpolation and return the result in the form of `expected<T, E>`. If successful, it contains the interpolator object.
In such cases the result `expected` object contains `InterpolationFailure` type with an error message like **"base size 3 is less than minimum required 4"**.
40
37
38
+
### Trajectory class
39
+
40
+
The _Trajectory_ class provides mathematical continuous representation and object oriented interface for discrete array of following point types
41
+
42
+
-[x]`geometry_msgs::Point`
43
+
-[x]`geometry_msgs::Pose`
44
+
-[x]`autoware_planning_msgs::PathPoint`
45
+
-[x]`autoware_planning_msgs::PathPointWithLaneId`
46
+
-[x]`autoware_planning_msgs::TrajectoryPoint`
47
+
-[ ]`lanelet::ConstPoint3d`
48
+
49
+
by interpolating the given _underlying_ points. Once built, arbitrary point on the curve is continuously parametrized by a single `s` coordinate.
[View in Drawio]({{ drawio("/common/autoware_trajectory/images/overview/trajectory.drawio.svg") }})
59
+
41
60
## Nomenclature
42
61
43
62
This section introduces strict definition of several words used in this package to clarify the description of API and help the developers understand and grasp the geometric meaning of algorithms.
[View in Drawio]({{ drawio("/common/autoware_trajectory/images/nomenclature/trajectory_hierarchy.drawio.svg") }})
114
134
115
-
```cpp
116
-
#include"autoware/trajectory/path_point.hpp"
117
-
118
-
...
135
+
Each derived class in the diagram inherits the methods of all of its descending subclasses. For example, all of the classes have the methods like `length()`, `curvature()` in common.
119
136
120
-
std::vector<autoware_planning_msgs::msg::PathPoint> points = ... // Load points from somewhere
| <ul><li>`Trajectory<Point>`</li></ul> |`base_arange(const double step)`| return vector of `s` values starting from `start`, with the interval of `step`, including `end`. Thus the return value has at least the size of 2. ||
144
+
||`length()`| return the total `arc length` of the trajectory. |<br>[View in Drawio]({{ drawio("/common/autoware_trajectory/images/nomenclature/curve.drawio.svg") }})<br>`length()` is $5.0$ because it computes the sum of the length of dotted lines. |
145
+
||`azimuth(const double s)`| return the tangent angle at given `s` coordinate using `std::atan2`. |<br>[View in Drawio]({{ drawio("/common/autoware_trajectory/images/overview/trajectory.drawio.svg") }}) |
146
+
||`curvature(const double s)`| return the `curvature` at given `s` coordinate. | See above |
0 commit comments