26 #include "modules/planning/proto/planning.pb.h" 30 #include "modules/common/proto/pnc_point.pb.h" 57 const planning::ADCTrajectory *planning_published_trajectory);
68 unsigned int seq_num() {
return seq_num_; }
94 const double y)
const;
120 const double v,
const common::PathPoint &matched_point,
121 double *ptr_s,
double *ptr_s_dot,
double *ptr_d,
122 double *ptr_d_dot)
const;
141 const double rear_to_com_distance,
142 const common::PathPoint &path_point)
const;
151 common::PathPoint FindMinDistancePoint(
const common::TrajectoryPoint &p0,
152 const common::TrajectoryPoint &p1,
153 const double x,
const double y)
const;
155 std::vector<common::TrajectoryPoint> trajectory_points_;
157 double header_time_ = 0.0;
158 unsigned int seq_num_ = 0;
common::TrajectoryPoint QueryNearestPointByPosition(const double x, const double y) const
query a point of trajectory that its position is closest to the given position.
~TrajectoryAnalyzer()=default
destructor
void TrajectoryTransformToCOM(const double rear_to_com_distance)
Transform the current trajectory points to the center of mass(COM) of the vehicle, given the distance from rear wheels to the center of mass.
common::TrajectoryPoint QueryNearestPointByAbsoluteTime(const double t) const
query a point of trajectory that its absolute time is closest to the give time.
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
void ToTrajectoryFrame(const double x, const double y, const double theta, const double v, const common::PathPoint &matched_point, double *ptr_s, double *ptr_s_dot, double *ptr_d, double *ptr_d_dot) const
convert a position with theta and speed to trajectory frame,
common::PathPoint QueryMatchedPathPoint(const double x, const double y) const
query a point on trajectory that its position is closest to the given position.
TrajectoryAnalyzer()=default
constructor
Implements a class of 2-dimensional vectors.
Definition: vec2d.h:42
process point query and conversion related to trajectory
Definition: trajectory_analyzer.h:44
The class of Box2d. Here, the x/y axes are respectively Forward/Left, as opposed to what happens in e...
common::TrajectoryPoint QueryNearestPointByRelativeTime(const double t) const
query a point of trajectory that its relative time is closest to the give time. The time is relative ...
unsigned int seq_num()
get sequence number of the trajectory
Definition: trajectory_analyzer.h:68
const std::vector< common::TrajectoryPoint > & trajectory_points() const
get all points of the trajectory
common::math::Vec2d ComputeCOMPosition(const double rear_to_com_distance, const common::PathPoint &path_point) const
Compute the position of center of mass(COM) of the vehicle, given the distance from rear wheels to th...