27#include "modules/common/vehicle_state/proto/vehicle_state.pb.h"
28#include "modules/common_msgs/basic_msgs/pnc_point.pb.h"
29#include "modules/common_msgs/routing_msgs/routing.pb.h"
144 const double look_forward);
146 bool Shrink(
const double s,
const double look_backward,
147 const double look_forward);
150 const double look_backward,
const double look_forward);
158 void SetId(
const std::string &
id);
159 const std::string &
Id()
const;
205 std::stringstream ss;
206 for (
auto iter = begin(); iter != end(); ++iter) {
207 ss << iter->DebugString() <<
";";
218 bool can_exit_ =
false;
223 bool is_on_segment_ =
false;
229 bool is_neighbor_ =
false;
242 bool stop_for_destination_ =
false;
Implements a class of 2-dimensional vectors.
void SetId(const std::string &id)
bool StopForDestination() const
bool GetWaypoint(const double s, LaneWaypoint *waypoint) const
bool Stitch(const RouteSegments &other)
Stitch current route segments with the other route segment.
void SetStopForDestination(bool stop_for_destination)
bool Shrink(const common::math::Vec2d &point, const double look_backward, const double look_forward)
bool IsWaypointOnSegment(const LaneWaypoint &waypoint) const
Check if a waypoint is on segment
RouteSegments()=default
The default constructor.
const std::string & Id() const
LaneWaypoint LastWaypoint() const
Get the last waypoint from the lane segments.
bool IsConnectedSegment(const RouteSegments &other) const
Check if we can reach the other segment from current segment just by following lane.
void SetIsNeighborSegment(bool is_neighbor)
void SetProperties(const RouteSegments &other)
Copy the properties of other segments to current one
LaneWaypoint FirstWaypoint() const
Get the first waypoint from the lane segments.
bool CanExit() const
Whether the passage region that generate this route segment can lead to another passage region in rou...
void SetRouteEndWaypoint(const LaneWaypoint &waypoint)
void SetIsOnSegment(bool on_segment)
static bool WithinLaneSegment(const LaneSegment &lane_segment, const LaneWaypoint &waypoint)
bool CanDriveFrom(const LaneWaypoint &waypoint) const
Check whether the map allows a vehicle can reach current RouteSegment from a point on a lane (LaneWay...
void SetPreviousAction(routing::ChangeLaneType action)
routing::ChangeLaneType PreviousAction() const
Get the previous change lane action need to take by the vehicle to reach current segment,...
static double Length(const RouteSegments &segments)
const LaneWaypoint & RouteEndWaypoint() const
std::string DebugString()
routing::ChangeLaneType NextAction() const
Get the next change lane action need to take by the vehicle, if the vehicle is on this RouteSegments.
bool GetProjection(const common::PointENU &point_enu, common::SLPoint *sl_point, LaneWaypoint *waypoint) const
Project a point to this route segment.
void SetCanExit(bool can_exit)
bool IsNeighborSegment() const
void SetNextAction(routing::ChangeLaneType action)