From 5b3ce1e20d3a98052f73410f9415c8c8b46750a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu>
Date: Wed, 24 Nov 2021 14:58:57 +0100
Subject: [PATCH] Resolve "license headers"

---
 .gitlab-ci.yml                                | 109 ++++++++++++---
 scripts/license_header_2021.txt               |  17 +++
 scripts/license_manager.sh                    | 125 ++++++++++++++++++
 src/corner_falko_2d.cpp                       |  21 +++
 src/corner_falko_2d.h                         |  21 +++
 src/corner_finder.cpp                         |  21 +++
 src/corner_finder.h                           |  21 +++
 src/corner_finder_inscribed_angle.cpp         |  21 +++
 src/corner_finder_inscribed_angle.h           |  21 +++
 src/corner_point.cpp                          |  21 +++
 src/corner_point.h                            |  21 +++
 src/deprecated/clustering.cpp                 |  21 +++
 src/deprecated/clustering.h                   |  21 +++
 src/deprecated/corner_detector.cpp            |  21 +++
 src/deprecated/corner_detector.h              |  21 +++
 src/deprecated/entities.cpp                   |  21 +++
 src/deprecated/entities.h                     |  21 +++
 .../examples/test_corner_aperture.cpp         |  21 +++
 .../examples/test_extract_corners.cpp         |  21 +++
 .../examples/test_laser_detector.cpp          |  21 +++
 src/deprecated/line_detector.cpp              |  21 +++
 src/deprecated/line_detector.h                |  21 +++
 src/deprecated/object_detector.cpp            |  21 +++
 src/deprecated/object_detector.h              |  21 +++
 src/deprecated/scan_basics.cpp                |  21 +++
 src/deprecated/scan_basics.h                  |  21 +++
 src/examples/polyline_demo.cpp                |  21 +++
 src/grid_2d.cpp                               |  21 +++
 src/grid_2d.h                                 |  21 +++
 src/grid_cluster.cpp                          |  21 +++
 src/grid_cluster.h                            |  21 +++
 src/icp.cpp                                   |  21 +++
 src/icp.h                                     |  21 +++
 src/laser_scan.cpp                            |  21 +++
 src/laser_scan.h                              |  21 +++
 src/laser_scan_utils.h                        |  21 +++
 src/laser_scan_with_params.cpp                |  21 +++
 src/laser_scan_with_params.h                  |  21 +++
 src/line_finder.cpp                           |  21 +++
 src/line_finder.h                             |  21 +++
 src/line_finder_hough.cpp                     |  21 +++
 src/line_finder_hough.h                       |  21 +++
 src/line_finder_iterative.cpp                 |  21 +++
 src/line_finder_iterative.h                   |  21 +++
 src/line_finder_jump_fit.cpp                  |  21 +++
 src/line_finder_jump_fit.h                    |  21 +++
 src/line_segment.cpp                          |  21 +++
 src/line_segment.h                            |  21 +++
 src/loop_closure_base.cpp                     |  21 +++
 src/loop_closure_base.h                       |  21 +++
 src/loop_closure_falko.h                      |  21 +++
 src/match_loop_closure_scene.h                |  21 +++
 src/point_set.cpp                             |  21 +++
 src/point_set.h                               |  21 +++
 src/polyline.cpp                              |  21 +++
 src/polyline.h                                |  21 +++
 src/scan_segment.cpp                          |  21 +++
 src/scan_segment.h                            |  21 +++
 src/scene_base.h                              |  21 +++
 src/scene_falko.h                             |  21 +++
 test/data/scan_data.h                         |  21 +++
 test/gtest/utils_gtest.h                      |  21 +++
 test/gtest_example.cpp                        |  21 +++
 test/gtest_loop_closure_falko.cpp             |  21 +++
 64 files changed, 1511 insertions(+), 21 deletions(-)
 create mode 100644 scripts/license_header_2021.txt
 create mode 100755 scripts/license_manager.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index aab847e..dc37ba5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,5 @@
 stages:
+  - license
   - none
   - csm
   - falko
@@ -6,10 +7,65 @@ stages:
 
 ############ YAML ANCHORS ############
 .preliminaries_template: &preliminaries_definition
+  ## Install ssh-agent if not already installed, it is required by Docker.
+  ## (change apt-get to yum if you use an RPM-based image)
+  - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
+
+  ## Run ssh-agent (inside the build environment)
+  - eval $(ssh-agent -s)
+
+  ## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
+  ## We're using tr to fix line endings which makes ed25519 keys work
+  ## without extra base64 encoding.
+  ## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
+  - mkdir -p ~/.ssh
+  - chmod 700 ~/.ssh  
+  - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
+  # - echo "$SSH_KNOWN_HOSTS" > $HOME/.ssh/known_hosts
+  - ssh-keyscan -H -p 2202 gitlab.iri.upc.edu >> $HOME/.ssh/known_hosts
+
   # update apt
   - apt-get update
 
-.build_install_csm_template: &build_install_csm_definition
+.license_header_template: &license_header_definition
+  - cd $CI_PROJECT_DIR
+
+  # configure git
+  - export CI_NEW_BRANCH=ci_processing$RANDOM
+  - echo creating new temporary branch... $CI_NEW_BRANCH
+  #- export CI_NEW_BRANCH=ci_processing$CI_COMMIT_SHORT_SHA
+  - git config --global user.email "${CI_EMAIL}"
+  - git config --global user.name "${CI_USERNAME}"
+  - git checkout -b $CI_NEW_BRANCH # temporary branch
+
+  # license headers
+  - export CURRENT_YEAR=$( date +'%Y' )
+  - echo "current year:" ${CURRENT_YEAR}
+  - cd scripts
+  - 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
+  - else
+      # update license headers of all files
+  -   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
+  - fi
+  - cd ..
+
+  # push changes (if any)
+  - if git commit -a -m "[skip ci] license headers added or modified" ; then
+  -   git remote set-url --push origin "ssh://git@gitlab.iri.upc.edu:2202/${CI_PROJECT_PATH}.git"
+  -   git push origin $CI_NEW_BRANCH:${CI_COMMIT_REF_NAME}
+  - else
+  -   echo "No changes, nothing to commit!"
+  - fi
+
+.install_csm_template: &install_csm_definition
+  - cd $CI_BUILDS_DIR
   - apt-get install -y libgsl-dev
   - if [ -d csm ]; then
   -   echo "directory csm exists"
@@ -22,9 +78,9 @@ stages:
   - cmake .
   - make -j2
   - make install
-  - cd ..
 
-.build_install_falko_template: &build_install_falko_definition
+.install_falko_template: &install_falko_definition
+  - cd $CI_BUILDS_DIR
   - if [ -d falkolib ]; then
   -   echo "directory falkolib exists" 
   -   cd falkolib
@@ -38,9 +94,9 @@ stages:
   - cmake ..
   - make -j2
   - make install
-  - cd ../..
 
 .build_and_test_template: &build_and_test_definition
+  - cd $CI_PROJECT_DIR
   - mkdir -pv build
   - cd build
   - cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
@@ -48,6 +104,17 @@ stages:
   - ctest 
   - make install
 
+############ LICENSE HEADERS ############
+license_headers:
+  stage: license
+  image: labrobotica/wolf_deps:16.04
+  except:
+    - master
+  before_script:
+    - *preliminaries_definition
+  script:
+    - *license_header_definition
+
 ############ UBUNTU 16.04 TESTS ############
 build_and_test_none:xenial:
   stage: none
@@ -64,10 +131,10 @@ build_and_test_csm:xenial:
   cache:
     - key: csm-xenial
       paths:
