Skip to content
Snippets Groups Projects
Commit a7930fe8 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Using random inicialization for debugging purposes

parent f8516946
No related branches found
No related tags found
1 merge request!1Resolve "icp: develop matching tools"
#include "icp.h"
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 {
public:
......@@ -69,9 +71,14 @@ icp_output ICP::matchPC(LaserScan &_last_ls, LaserScan &_origin_ls, LaserScanPar
csm_input.laser_ref = origin.laser_data;
csm_input.laser_sens = last.laser_data;
csm_input.first_guess[0] = _last_transf(0);
csm_input.first_guess[1] = _last_transf(1);
csm_input.first_guess[2] = _last_transf(2);
// csm_input.first_guess[0] = _last_transf(0);
// csm_input.first_guess[1] = _last_transf(1);
// 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 = true;
......
// #include <csm/csm_all.h>
#include <chrono>
#include <random>
#include "laser_scan.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