Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • labrobotica/algorithms/laser_scan_utils
1 result
Show changes
Commits on Source (33)
Showing
with 394 additions and 430 deletions
......@@ -2,6 +2,8 @@
bin/
build*/
lib/
doc/
cmake_modules/
.settings/language.settings.xml
.project
.cproject
......
......@@ -50,14 +50,17 @@ stages:
- if [ -f license_header_${CURRENT_YEAR}.txt ]; then
# add license headers to new files
- echo "File license_header_${CURRENT_YEAR}.txt already exists. License headers are assumed to be updated. Adding headers to new files..."
- ./license_manager.sh --add --path=${CI_PROJECT_DIR} --license-header=license_header_${CURRENT_YEAR}.txt --exclude=ci_deps
- ./license_manager.sh --add --path=${CI_PROJECT_DIR} --config-path=. --exclude=ci_deps
- else
# update license headers of all files
# remove license headers of all files
- ./license_manager.sh --remove --path=${CI_PROJECT_DIR} --config-path=. --exclude=ci_deps
# update license header
- export PREV_YEAR=$(( CURRENT_YEAR-1 ))
- echo "Creating new file license_header_${CURRENT_YEAR}.txt..."
- git mv license_header_${PREV_YEAR}.txt license_header_${CURRENT_YEAR}.txt
- sed -i "s/${PREV_YEAR}/${PREV_YEAR},${CURRENT_YEAR}/g" license_header_${CURRENT_YEAR}.txt
- ./license_manager.sh --update --path=${CI_PROJECT_DIR} --license-header=license_header_${CURRENT_YEAR}.txt --exclude=ci_deps
- sed -i "s/${PREV_YEAR}/${CURRENT_YEAR}/g" license_header_${CURRENT_YEAR}.txt
# add new license headers to all files
- ./license_manager.sh --add --path=${CI_PROJECT_DIR} --config-path=. --exclude=ci_deps
- fi
- cd ..
......
......@@ -39,14 +39,6 @@ IF(NOT BUILD_DEMOS)
OPTION(BUILD_DEMOS "Build demos" ON)
ENDIF(NOT BUILD_DEMOS)
if(BUILD_TESTS)
# Enables testing for this directory and below.
# Note that ctest expects to find a test file in the build directory root.
# Therefore, this command should be in the source directory root.
#include(CTest) # according to http://public.kitware.com/pipermail/cmake/2012-June/050853.html
enable_testing()
endif()
# ============ DEPENDENCIES ============
FIND_PACKAGE(Eigen3 3.3 REQUIRED CONFIG)
FIND_PACKAGE(falkolib QUIET)
......@@ -104,6 +96,7 @@ SET(HDRS
SET(HDRS ${HDRS}
include/${PROJECT_NAME}/corner_falko_2d.h
include/${PROJECT_NAME}/loop_closure_falko.h
include/${PROJECT_NAME}/scene_falko_base.h
include/${PROJECT_NAME}/scene_falko.h
include/${PROJECT_NAME}/match_loop_closure_scene.h)
ENDIF(falkolib_FOUND)
......@@ -171,7 +164,7 @@ ENDIF(BUILD_DEMOS)
#Build tests
IF(BUILD_TESTS)
MESSAGE("Building tests.")
set(_LASER_SCAN_UTILS_ROOT_DIR ${CMAKE_SOURCE_DIR})
enable_testing()
add_subdirectory(test)
ENDIF(BUILD_TESTS)
......
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,14 +17,6 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
/**
* \file polyline_test.cpp
*
* Created on: Jul 5, 2016
* \author: jvallve
*/
//LaserScanUtils includes
#include "laser_scan_utils/line_finder_iterative.h"
......
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,17 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
/**
* \file corner_falko_2d.h
*
* Created on: Jan 26, 2021
* \author: spujol
*/
#ifndef CORNER_FALKO_2D_H_
#define CORNER_FALKO_2D_H_
#pragma once
#include <fstream>
#include <iostream>
......@@ -136,5 +127,3 @@ public:
};
} /* namespace laserscanutils */
#endif /* LANDMARK_POLYLINE_2d_H_ */
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,10 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef CORNER_FINDER_H_
#define CORNER_FINDER_H_
#pragma once
//laserscanutils
#include "laser_scan_utils.h"
......@@ -120,4 +118,3 @@ class CornerFinder
};
} //namespace
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,10 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef CORNER_FINDER_INSCRIBED_ANGLE_H_
#define CORNER_FINDER_INSCRIBED_ANGLE_H_
#pragma once
//laserscanutils
#include "corner_finder.h"
......@@ -104,4 +102,3 @@ class CornerFinderInscribedAngle : public CornerFinder
void print() const override;
};
}//namespace
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,10 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef CORNER_POINT_H_
#define CORNER_POINT_H_
#pragma once
//laserscanutils
#include "laser_scan_utils.h"
......@@ -92,4 +90,3 @@ class CornerPoint
void print() const;
};
}//namespace
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,11 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef GRID2D_H
#define GRID2D_H
#pragma once
//laserscanutils
#include "laser_scan_utils.h"
......@@ -280,5 +277,3 @@ class Grid2D
};
}//end of namespace
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,10 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef GRID_CLUSTER_H_
#define GRID_CLUSTER_H_
#pragma once
//laserscanutils
#include "laser_scan_utils.h"
......@@ -62,4 +60,3 @@ class GridCluster : public PointSet
void print() const override;
};
}//namespace
#endif
This diff is collapsed.
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,10 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef LASER_SCAN_H_
#define LASER_SCAN_H_
#pragma once
//laserscanutils
#include "laser_scan_utils.h"
......@@ -195,5 +193,3 @@ class LaserScan
};
} //namespace
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,11 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef TYPES_LASER_SCAN_UTILS_H_
#define TYPES_LASER_SCAN_UTILS_H_
#pragma once
//includes from Eigen lib
#include <Eigen/Dense>
......@@ -60,4 +57,3 @@ namespace Eigen
typedef Quaternion<laserscanutils::ScalarT> Quaternions; ///< Quaternion of real scalar_t type
typedef AngleAxis<laserscanutils::ScalarT> AngleAxiss; ///< Angle-Axis of real scalar_t type
}
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,10 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef LASER_SCAN_WITH_PARAMS_H_
#define LASER_SCAN_WITH_PARAMS_H_
#pragma once
//laserscanutils
#include "laser_scan.h"
......@@ -58,5 +56,3 @@ class LaserScanWithParams : public LaserScan
};
} //namespace
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,10 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef LINE_FINDER_H_
#define LINE_FINDER_H_
#pragma once
//laserscanutils
#include "laser_scan_utils.h"
......@@ -120,4 +118,3 @@ class LineFinder
virtual void print() const;
};
}//namespace
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,10 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef LINE_FINDER_HOUGH_H_
#define LINE_FINDER_HOUGH_H_
#pragma once
//laserscanutils
#include "line_finder.h"
......@@ -111,4 +109,3 @@ class LineFinderHough : public LineFinder
void print() const override;
};
}//namespace
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,10 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef LINE_FINDER_ITERATIVE_H_
#define LINE_FINDER_ITERATIVE_H_
#pragma once
//laserscanutils
#include "line_finder.h"
......@@ -195,4 +193,3 @@ class LineFinderIterative : public LineFinder
};
} //namespace
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,10 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef LINE_FINDER_JUMP_FIT_H_
#define LINE_FINDER_JUMP_FIT_H_
#pragma once
//laserscanutils
#include "line_finder.h"
......@@ -106,4 +104,3 @@ class LineFinderJumpFit : public LineFinder
void print() const override;
};
}//namespace
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,10 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#ifndef LINE_SEGMENT_H_
#define LINE_SEGMENT_H_
#pragma once
//laserscanutils
#include "laser_scan_utils.h"
......@@ -107,4 +105,3 @@ class LineSegment
void print() const;
};
}//namespace
#endif
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022,2023,2024 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu)
// LaserScanUtils - Copyright (C) 2020-2025
// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Vallvé Navarro (jvallve@iri.upc.edu),
// Andreu Corominas Murtra (acorominas@iri.upc.edu)
// All rights reserved.
//
// This file is part of laser_scan_utils
// laser_scan_utils is free software: you can redistribute it and/or modify
// This file is part of gnss_utils
// gnss_utils is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -17,17 +17,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
/**
* \file loop_closure_base_2d.h
*
* Created on: Feb 9, 2021
* \author: spujol
*/
#ifndef LOOP_CLOSURE_BASE_2D_H_
#define LOOP_CLOSURE_BASE_2D_H_
#pragma once
#include <fstream>
#include <iostream>
......@@ -40,50 +31,50 @@
#include "match_loop_closure_scene.h"
#include "scene_base.h"
namespace laserscanutils {
/** \brief A 2base class for loop closure using falko library
*/
class LoopClosureBase2d
namespace laserscanutils
{
private:
public:
/** \brief Constructor
**/
LoopClosureBase2d(){};
class LoopClosureBase2d;
typedef std::shared_ptr<LoopClosureBase2d> LoopClosureBase2dPtr;
/** \brief A 2base class for loop closure using falko library
*/
class LoopClosureBase2d
{
public:
/** \brief Constructor
**/
LoopClosureBase2d(){};
/** \brief Destructor
**/
virtual ~LoopClosureBase2d(){};
/** \brief Destructor
**/
virtual ~LoopClosureBase2d(){};
/** \brief update the scene struct with keypoints and descriptors
**/
virtual sceneBasePtr extractScene(const LaserScan &scan, const LaserScanParams &scanParams) = 0;
/** \brief update the scene struct with keypoints and descriptors
**/
virtual sceneBasePtr extractScene(const LaserScan &scan, const LaserScanParams &scanParams) = 0;
/** \brief Create and update a matchLoopClosure struct with the info that is
*produced when matching two given scenes
**/
virtual MatchLoopClosureScenePtr matchScene(sceneBasePtr _scene1, sceneBasePtr _scene2) = 0;
/** \brief Create and update a matchLoopClosure struct with the info that is
*produced when matching two given scenes
**/
virtual MatchLoopClosureScenePtr matchScene(sceneBasePtr _scene1, sceneBasePtr _scene2) = 0;
/** \brief It matches a target scene against a list of references scenes in order to find loop
* closures
**/
virtual std::map<double, MatchLoopClosureScenePtr> findLoopClosure(std::list<std::shared_ptr<SceneBase>> _l_scenes,
const sceneBasePtr _new_scene)
{
std::map<double, MatchLoopClosureScenePtr> matchings;
for (auto ref_scene : _l_scenes)
/** \brief It matches a target scene against a list of references scenes in order to find loop
* closures
**/
virtual std::map<double, MatchLoopClosureScenePtr> findLoopClosure(std::list<std::shared_ptr<SceneBase>> _l_scenes,
const sceneBasePtr _new_scene)
{
std::map<double, MatchLoopClosureScenePtr> matchings;
for (auto ref_scene : _l_scenes)
{
auto match = matchScene(ref_scene, _new_scene);
while (matchings.find(match->score)!=matchings.end())
match->score+=0.001;
while (matchings.find(match->score) != matchings.end())
match->score += 0.001;
matchings.emplace(match->score, match);
}
return matchings;
}
};
return matchings;
}
};
} /* namespace laserscanutils */
#endif /* LOOP_CLOSURE_BASE_2D_H_ */