-      - csm/
+      - ${CI_BUILDS_DIR}/csm/
   before_script:
     - *preliminaries_definition
-    - *build_install_csm_definition
+    - *install_csm_definition
     - ldconfig # update links (shared libraries)
   script:
     - *build_and_test_definition
@@ -78,10 +145,10 @@ build_and_test_falko:xenial:
   cache:
     - key: falko-xenial
       paths:
-      - falkolib/
+      - ${CI_BUILDS_DIR}/falkolib/
   before_script:
     - *preliminaries_definition
-    - *build_install_falko_definition
+    - *install_falko_definition
     - ldconfig # update links (shared libraries)
   script:
     - *build_and_test_definition
@@ -92,14 +159,14 @@ build_and_test_csm_falko:xenial:
   cache:
     - key: csm-xenial
       paths:
-      - csm/
+      - ${CI_BUILDS_DIR}/csm/
     - key: falko-xenial
       paths:
-      - falkolib/
+      - ${CI_BUILDS_DIR}/falkolib/
   before_script:
     - *preliminaries_definition
-    - *build_install_falko_definition
-    - *build_install_csm_definition
+    - *install_falko_definition
+    - *install_csm_definition
     - ldconfig # update links (shared libraries)
   script:
     - *build_and_test_definition
@@ -120,10 +187,10 @@ build_and_test_csm:bionic:
   cache:
     - key: csm-bionic
       paths:
-      - csm/
+      - ${CI_BUILDS_DIR}/csm/
   before_script:
     - *preliminaries_definition
-    - *build_install_csm_definition
+    - *install_csm_definition
     - ldconfig # update links (shared libraries)
   script:
     - *build_and_test_definition
@@ -134,10 +201,10 @@ build_and_test_falko:bionic:
   cache:
     - key: falko-bionic
       paths:
-      - falkolib/
+      - ${CI_BUILDS_DIR}/falkolib/
   before_script:
     - *preliminaries_definition
-    - *build_install_falko_definition
+    - *install_falko_definition
     - ldconfig # update links (shared libraries)
   script:
     - *build_and_test_definition
@@ -148,14 +215,14 @@ build_and_test_csm_falko:bionic:
   cache:
     - key: csm-bionic
       paths:
-      - csm/
+      - ${CI_BUILDS_DIR}/csm/
     - key: falko-bionic
       paths:
-      - falkolib/
+      - ${CI_BUILDS_DIR}/falkolib/
   before_script:
     - *preliminaries_definition
-    - *build_install_falko_definition
-    - *build_install_csm_definition
+    - *install_falko_definition
+    - *install_csm_definition
     - ldconfig # update links (shared libraries)
   script:
