Example #1
0
        public XyDataSeries <double, double> GetRobotLidarPoints(LidarDataType type)
        {
            var dataSeries = new XyDataSeries <double, double>();

            if (LidarRawPoints == null)
            {
                return(dataSeries);
            }

            IEnumerable <double> listX = new List <double>();
            IEnumerable <double> listY = new List <double>();

            switch (type)
            {
            case LidarDataType.RawData:
                listX = LidarRawPoints.Select(e => e.Pt.X);
                listY = LidarRawPoints.Select(e => e.Pt.Y);
                break;
            }

            if (listX.Count() == listY.Count())
            {
                dataSeries.AcceptsUnsortedData = true;
                dataSeries.Append(listX, listY);
            }
            return(dataSeries);
        }
Example #2
0
        public void SetLidarMap(List <PointDExtended> lidarMap, LidarDataType dataType)
        {
            switch (dataType)
            {
            case LidarDataType.RawData:
                this.LidarRawPoints = lidarMap;
                break;

            case LidarDataType.ProcessedData1:
                this.LidarProcessedPoints[0] = lidarMap;
                break;

            default:
                break;
            }
        }
Example #3
0
        public void SetLidarMap(List <PointDExtended> lidarMap, LidarDataType type)
        {
            switch (type)
            {
            case LidarDataType.RawData:
                this.lidarMap = lidarMap;
                break;

            case LidarDataType.ProcessedData1:
                this.lidarProcessedMaps[0] = lidarMap;
                break;

            case LidarDataType.ProcessedData2:
                this.lidarProcessedMaps[1] = lidarMap;
                break;

            case LidarDataType.ProcessedData3:
                this.lidarProcessedMaps[2] = lidarMap;
                break;
            }
        }
Example #4
0
        //public XyDataSeries<double, double> GetRobotLidarPoints()
        //{
        //    var dataSeries = new XyDataSeries<double, double>();
        //    if (lidarMap == null)
        //        return dataSeries;


        //    //lock (lidarMap)
        //    {
        //        var listX = lidarMap.Select(e => e.X);
        //        var listY = lidarMap.Select(e => e.Y);

        //        if (listX.Count() == listY.Count())
        //        {
        //            dataSeries.AcceptsUnsortedData = true;
        //            dataSeries.Append(listX, listY);
        //        }
        //    }
        //    return dataSeries;
        //}

        public XyDataSeries <double, double> GetRobotLidarPoints(LidarDataType type)
        {
            var dataSeries = new XyDataSeries <double, double>();

            if (lidarMap == null)
            {
                return(dataSeries);
            }

            IEnumerable <double> listX = new List <double>();
            IEnumerable <double> listY = new List <double>();

            switch (type)
            {
            case LidarDataType.RawData:
                listX = lidarMap.Select(e => e.Pt.X);
                listY = lidarMap.Select(e => e.Pt.Y);
                break;
                //case LidarDataType.ProcessedData1:
                //    listX = lidarProcessedMaps[0].Select(e => e.Pt.X);
                //    listY = lidarProcessedMaps[0].Select(e => e.Pt.Y);
                //    break;
                //case LidarDataType.ProcessedData2:
                //    listX = lidarProcessedMaps[1].Select(e => e.Pt.X);
                //    listY = lidarProcessedMaps[1].Select(e => e.Pt.Y);
                //    break;
                //case LidarDataType.ProcessedData3:
                //    listX = lidarProcessedMaps[2].Select(e => e.Pt.X);
                //    listY = lidarProcessedMaps[2].Select(e => e.Pt.Y);
                //    break;
            }

            if (listX.Count() == listY.Count())
            {
                dataSeries.AcceptsUnsortedData = true;
                dataSeries.Append(listX, listY);
            }
            return(dataSeries);
        }