#ifndef LANE_CHANGE_PLANNER_H
#define LANE_CHANGE_PLANNER_H

#include "base_planner.h"

namespace iv{
namespace decition{
    class LaneChangePlanner : public BasePlanner{
    public:
        LaneChangePlanner();
        ~LaneChangePlanner();


        /**
         * @brief iv::decition::LaneChangePlanner::getPath
         * 采用的车道变换的局部路径生成方法。计算原始地图路径偏移offset距离之后的路径。
         *
         * @param now_gps_ins          实时gps信息
         * @param gpsMapLine           地图数据点
         * @param PathPoint            地图路线中距离车辆位置最近的一个点的序号
         * @param offset               在车辆避障中,地图源路线所在车道 与 即将去往的车道 之间的距离差值。可以为负值。
         * @param lidarGridPtr         激光雷达信息网格
         * @return                     返回一条车辆坐标系下的路径
         */
        std::vector<iv::Point2D> getPath(GPS_INS now_gps_ins, const std::vector<GPSData>& gpsMapLine, int PathPoint, double offset, iv::LidarGridPtr lidarGridPtr);

        bool checkAvoidEnable(const std::vector<double>& obsDisVector, int roadAim);

    private:
        std::vector<iv::Point2D> getGpsTrace(iv::GPS_INS now_gps_ins, const std::vector<GPSData>& gpsMapLine, int PathPoint);
        std::vector<iv::Point2D> getGpsTraceOffset(const std::vector<Point2D>& gpsTrace, double offset);

    };
}
}


#endif // LANE_CHANGE_PLANNER_H