-    - *build_and_test_definition
+    - *build_and_test_definition
\ No newline at end of file
diff --git a/scripts/license_header_2021.txt b/scripts/license_header_2021.txt
new file mode 100644
index 0000000..3b8ca59
--- /dev/null
+++ b/scripts/license_header_2021.txt
@@ -0,0 +1,17 @@
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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/>.
diff --git a/scripts/license_manager.sh b/scripts/license_manager.sh
new file mode 100755
index 0000000..edf6410
--- /dev/null
+++ b/scripts/license_manager.sh
@@ -0,0 +1,125 @@
+#!/bin/bash
+
+# ------ WOLF license_manager script ------
+#
+# This script is used for managing the license headers of code files (.h, .c, .cpp, .hpp)
+# This file is automatically called by the CI in gitlab.
+
+line_start_mark="//--------LICENSE_START--------"
+line_end_mark="//--------LICENSE_END--------"
+
+#options
+tmp=false
+mode="none"
+path=""
+#recursive=true
+license=""
+
+for i in "$@"; do
+  case $i in
+    --temp)
+      tmp=true
+      shift # past argument=value
+      ;;
+    --path=*)
+      path="${i#*=}"
+      shift # past argument=value
+      ;;
+    --license-header=*)
+      license="${i#*=}"
+      shift # past argument=value
+      ;;
+    --add)
+      mode="add"
+      if [ $mode == "update" ]; then
+        echo "Error: Script cannot be called with both options: --update or --add"
+        exit 1
+      fi
+      shift # past argument=value
+      ;;
+    --update)
+      mode="update"
+      if [ $mode == "add" ]; then
+        echo "Error: Script cannot be called with both options: --update or --add"
+        exit 1
+      fi
+      shift # past argument=value
+      ;;
+    *)
+      # unknown option
+      ;;
+  esac
+done
+
+# check options
+if [ "$path" == "" ]; then
+  echo 'Please, provide the path to the folder containing the code with --path=/my/folder/code'
+  exit 1
+else
+  if [ -d "$path" ]; then
+    echo "Valid path: ${path}"
+  else
+    echo "Error: ${path} not found. Can not continue."
+  exit 1
+  fi
+fi
+
+if [ "$license" == "" ]; then
+  echo 'Error: Please, provide the path to the folder containing the code with --license-header=/my/license/header/file.txt'
+  exit 1
+else
+  if [ -f "$license" ]; then
+    echo "Valid license header file: ${license} containing:"
+    cat ${license}
+  else
+    echo "Error: License header file ${license} not found. Can not continue."
+  exit 1
+  fi
+fi
+
+echo "mode: ${mode}"
+
+if [ $mode == "none" ]; then
+  echo "Error: Script should be called with one of the following options: --update or --add"
+  exit 1
+fi
+
+# PATH (AND tmp FOLDER)
+folder=$path
+if [ $tmp == true ]; then
+  echo "Creating temporary folder: ${path}_tmp"
+  mkdir -pv ${path}_tmp
+  cp -a $path/. ${path}_tmp
+  folder=${path}_tmp
+fi
+
+# DETECT AND REMOVE EXISTING LICENSE
+if [ $mode == "update" ]; then
+  echo "Recursely removing license header from all files (.c, .cpp, .h, .hpp)"
+  for i in $(find $folder -name '*.c' -or -name '*.cpp' -or -name '*.h' -or -name '*.hpp')
+  do
+    if grep -Fxq ${line_start_mark} $i 
+    then
+      echo "  Removing license header from file ${i}"
+      line_start="$(grep -wn $line_start_mark ${i} | head -n 1 | cut -d: -f1)"
+      line_end="$(grep -wn $line_end_mark ${i} | head -n 1 | cut -d: -f1)"
+      #echo ${line_start}
+      #echo ${line_end}
+      awk -v m=$line_start -v n=$line_end 'm <= NR && NR <= n {next} {print}' $i > tmpfile && mv tmpfile $i 
+      #cat $i
+    fi
+  done
+  #TODO
+fi
+
+# ADD CONTENT OF license-file AT THE BEGINNING OF CODE FILES
+echo "Recursively adding license header to all files (.c, .cpp, .h, .hpp)"
+for i in $(find $folder -name '*.c' -or -name '*.cpp' -or -name '*.h' -or -name '*.hpp')
+do
+  if grep -Fxq ${line_start_mark} $i; then
+    echo "skippping ${i}"
+  else
+    ( echo ${line_start_mark}$'\n//'; cat ${license}; echo $'//\n'${line_end_mark}; cat $i ) > temp_file
+    mv temp_file $i
+  fi
+done
\ No newline at end of file
diff --git a/src/corner_falko_2d.cpp b/src/corner_falko_2d.cpp
index edce4b9..78d2409 100644
--- a/src/corner_falko_2d.cpp
+++ b/src/corner_falko_2d.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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.cpp
  *
diff --git a/src/corner_falko_2d.h b/src/corner_falko_2d.h
index 89513e6..832a7b6 100644
--- a/src/corner_falko_2d.h
+++ b/src/corner_falko_2d.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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
  *
diff --git a/src/corner_finder.cpp b/src/corner_finder.cpp
index dd539f3..2b3158d 100644
--- a/src/corner_finder.cpp
+++ b/src/corner_finder.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "corner_finder.h"
 
 namespace laserscanutils
diff --git a/src/corner_finder.h b/src/corner_finder.h
index d9df2e6..34e5f6a 100644
--- a/src/corner_finder.h
+++ b/src/corner_finder.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
 
diff --git a/src/corner_finder_inscribed_angle.cpp b/src/corner_finder_inscribed_angle.cpp
index ed46186..4fb77cc 100644
--- a/src/corner_finder_inscribed_angle.cpp
+++ b/src/corner_finder_inscribed_angle.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "corner_finder_inscribed_angle.h"
 
 namespace laserscanutils
diff --git a/src/corner_finder_inscribed_angle.h b/src/corner_finder_inscribed_angle.h
index 5e5cda4..1af53b4 100644
--- a/src/corner_finder_inscribed_angle.h
+++ b/src/corner_finder_inscribed_angle.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
 
diff --git a/src/corner_point.cpp b/src/corner_point.cpp
index 2c3c782..600f8be 100644
--- a/src/corner_point.cpp
+++ b/src/corner_point.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "corner_point.h"
 
 //open namespace
diff --git a/src/corner_point.h b/src/corner_point.h
index 76f975b..d25884f 100644
--- a/src/corner_point.h
+++ b/src/corner_point.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
 
diff --git a/src/deprecated/clustering.cpp b/src/deprecated/clustering.cpp
index 950d549..4c8d8bd 100644
--- a/src/deprecated/clustering.cpp
+++ b/src/deprecated/clustering.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 /******* DEPRECATED *******/
 
 #include "clustering.h"
diff --git a/src/deprecated/clustering.h b/src/deprecated/clustering.h
index a41b9fd..2dfd2ec 100644
--- a/src/deprecated/clustering.h
+++ b/src/deprecated/clustering.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 /******* DEPRECATED *******/
 
 #ifndef CLUSTERING_H
diff --git a/src/deprecated/corner_detector.cpp b/src/deprecated/corner_detector.cpp
index b7848fc..86a874b 100644
--- a/src/deprecated/corner_detector.cpp
+++ b/src/deprecated/corner_detector.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 
 #include "corner_detector.h"
 
diff --git a/src/deprecated/corner_detector.h b/src/deprecated/corner_detector.h
index 4f45016..afd9dcc 100644
--- a/src/deprecated/corner_detector.h
+++ b/src/deprecated/corner_detector.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 CORNERS_H_
 #define CORNERS_H_
diff --git a/src/deprecated/entities.cpp b/src/deprecated/entities.cpp
index a4a1faf..e801e2a 100644
--- a/src/deprecated/entities.cpp
+++ b/src/deprecated/entities.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 //std
 #include "iostream"
 
diff --git a/src/deprecated/entities.h b/src/deprecated/entities.h
index fc72d81..2a1214e 100644
--- a/src/deprecated/entities.h
+++ b/src/deprecated/entities.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 ENTITIES_H_
 #define ENTITIES_H_
diff --git a/src/deprecated/examples/test_corner_aperture.cpp b/src/deprecated/examples/test_corner_aperture.cpp
index cf3bd15..2e40bf1 100644
--- a/src/deprecated/examples/test_corner_aperture.cpp
+++ b/src/deprecated/examples/test_corner_aperture.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 //std includes
 #include <iostream>
 
diff --git a/src/deprecated/examples/test_extract_corners.cpp b/src/deprecated/examples/test_extract_corners.cpp
index 825b781..9732651 100644
--- a/src/deprecated/examples/test_extract_corners.cpp
+++ b/src/deprecated/examples/test_extract_corners.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 //std includes
 #include <iostream>
 #include <list>
diff --git a/src/deprecated/examples/test_laser_detector.cpp b/src/deprecated/examples/test_laser_detector.cpp
index ba50295..b500087 100644
--- a/src/deprecated/examples/test_laser_detector.cpp
+++ b/src/deprecated/examples/test_laser_detector.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include <algorithm>
 #include <fstream>
 #include <iostream>
diff --git a/src/deprecated/line_detector.cpp b/src/deprecated/line_detector.cpp
index a2f6eaa..c2a7123 100644
--- a/src/deprecated/line_detector.cpp
+++ b/src/deprecated/line_detector.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 
 #include "line_detector.h"
 
diff --git a/src/deprecated/line_detector.h b/src/deprecated/line_detector.h
index 850e5b8..1cf1e44 100644
--- a/src/deprecated/line_detector.h
+++ b/src/deprecated/line_detector.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_DETECTOR_H_
 #define LINE_DETECTOR_H_
diff --git a/src/deprecated/object_detector.cpp b/src/deprecated/object_detector.cpp
index 5a6c08f..8217843 100644
--- a/src/deprecated/object_detector.cpp
+++ b/src/deprecated/object_detector.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "object_detector.h"
 
 
diff --git a/src/deprecated/object_detector.h b/src/deprecated/object_detector.h
index 781c397..4a5b18b 100644
--- a/src/deprecated/object_detector.h
+++ b/src/deprecated/object_detector.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 OBJECT_DETECTOR_H
 #define OBJECT_DETECTOR_H
 
diff --git a/src/deprecated/scan_basics.cpp b/src/deprecated/scan_basics.cpp
index 48a5429..8a07e8e 100644
--- a/src/deprecated/scan_basics.cpp
+++ b/src/deprecated/scan_basics.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "scan_basics.h"
 
 void laserscanutils::ScanParams::print() const
diff --git a/src/deprecated/scan_basics.h b/src/deprecated/scan_basics.h
index 37e1cfd..bef9dc9 100644
--- a/src/deprecated/scan_basics.h
+++ b/src/deprecated/scan_basics.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 SCAN_BASICS_H_
 #define SCAN_BASICS_H_
diff --git a/src/examples/polyline_demo.cpp b/src/examples/polyline_demo.cpp
index 47bf725..e2900e9 100644
--- a/src/examples/polyline_demo.cpp
+++ b/src/examples/polyline_demo.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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
  *
diff --git a/src/grid_2d.cpp b/src/grid_2d.cpp
index 9297704..9e75f85 100644
--- a/src/grid_2d.cpp
+++ b/src/grid_2d.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 
 #include "grid_2d.h"
 
diff --git a/src/grid_2d.h b/src/grid_2d.h
index ba448e8..50d6257 100644
--- a/src/grid_2d.h
+++ b/src/grid_2d.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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
 
diff --git a/src/grid_cluster.cpp b/src/grid_cluster.cpp
index 326f314..fb0d859 100644
--- a/src/grid_cluster.cpp
+++ b/src/grid_cluster.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "grid_cluster.h"
 
 namespace laserscanutils
diff --git a/src/grid_cluster.h b/src/grid_cluster.h
index 933eb56..7c4b28a 100644
--- a/src/grid_cluster.h
+++ b/src/grid_cluster.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
 
diff --git a/src/icp.cpp b/src/icp.cpp
index 74a79d1..f74e5d2 100644
--- a/src/icp.cpp
+++ b/src/icp.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "icp.h"
 #include <algorithm>
 
diff --git a/src/icp.h b/src/icp.h
index 1f31955..9083562 100644
--- a/src/icp.h
+++ b/src/icp.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 ICP_H_
 #define ICP_H_
 
diff --git a/src/laser_scan.cpp b/src/laser_scan.cpp
index 398e859..403bcae 100644
--- a/src/laser_scan.cpp
+++ b/src/laser_scan.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "laser_scan.h"
 
 namespace laserscanutils
