Skip to content

Commit

Permalink
refactor: Minor change in code #1
Browse files Browse the repository at this point in the history
  • Loading branch information
dobaybalazs committed Mar 2, 2022
1 parent 48cf700 commit 4c638e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/blind_spots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void Detector::blindSpots(std::vector<std::vector<Point3D>>& 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)
{
Expand Down Expand Up @@ -65,7 +65,7 @@ void Detector::blindSpots(std::vector<std::vector<Point3D>>& 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;

Expand Down
8 changes: 4 additions & 4 deletions src/lidar_segmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,19 +359,19 @@ void Detector::filtered(const pcl::PointCloud<pcl::PointXYZI> &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;

Expand Down

0 comments on commit 4c638e5

Please sign in to comment.