Apollo 10.0
自动驾驶开放平台
|
class RouteSegments 更多...
#include <route_segments.h>
Public 成员函数 | |
RouteSegments ()=default | |
The default constructor. | |
routing::ChangeLaneType | NextAction () const |
Get the next change lane action need to take by the vehicle, if the vehicle is on this RouteSegments. | |
void | SetNextAction (routing::ChangeLaneType action) |
routing::ChangeLaneType | PreviousAction () const |
Get the previous change lane action need to take by the vehicle to reach current segment, if the vehicle is not on this RouteSegments. | |
void | SetPreviousAction (routing::ChangeLaneType action) |
bool | CanExit () const |
Whether the passage region that generate this route segment can lead to another passage region in route. | |
void | SetCanExit (bool can_exit) |
bool | GetProjection (const common::PointENU &point_enu, common::SLPoint *sl_point, LaneWaypoint *waypoint) const |
Project a point to this route segment. | |
bool | GetProjection (const common::math::Vec2d &point, common::SLPoint *sl_point, LaneWaypoint *waypoint) const |
bool | GetProjection (const common::math::Vec2d &point, const double heading, common::SLPoint *sl_point, LaneWaypoint *waypoint) const |
bool | GetWaypoint (const double s, LaneWaypoint *waypoint) const |
bool | CanDriveFrom (const LaneWaypoint &waypoint) const |
Check whether the map allows a vehicle can reach current RouteSegment from a point on a lane (LaneWaypoint). | |
const LaneWaypoint & | RouteEndWaypoint () const |
void | SetRouteEndWaypoint (const LaneWaypoint &waypoint) |
bool | Stitch (const RouteSegments &other) |
Stitch current route segments with the other route segment. | |
bool | Shrink (const common::math::Vec2d &point, const double look_backward, const double look_forward) |
bool | Shrink (const double s, const double look_backward, const double look_forward) |
bool | Shrink (const double s, const LaneWaypoint &waypoint, const double look_backward, const double look_forward) |
bool | IsOnSegment () const |
void | SetIsOnSegment (bool on_segment) |
bool | IsNeighborSegment () const |
void | SetIsNeighborSegment (bool is_neighbor) |
void | SetId (const std::string &id) |
const std::string & | Id () const |
LaneWaypoint | FirstWaypoint () const |
Get the first waypoint from the lane segments. | |
LaneWaypoint | LastWaypoint () const |
Get the last waypoint from the lane segments. | |
bool | IsWaypointOnSegment (const LaneWaypoint &waypoint) const |
Check if a waypoint is on segment | |
bool | IsConnectedSegment (const RouteSegments &other) const |
Check if we can reach the other segment from current segment just by following lane. | |
bool | StopForDestination () const |
void | SetStopForDestination (bool stop_for_destination) |
void | SetProperties (const RouteSegments &other) |
Copy the properties of other segments to current one | |
std::string | DebugString () |
静态 Public 成员函数 | |
static bool | WithinLaneSegment (const LaneSegment &lane_segment, const LaneWaypoint &waypoint) |
static bool | WithinLaneSegment (const LaneSegment &lane_segment, const routing::LaneWaypoint &waypoint) |
static bool | WithinLaneSegment (const routing::LaneSegment &lane_segment, const LaneWaypoint &waypoint) |
static bool | WithinLaneSegment (const routing::LaneSegment &lane_segment, const routing::LaneWaypoint &waypoint) |
static double | Length (const RouteSegments &segments) |
class RouteSegments
This class is a representation of the Passage type in routing.proto. It is extended from a passage region, but keeps some properties of the passage, such as the last end LaneWaypoint of the original passage region (route_end_waypoint), whether the passage can lead to another passage in routing (can_exit_). This class contains the original data that can be used to generate hdmap::Path.
在文件 route_segments.h 第 48 行定义.
|
default |
The default constructor.
bool apollo::hdmap::RouteSegments::CanDriveFrom | ( | const LaneWaypoint & | waypoint | ) | const |
Check whether the map allows a vehicle can reach current RouteSegment from a point on a lane (LaneWaypoint).
waypoint | the start waypoint |
在文件 route_segments.cc 第 358 行定义.
bool apollo::hdmap::RouteSegments::CanExit | ( | ) | const |
Whether the passage region that generate this route segment can lead to another passage region in route.
在文件 route_segments.cc 第 41 行定义.
|
inline |
在文件 route_segments.h 第 204 行定义.
LaneWaypoint apollo::hdmap::RouteSegments::FirstWaypoint | ( | ) | const |
Get the first waypoint from the lane segments.
在文件 route_segments.cc 第 125 行定义.
bool apollo::hdmap::RouteSegments::GetProjection | ( | const common::math::Vec2d & | point, |
common::SLPoint * | sl_point, | ||
LaneWaypoint * | waypoint | ||
) | const |
在文件 route_segments.cc 第 266 行定义.
bool apollo::hdmap::RouteSegments::GetProjection | ( | const common::math::Vec2d & | point, |
const double | heading, | ||
common::SLPoint * | sl_point, | ||
LaneWaypoint * | waypoint | ||
) | const |
在文件 route_segments.cc 第 299 行定义.
bool apollo::hdmap::RouteSegments::GetProjection | ( | const common::PointENU & | point_enu, |
common::SLPoint * | sl_point, | ||
LaneWaypoint * | waypoint | ||
) | const |
Project a point to this route segment.
point_enu | a map point, or point, which is a Vec2d point |
s | return the longitudinal s relative to the route segment. |
l | return the lateral distance relative to the route segment. |
waypoint | return the LaneWaypoint, which has lane and lane_s on the route segment. |
在文件 route_segments.cc 第 151 行定义.
bool apollo::hdmap::RouteSegments::GetWaypoint | ( | const double | s, |
LaneWaypoint * | waypoint | ||
) | const |
在文件 route_segments.cc 第 244 行定义.
const std::string & apollo::hdmap::RouteSegments::Id | ( | ) | const |
在文件 route_segments.cc 第 35 行定义.
bool apollo::hdmap::RouteSegments::IsConnectedSegment | ( | const RouteSegments & | other | ) | const |
Check if we can reach the other segment from current segment just by following lane.
other | Another route segment |
在文件 route_segments.cc 第 157 行定义.
bool apollo::hdmap::RouteSegments::IsNeighborSegment | ( | ) | const |
在文件 route_segments.cc 第 115 行定义.
bool apollo::hdmap::RouteSegments::IsOnSegment | ( | ) | const |
在文件 route_segments.cc 第 109 行定义.
bool apollo::hdmap::RouteSegments::IsWaypointOnSegment | ( | const LaneWaypoint & | waypoint | ) | const |
Check if a waypoint is on segment
在文件 route_segments.cc 第 349 行定义.
LaneWaypoint apollo::hdmap::RouteSegments::LastWaypoint | ( | ) | const |
Get the last waypoint from the lane segments.
在文件 route_segments.cc 第 129 行定义.
|
static |
在文件 route_segments.cc 第 143 行定义.
routing::ChangeLaneType apollo::hdmap::RouteSegments::NextAction | ( | ) | const |
Get the next change lane action need to take by the vehicle, if the vehicle is on this RouteSegments.
— If the vehicle does not need to change lane, then change_lane_type == routing::FORWARD; — If the vehicle need to change to left lane according to routing, then change_lane_type_ == routing::LEFT; — If the vehicle need to change to right lane according to routing, then change_lane_type_ == routing::RIGHT;
在文件 route_segments.cc 第 345 行定义.
routing::ChangeLaneType apollo::hdmap::RouteSegments::PreviousAction | ( | ) | const |
Get the previous change lane action need to take by the vehicle to reach current segment, if the vehicle is not on this RouteSegments.
If the vehicle is already on this segment, or does not need to change lane to reach this segment, then change_lane_type = routing::FORWARD; If the vehicle need to change to left to reach this segment, then change_lane_type_ = routing::LEFT; If the vehicle need to change to right to reach this segment, then change_lane_type_ = routing::RIGHT;
在文件 route_segments.cc 第 337 行定义.
const LaneWaypoint & apollo::hdmap::RouteSegments::RouteEndWaypoint | ( | ) | const |
在文件 route_segments.cc 第 105 行定义.
void apollo::hdmap::RouteSegments::SetCanExit | ( | bool | can_exit | ) |
在文件 route_segments.cc 第 39 行定义.
void apollo::hdmap::RouteSegments::SetId | ( | const std::string & | id | ) |
在文件 route_segments.cc 第 37 行定义.
void apollo::hdmap::RouteSegments::SetIsNeighborSegment | ( | bool | is_neighbor | ) |
在文件 route_segments.cc 第 117 行定义.
void apollo::hdmap::RouteSegments::SetIsOnSegment | ( | bool | on_segment | ) |
在文件 route_segments.cc 第 111 行定义.
void apollo::hdmap::RouteSegments::SetNextAction | ( | routing::ChangeLaneType | action | ) |
在文件 route_segments.cc 第 341 行定义.
void apollo::hdmap::RouteSegments::SetPreviousAction | ( | routing::ChangeLaneType | action | ) |
在文件 route_segments.cc 第 333 行定义.
void apollo::hdmap::RouteSegments::SetProperties | ( | const RouteSegments & | other | ) |
Copy the properties of other segments to current one
在文件 route_segments.cc 第 133 行定义.
void apollo::hdmap::RouteSegments::SetRouteEndWaypoint | ( | const LaneWaypoint & | waypoint | ) |
在文件 route_segments.cc 第 121 行定义.
void apollo::hdmap::RouteSegments::SetStopForDestination | ( | bool | stop_for_destination | ) |
在文件 route_segments.cc 第 45 行定义.
bool apollo::hdmap::RouteSegments::Shrink | ( | const common::math::Vec2d & | point, |
const double | look_backward, | ||
const double | look_forward | ||
) |
在文件 route_segments.cc 第 176 行定义.
bool apollo::hdmap::RouteSegments::Shrink | ( | const double | s, |
const double | look_backward, | ||
const double | look_forward | ||
) |
在文件 route_segments.cc 第 188 行定义.
bool apollo::hdmap::RouteSegments::Shrink | ( | const double | s, |
const LaneWaypoint & | waypoint, | ||
const double | look_backward, | ||
const double | look_forward | ||
) |
在文件 route_segments.cc 第 197 行定义.
bool apollo::hdmap::RouteSegments::Stitch | ( | const RouteSegments & | other | ) |
Stitch current route segments with the other route segment.
Example 1 this: |-----—A--—x--—B---—| other: |--—B---—x-----—C----—| Result: |-----—A--—x--—B---—x-----—C----—| In the above example, A-B is current route segments, and B-C is the other route segments. We update current route segments to A-B-C.
Example 2 this: |--—A---—x-----—B----—| other: |-----—C--—x--—A---—| Result: |-----—C--—x--—A---—x-----—B----—| In the above example, A-B is current route segments, and C-A is the other route segments. We update current route segments to C-A-B
在文件 route_segments.cc 第 78 行定义.
bool apollo::hdmap::RouteSegments::StopForDestination | ( | ) | const |
在文件 route_segments.cc 第 43 行定义.
|
static |
在文件 route_segments.cc 第 49 行定义.
|
static |
在文件 route_segments.cc 第 57 行定义.
|
static |
在文件 route_segments.cc 第 64 行定义.
|
static |
在文件 route_segments.cc 第 71 行定义.