diff --git a/src/laser_scan.h b/src/laser_scan.h
index 0574efe..05b4121 100644
--- a/src/laser_scan.h
+++ b/src/laser_scan.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
 
diff --git a/src/laser_scan_utils.h b/src/laser_scan_utils.h
index 4c0e7de..ac5600a 100644
--- a/src/laser_scan_utils.h
+++ b/src/laser_scan_utils.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
diff --git a/src/laser_scan_with_params.cpp b/src/laser_scan_with_params.cpp
index 98e8931..2c2fc01 100644
--- a/src/laser_scan_with_params.cpp
+++ b/src/laser_scan_with_params.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 
 #include "laser_scan_with_params.h"
 
diff --git a/src/laser_scan_with_params.h b/src/laser_scan_with_params.h
index b979124..1b6d3d3 100644
--- a/src/laser_scan_with_params.h
+++ b/src/laser_scan_with_params.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
 
diff --git a/src/line_finder.cpp b/src/line_finder.cpp
index 2963620..4668b03 100644
--- a/src/line_finder.cpp
+++ b/src/line_finder.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "line_finder.h"
 
 namespace laserscanutils
diff --git a/src/line_finder.h b/src/line_finder.h
index 6bb6c33..a20c2e8 100644
--- a/src/line_finder.h
+++ b/src/line_finder.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
 
diff --git a/src/line_finder_hough.cpp b/src/line_finder_hough.cpp
index 4f9543b..07a1989 100644
--- a/src/line_finder_hough.cpp
+++ b/src/line_finder_hough.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "line_finder_hough.h"
 
 namespace laserscanutils
diff --git a/src/line_finder_hough.h b/src/line_finder_hough.h
index a4e15e4..beacc9c 100644
--- a/src/line_finder_hough.h
+++ b/src/line_finder_hough.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
 
diff --git a/src/line_finder_iterative.cpp b/src/line_finder_iterative.cpp
index fd2863e..e411421 100644
--- a/src/line_finder_iterative.cpp
+++ b/src/line_finder_iterative.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "line_finder_iterative.h"
 
 namespace laserscanutils
diff --git a/src/line_finder_iterative.h b/src/line_finder_iterative.h
index ff617a9..04d0bfd 100644
--- a/src/line_finder_iterative.h
+++ b/src/line_finder_iterative.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
 
diff --git a/src/line_finder_jump_fit.cpp b/src/line_finder_jump_fit.cpp
index 671141e..1b1b256 100644
--- a/src/line_finder_jump_fit.cpp
+++ b/src/line_finder_jump_fit.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "line_finder_jump_fit.h"
 
 namespace laserscanutils
diff --git a/src/line_finder_jump_fit.h b/src/line_finder_jump_fit.h
index 18b986b..365f8f9 100644
--- a/src/line_finder_jump_fit.h
+++ b/src/line_finder_jump_fit.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
 
diff --git a/src/line_segment.cpp b/src/line_segment.cpp
index 1b13d5e..3fd6bc7 100644
--- a/src/line_segment.cpp
+++ b/src/line_segment.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "line_segment.h"
 
 namespace laserscanutils
diff --git a/src/line_segment.h b/src/line_segment.h
index d26ab3e..bc1b6d3 100644
--- a/src/line_segment.h
+++ b/src/line_segment.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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_
 
diff --git a/src/loop_closure_base.cpp b/src/loop_closure_base.cpp
index 687cefd..be32612 100644
--- a/src/loop_closure_base.cpp
+++ b/src/loop_closure_base.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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
  *
diff --git a/src/loop_closure_base.h b/src/loop_closure_base.h
index b9fcd99..7f5313f 100644
--- a/src/loop_closure_base.h
+++ b/src/loop_closure_base.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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
  *
