Go to the documentation of this file.
11 : m_map(m.getCenter(), m.getWorldSizeX(), m.getWorldSizeY(), m.getResolution()),
24 (
double xmin,
double ymin,
double xmax,
double ymax,
double delta,
double patchdelta):
25 m_map(
Point((xmax+xmin)*.5, (ymax+ymin)*.5), xmax-xmin, ymax-ymin, patchdelta), m_pose(0,0,0){
27 m_critScore=.5*m_regScore;
30 m_computeCovariance=
false;
49 SensorMap::const_iterator laser_it=
m_sensorMap.find(sensorName);
52 assert(rangeSensor && rangeSensor->
beams().size());
54 m_beams=
static_cast<unsigned int>(rangeSensor->
beams().size());
55 double* angles=
new double[rangeSensor->
beams().size()];
56 for (
unsigned int i=0; i<
m_beams; i++){
57 angles[i]=rangeSensor->
beams()[i].pose.theta;
86 double lin_move=move*move;
88 cerr <<
"Too big jump in the log file: " << lin_move << endl;
89 cerr <<
"relPose=" << relPose.
x <<
" " <<relPose.
y << endl;
90 cerr <<
"ignoring" << endl;
94 move.x=move.y=move.theta=0;
97 double s=sin(dth),
c=cos(dth);
99 dPose.
x=
c*move.x-s*move.y;
100 dPose.
y=s*move.x+
c*move.y;
101 dPose.
theta=move.theta;
103 #ifdef SCANMATHCERPROCESSOR_DEBUG
104 cout <<
"abs-move x="<< dPose.
x <<
" y=" << dPose.
y <<
" theta=" << dPose.
theta << endl;
109 #ifdef SCANMATHCERPROCESSOR_DEBUG
110 cout <<
"StartPose: x="
120 assert(reading.size()==
m_beams);
133 double * plainReading =
new double[
m_beams];
137 #ifdef SCANMATHCERPROCESSOR_DEBUG
170 #ifdef SCANMATHCERPROCESSOR_DEBUG
172 cout <<
"evals=" << eval[0] <<
" " << eval[1]<<
" " << eval[2]<<endl;
179 cerr <<
"USING ICP" << endl;
189 #ifdef SCANMATHCERPROCESSOR_DEBUG
190 cout <<
"Registering" << endl;
194 #ifdef SCANMATHCERPROCESSOR_DEBUG
195 cout <<
"New Scan added, using odo pose" << endl;
200 #ifdef SCANMATHCERPROCESSOR_DEBUG
201 cout <<
"New Scan added, using matched pose" << endl;
206 #ifdef SCANMATHCERPROCESSOR_DEBUG
207 cout <<
" FinalPose: x="
208 << newPose.
x <<
" y=" << newPose.
y <<
" theta=" << newPose.
theta << endl;
209 cout <<
"score=" << score << endl;
212 delete [] plainReading;
217 (
double urange,
double range,
double sigma,
int kernsize,
double lopt,
double aopt,
int iterations,
bool computeCovariance){
218 m_matcher.setMatchingParameters(urange, range, sigma, kernsize, lopt, aopt, iterations);
219 m_computeCovariance=computeCovariance;
void eigen_decomposition(double A[3][3], double V[3][3], double d[3])
std::map< std::string, Sensor * > SensorMap
void setSensorMap(const SensorMap &smap, std::string sensorName="FLASER")
OrientedPoint getPose() const
virtual void processScan(const RangeReading &reading)
const std::vector< Beam > & beams() const
void invalidateActiveArea()
const char *const *argv double delta
orientedpoint< double, double > OrientedPoint
void setMatchingParameters(double urange, double range, double sigma, int kernsize, double lopt, double aopt, int iterations, bool computeCovariance=false)
void setLaserParameters(unsigned int beams, double *angles, const OrientedPoint &lpose)
unsigned int rawView(double *v, double density=0.) const
double optimize(OrientedPoint &pnew, const ScanMatcherMap &map, const OrientedPoint &p, const double *readings) const
ScanMatcherProcessor(const ScanMatcherMap &m)
const OrientedPoint & getPose() const
void setRegistrationParameters(double regScore, double critScore)
OrientedPoint getPose() const
virtual ~ScanMatcherProcessor()
double registerScan(ScanMatcherMap &map, const OrientedPoint &p, const double *readings)
double icpOptimize(OrientedPoint &pnew, const ScanMatcherMap &map, const OrientedPoint &p, const double *readings) const
openslam_gmapping
Author(s): Cyrill Stachniss, Udo Frese, Giorgio Grisetti, Wolfram Burgard
autogenerated on Thu Oct 19 2023 02:25:51