#pragma once #include #include // 定义地图相关信息结构体 // 定义坐标点结构体 struct Point { // 构造函数 Point(double x, double y, double h) : pos_x(x), pos_y(y), heading(h) {}; double pos_x; double pos_y; double heading; // 大地坐标系,弧度 }; // 定义交通标牌信息结构体 struct SignalInfo { int sign_id; int sign_type; int sign_type1; int sign_ref_link; std::vector sign_coords; }; // 定义人行横道信息结构体 struct CrosswalkInfo { int cross_id; std::vector cross_coords; }; // 定义交通信号灯信息结构体 struct TrafficlightInfo { int trafficlight_id; int trafficlight_ref_link; std::vector trafficlight_ref_lane; int trafficlight_type; // int trafficlight_head; std::vector trafficlight_head; std::vector trafficlight_coords; }; // 定义路口信息结构体 struct InterInfo { int inter_id; std::vector inter_ref_link; int inter_type; int inter_in_shape; std::vector inter_coords; }; // 定义车道停止线信息结构体 struct StoplineInfo { int stopline_id; int stopline_ref_link; std::vector stopline_ref_lane; int stopline_color; int stopline_type; std::vector stopline_coords; }; // 定义道路信息结构体 struct RoadInfo { int link_id; int link_fc; int link_type; int link_speed_max; int link_speed_min; int link_direction; int link_lanenum; std::vector link_coords; }; // 定义车道信息结构体 struct LaneInfo { int lane_id; double lane_length; int lane_type; double lane_width; int lane_turn; int lane_ref_link; int lane_speed_max; int lane_speed_min; std::vector lane_coords; }; // 定义车道箭头信息结构体 struct ArrowInfo { int arrow_id; int arrow_ref_lane; std::vector arrow_direction; std::vector arrow_coords; }; // 获取地图相关信息函数声明 // 初始化函数 bool engineInit(const std::string &folder_path); // 2024.10.30 // 根据位置获取指定范围内所有路口信息 std::vector getInters(const std::string &intercsvPath, const Point &point, double distance); // 根据位置获取指定范围内所有人行横道信息 std::vector getCrosswalks(const std::string &crosscsvPath, const Point &point, double distance); // 根据位置获取前方指定范围内所有交通信号灯信息 std::vector getForwardTrafficlight(const std::string &lightcsvPath, const Point &point, double distance); // 根据位置获取所在道路信息 std::vector getLink(const std::string &linkcsvPath, const Point &point); // 根据位置获取所在车道信息 std::vector getLane(const std::string &lanecsvPath, const Point &point); // 根据位置获取指定范围内所有交通标牌信息 std::vector getSignals(const std::string &signcsvPath, const Point &point, double distance); // 根据位置获取指定范围内车道停止线信息; std::vector getStopline(const std::string &stoplinecsvPath, const Point &point, double distance); // 根据位置获取指定范围内车道箭头信息 std::vector getArrow(const std::string &arrowcsvPath, const Point &point, double distance);