diff --git a/src/loop_closure_falko.h b/src/loop_closure_falko.h
index 23a5def..e5e5b4c 100644
--- a/src/loop_closure_falko.h
+++ b/src/loop_closure_falko.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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
  *
diff --git a/src/match_loop_closure_scene.h b/src/match_loop_closure_scene.h
index a99dc00..b92dc8b 100644
--- a/src/match_loop_closure_scene.h
+++ b/src/match_loop_closure_scene.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 match_loop_closure.h
  *
diff --git a/src/point_set.cpp b/src/point_set.cpp
index aed39e4..7fa94d4 100644
--- a/src/point_set.cpp
+++ b/src/point_set.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "scan_segment.h"
 
 namespace laserscanutils
diff --git a/src/point_set.h b/src/point_set.h
index 739cc71..8994962 100644
--- a/src/point_set.h
+++ b/src/point_set.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 POINT_SET_H_
 #define POINT_SET_H_
 
diff --git a/src/polyline.cpp b/src/polyline.cpp
index aaac6fa..8d27612 100644
--- a/src/polyline.cpp
+++ b/src/polyline.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "polyline.h"
 
 namespace laserscanutils
diff --git a/src/polyline.h b/src/polyline.h
index ad8bb77..3dc9260 100644
--- a/src/polyline.h
+++ b/src/polyline.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 POLYLINE_H_
 #define POLYLINE_H_
 
diff --git a/src/scan_segment.cpp b/src/scan_segment.cpp
index 2a60786..e44fa81 100644
--- a/src/scan_segment.cpp
+++ b/src/scan_segment.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "scan_segment.h"
 
 namespace laserscanutils
diff --git a/src/scan_segment.h b/src/scan_segment.h
index c87693b..dbdcb09 100644
--- a/src/scan_segment.h
+++ b/src/scan_segment.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 SCAN_SEGMENT_H_
 #define SCAN_SEGMENT_H_
 
diff --git a/src/scene_base.h b/src/scene_base.h
index 40651e4..e0605f2 100644
--- a/src/scene_base.h
+++ b/src/scene_base.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 scene_base.h
  *
diff --git a/src/scene_falko.h b/src/scene_falko.h
index 9dbd1f8..7c4d5f3 100644
--- a/src/scene_falko.h
+++ b/src/scene_falko.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 scene_falko.h
  *
diff --git a/test/data/scan_data.h b/test/data/scan_data.h
index 7728475..211fbb5 100644
--- a/test/data/scan_data.h
+++ b/test/data/scan_data.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 /**
  * FALKOLib - Fast Adaptive Laser Keypoint Orientation-invariant
  * Copyright (C) 2016 Fabjan Kallasi and Dario Lodi Rizzini.
diff --git a/test/gtest/utils_gtest.h b/test/gtest/utils_gtest.h
index 2deddcb..555b84a 100644
--- a/test/gtest/utils_gtest.h
+++ b/test/gtest/utils_gtest.h
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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 utils_gtest.h
  * \brief Some utils for gtest
diff --git a/test/gtest_example.cpp b/test/gtest_example.cpp
index 7dd3b9c..c87832d 100644
--- a/test/gtest_example.cpp
+++ b/test/gtest_example.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "gtest/utils_gtest.h"
 
 TEST(TestTest, DummyTestExample)
diff --git a/test/gtest_loop_closure_falko.cpp b/test/gtest_loop_closure_falko.cpp
index a51c576..b16863f 100644
--- a/test/gtest_loop_closure_falko.cpp
+++ b/test/gtest_loop_closure_falko.cpp
@@ -1,3 +1,24 @@
+//--------LICENSE_START--------
+//
+// Copyright (C) 2020,2021 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+// Authors: Joan Vallvé Navarro (jvallve@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
+// 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.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU Lesser General Public License for more details.
+//
+// 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--------
 #include "loop_closure_base.h"
 #include "loop_closure_falko.h"
 #include "data/scan_data.h"
-- 
GitLab