27#include <unordered_map>
30#include "modules/common/vehicle_state/proto/vehicle_state.pb.h"
32#include "modules/common_msgs/localization_msgs/localization.pb.h"
33#include "modules/common_msgs/planning_msgs/navigation.pb.h"
34#include "modules/map/relative_map/proto/relative_map_config.pb.h"
35#include "modules/common_msgs/perception_msgs/perception_obstacle.pb.h"
42namespace relative_map {
62typedef std::tuple<int, double, double, std::shared_ptr<NavigationPath>>
127 default_left_width_ = left_width;
128 default_right_width_ = right_width;
145 perception_obstacles_ = perception_obstacles;
155 const auto& current_navi_path = std::get<3>(current_navi_path_tuple_);
156 if (current_navi_path) {
157 return *current_navi_path;
171 MapMsg*
const map_msg)
const;
184 double EvaluateCubicPolynomial(
const double c0,
const double c1,
185 const double c2,
const double c3,
186 const double x)
const;
197 double GetKappa(
const double c1,
const double c2,
const double c3,
211 const int start_index,
const double s,
212 int*
const matched_index);
233 bool ConvertNavigationLineToPath(
const int line_index,
243 void MergeNavigationLineAndLaneMarker(
const int line_index,
256 const int line_index);
265 void UpdateStitchIndexInfo();
280 std::list<NaviPathTuple> navigation_path_list_;
286 double perceived_left_width_ = -1.0;
289 double perceived_right_width_ = -1.0;
292 double default_left_width_ = 1.875;
293 double default_right_width_ = 1.875;
297 std::unordered_map<int, ProjIndexPair> last_project_index_map_;
301 std::unordered_map<int, StitchIndexPair> stitch_index_map_;
The class of vehicle state.
NavigationLane generates a real-time relative map based on navagation lines.
void SetConfig(const NavigationLaneConfig &config)
Set the configuration information required by the NavigationLane.
bool GeneratePath()
Generate a suitable path (i.e.
void SetDefaultWidth(const double left_width, const double right_width)
Set the default width of a lane.
void UpdatePerception(const perception::PerceptionObstacles &perception_obstacles)
Update perceived lane line information.
void SetVehicleStateProvider(common::VehicleStateProvider *vehicle_state_provider)
NavigationPath Path() const
Get the generated lane segment where the vehicle is currently located.
bool CreateMap(const MapGenerationParam &map_config, MapMsg *const map_msg) const
Generate a real-time relative map of approximately 250 m in length based on several navigation line s...
void UpdateNavigationInfo(const NavigationInfo &navigation_info)
Update navigation line information.
~NavigationLane()=default
std::tuple< int, double, double, std::shared_ptr< NavigationPath > > NaviPathTuple
std::pair< int, double > ProjIndexPair
std::pair< int, int > StitchIndexPair