Apollo 11.0
自动驾驶开放平台
apollo::planning::PncMapBase类 参考abstract

#include <pnc_map_base.h>

类 apollo::planning::PncMapBase 继承关系图:
apollo::planning::PncMapBase 的协作图:

Public 成员函数

virtual ~PncMapBase ()=default
 
virtual bool CanProcess (const planning::PlanningCommand &command) const =0
 
virtual bool UpdatePlanningCommand (const planning::PlanningCommand &command)
 
virtual bool GetRouteSegments (const common::VehicleState &vehicle_state, std::list< apollo::hdmap::RouteSegments > *const route_segments)=0
 use heuristic forward length and backward length
 
bool IsNewPlanningCommand (const planning::PlanningCommand &command) const
 Check if the routing is the same as existing one in Map
 
virtual bool ExtendSegments (const apollo::hdmap::RouteSegments &segments, double start_s, double end_s, apollo::hdmap::RouteSegments *const truncated_segments) const =0
 
virtual std::vector< routing::LaneWaypoint > FutureRouteWaypoints () const =0
 
virtual void GetEndLaneWayPoint (std::shared_ptr< routing::LaneWaypoint > &end_point) const =0
 Get the end point of PlanningCommand.
 
virtual hdmap::LaneInfoConstPtr GetLaneById (const hdmap::Id &id) const =0
 Get the Lane with the given id.
 
virtual bool GetNearestPointFromRouting (const common::VehicleState &state, apollo::hdmap::LaneWaypoint *waypoint) const =0
 
virtual double GetDistanceToDestination () const =0
 
virtual apollo::hdmap::LaneWaypoint GetAdcWaypoint () const =0
 

静态 Public 成员函数

static double LookForwardDistance (const double velocity)
 
static bool IsNewPlanningCommand (const planning::PlanningCommand &prev_command, const planning::PlanningCommand &new_command)
 

Protected 属性

planning::PlanningCommand last_command_
 
apollo::hdmap::LaneWaypoint adc_waypoint_
 The waypoint of the autonomous driving car
 

详细描述

在文件 pnc_map_base.h 第 47 行定义.

构造及析构函数说明

◆ ~PncMapBase()

virtual apollo::planning::PncMapBase::~PncMapBase ( )
virtualdefault

成员函数说明

◆ CanProcess()

virtual bool apollo::planning::PncMapBase::CanProcess ( const planning::PlanningCommand &  command) const
pure virtual

◆ ExtendSegments()

virtual bool apollo::planning::PncMapBase::ExtendSegments ( const apollo::hdmap::RouteSegments &  segments,
double  start_s,
double  end_s,
apollo::hdmap::RouteSegments *const  truncated_segments 
) const
pure virtual

◆ FutureRouteWaypoints()

virtual std::vector< routing::LaneWaypoint > apollo::planning::PncMapBase::FutureRouteWaypoints ( ) const
pure virtual

◆ GetAdcWaypoint()

virtual apollo::hdmap::LaneWaypoint apollo::planning::PncMapBase::GetAdcWaypoint ( ) const
pure virtual

◆ GetDistanceToDestination()

virtual double apollo::planning::PncMapBase::GetDistanceToDestination ( ) const
pure virtual

◆ GetEndLaneWayPoint()

virtual void apollo::planning::PncMapBase::GetEndLaneWayPoint ( std::shared_ptr< routing::LaneWaypoint > &  end_point) const
pure virtual

Get the end point of PlanningCommand.

参数
end_pointThe end point of PlanningCommand.

在 apollo::planning::LaneFollowMap 内被实现.

◆ GetLaneById()

virtual hdmap::LaneInfoConstPtr apollo::planning::PncMapBase::GetLaneById ( const hdmap::Id &  id) const
pure virtual

Get the Lane with the given id.

参数
idThe id of the lane.

在 apollo::planning::LaneFollowMap 内被实现.

◆ GetNearestPointFromRouting()

virtual bool apollo::planning::PncMapBase::GetNearestPointFromRouting ( const common::VehicleState &  state,
apollo::hdmap::LaneWaypoint *  waypoint 
) const
pure virtual

◆ GetRouteSegments()

virtual bool apollo::planning::PncMapBase::GetRouteSegments ( const common::VehicleState &  vehicle_state,
std::list< apollo::hdmap::RouteSegments > *const  route_segments 
)
pure virtual

use heuristic forward length and backward length

在 apollo::planning::LaneFollowMap 内被实现.

◆ IsNewPlanningCommand() [1/2]

bool apollo::planning::PncMapBase::IsNewPlanningCommand ( const planning::PlanningCommand &  command) const

Check if the routing is the same as existing one in Map

在文件 pnc_map_base.cc 第 57 行定义.

58 {
59 return IsNewPlanningCommand(last_command_, command);
60}
planning::PlanningCommand last_command_
bool IsNewPlanningCommand(const planning::PlanningCommand &command) const
Check if the routing is the same as existing one in Map

◆ IsNewPlanningCommand() [2/2]

bool apollo::planning::PncMapBase::IsNewPlanningCommand ( const planning::PlanningCommand &  prev_command,
const planning::PlanningCommand &  new_command 
)
static

在文件 pnc_map_base.cc 第 62 行定义.

64 {
65 if (!new_command.is_motion_command()) {
66 return false;
67 }
68 return !common::util::IsProtoEqual(prev_command, new_command);
69}
bool IsProtoEqual(const ProtoA &a, const ProtoB &b)
Definition util.h:47

◆ LookForwardDistance()

double apollo::planning::PncMapBase::LookForwardDistance ( const double  velocity)
static

在文件 pnc_map_base.cc 第 49 行定义.

49 {
50 auto forward_distance = velocity * FLAGS_look_forward_time_sec;
51
52 return forward_distance > FLAGS_look_forward_short_distance
53 ? FLAGS_look_forward_long_distance
54 : FLAGS_look_forward_short_distance;
55}

◆ UpdatePlanningCommand()

bool apollo::planning::PncMapBase::UpdatePlanningCommand ( const planning::PlanningCommand &  command)
virtual

被 apollo::planning::LaneFollowMap 重载.

在文件 pnc_map_base.cc 第 39 行定义.

40 {
41 if (!IsValid(command)) {
42 AERROR << "Input command is not valid!" << command.DebugString();
43 return false;
44 }
45 last_command_ = command;
46 return true;
47}
#define AERROR
Definition log.h:44

类成员变量说明

◆ adc_waypoint_

apollo::hdmap::LaneWaypoint apollo::planning::PncMapBase::adc_waypoint_
protected

The waypoint of the autonomous driving car

在文件 pnc_map_base.h 第 102 行定义.

◆ last_command_

planning::PlanningCommand apollo::planning::PncMapBase::last_command_
protected

在文件 pnc_map_base.h 第 98 行定义.


该类的文档由以下文件生成: