From 4c638e5cae37ef55db33aec7b364cb53ae5b9696 Mon Sep 17 00:00:00 2001 From: dobaybalazs Date: Wed, 2 Mar 2022 17:40:35 +0100 Subject: [PATCH] refactor: Minor change in code #1 --- src/blind_spots.cpp | 4 ++-- src/lidar_segmentation.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/blind_spots.cpp b/src/blind_spots.cpp index 422d64c..43c8482 100644 --- a/src/blind_spots.cpp +++ b/src/blind_spots.cpp @@ -16,7 +16,7 @@ void Detector::blindSpots(std::vector>& array3D,int index,i if (params::blind_spots) { - for (int i = 0; i < indexArray[1]; i++) + for (i = 0; i < indexArray[1]; i++) { if(array3D[1][i].isCurbPoint==2) { @@ -65,7 +65,7 @@ void Detector::blindSpots(std::vector>& array3D,int index,i arcDistance = ((maxDistance[0] * M_PI) / 180) * params::beamZone; /*0°-tól 360° - beamZone-ig.*/ - for (int i = 0; i <= 360 - params::beamZone; i++) + for (i = 0; i <= 360 - params::beamZone; i++) { blindSpot = 0; diff --git a/src/lidar_segmentation.cpp b/src/lidar_segmentation.cpp index be0dd53..c687df8 100644 --- a/src/lidar_segmentation.cpp +++ b/src/lidar_segmentation.cpp @@ -359,19 +359,19 @@ void Detector::filtered(const pcl::PointCloud &cloud){ A "markerPointsArray" tömb 3. oszlopában ha 1-es szerepel, akkor az a piros line strip-hez tartozik, ellenkező esetben a zöldhöz.*/ - /*Ha az első pont zöld, de a második piros, akkor az első is a piros line strip-be kerül.*/ + /*If the first point is green, but the second is red, then the first is put inside the red line strip as well.*/ if (markerPointsArray[0][3] == 0 && markerPointsArray[1][3] == 1) markerPointsArray[0][3] = 1; - /*Ha az utolsó pont zöld, de az utolsó előtti piros, akkor az utolsó is a piros line strip-be kerül.*/ + /*If the last point is green, but the penultimate is red, then the last is put inside the red line strip as well.*/ if (markerPointsArray[cM - 1][3] == 0 && markerPointsArray[cM - 2][3] == 1) markerPointsArray[cM - 1][3] = 1; - /*Ha az első pont piros, de a második zöld, akkor az első is a zöld line strip-be kerül.*/ + /*If the first point is red, but the second is green, then the first is put inside the green line strip too.*/ if (markerPointsArray[0][3] == 1 && markerPointsArray[1][3] == 0) markerPointsArray[0][3] = 0; - /*Ha az utolsó pont piros, de az utolsó előtti zöld, akkor az utolsó is a zöld line strip-be kerül.*/ + /*If the last point is red, but the penultimate is green, then the last is also put inside the green line strip.*/ if (markerPointsArray[cM - 1][3] == 1 && markerPointsArray[cM - 2][3] == 0) markerPointsArray[cM - 1][3] = 0;