Skip to content
Snippets Groups Projects
Commit 90ac2ca0 authored by Pep Martí Saumell's avatar Pep Martí Saumell
Browse files

Merge branch '23-icp-develop-matching-tools' of...

Merge branch '23-icp-develop-matching-tools' of ssh://gitlab.iri.upc.edu:2202/mobile_robotics/laser_scan_utils into 23-icp-develop-matching-tools
parents a2733fa2 a7930fe8
No related branches found
No related tags found
1 merge request!1Resolve "icp: develop matching tools"
#include "icp.h" #include "icp.h"
using namespace laserscanutils; using namespace laserscanutils;
unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
std::mt19937 generator (seed);
std::uniform_real_distribution<double> dis(0.0, 1.0);
class LDWrapper { class LDWrapper {
public: public:
...@@ -70,9 +72,14 @@ icp_output ICP::matchPC(LaserScan &_last_ls, LaserScan &_origin_ls, LaserScanPar ...@@ -70,9 +72,14 @@ icp_output ICP::matchPC(LaserScan &_last_ls, LaserScan &_origin_ls, LaserScanPar
csm_input.laser_ref = origin.laser_data; csm_input.laser_ref = origin.laser_data;
csm_input.laser_sens = last.laser_data; csm_input.laser_sens = last.laser_data;
csm_input.first_guess[0] = _last_transf(0); // csm_input.first_guess[0] = _last_transf(0);
csm_input.first_guess[1] = _last_transf(1); // csm_input.first_guess[1] = _last_transf(1);
csm_input.first_guess[2] = _last_transf(2); // csm_input.first_guess[2] = _last_transf(2);
csm_input.first_guess[0] = dis(generator)*3;
csm_input.first_guess[1] = dis(generator)*3;
double aux = dis(generator);
csm_input.first_guess[2] = -1.14*(1-aux) + 1.14*aux;
csm_input.use_point_to_line_distance = 1; csm_input.use_point_to_line_distance = 1;
......
// #include <csm/csm_all.h> // #include <csm/csm_all.h>
#include <chrono>
#include <random>
#include "laser_scan.h" #include "laser_scan.h"
#include <csm/csm_all.h> #include <csm/csm_all.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment