32 float x,
y;
int cx, cy;
54 precomputedLikelihoodToBeRecomputed =
true;
58 robotPose2D =
CPose2D(*robotPose);
59 robotPose3D = (*robotPose);
75 CPose2D laserPose( sensorPose3D );
79 bool reallyInsert = o->
isPlanarScan( insertionOptions.horizontalTolerance );
80 unsigned int decimation = insertionOptions.decimation;
83 if ( insertionOptions.useMapAltitude &&
84 fabs(insertionOptions.mapAltitude - sensorPose3D.z() ) > 0.001 )
103 const float maxDistanceInsertion = insertionOptions.maxDistanceInsertion;
104 const bool invalidAsFree = insertionOptions.considerInvalidRangesAsFreeSpace;
105 float new_x_max, new_x_min;
106 float new_y_max, new_y_min;
107 float last_valid_range = maxDistanceInsertion;
109 float maxCertainty = insertionOptions.maxOccupancyUpdateCertainty;
110 cellType logodd_observation = p2l(maxCertainty);
111 cellType logodd_observation_occupied = 3*logodd_observation;
114 if (logodd_observation<=0)
115 logodd_observation=1;
117 cellType logodd_thres_occupied = OCCGRID_CELLTYPE_MIN+logodd_observation_occupied;
118 cellType logodd_thres_free = OCCGRID_CELLTYPE_MAX-logodd_observation;
121 int K = updateInfoChangeOnly.enabled ? updateInfoChangeOnly.laserRaysSkip : decimation;
122 size_t idx,nRanges = o->
scan.
size();
129 #if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG) 135 if ( !insertionOptions.wideningBeamsWithDistance )
142 float *scanPoints_x = (
float*)
mrpt_alloca(
sizeof(
float) * nRanges );
143 float *scanPoints_y = (
float*)
mrpt_alloca(
sizeof(
float) * nRanges );
145 float *scanPoint_x,*scanPoint_y;
160 new_x_max = -(numeric_limits<float>::max)();
161 new_x_min = (numeric_limits<float>::max)();
162 new_y_max = -(numeric_limits<float>::max)();
163 new_y_min = (numeric_limits<float>::max)();
165 for (idx=0, scanPoint_x=scanPoints_x,scanPoint_y=scanPoints_y;idx<nRanges;idx+=K,scanPoint_x++,scanPoint_y++)
169 curRange = o->
scan[idx];
170 float R =
min(maxDistanceInsertion,curRange);
172 *scanPoint_x = px + cos(A)*
R;
173 *scanPoint_y = py + sin(A)*
R;
174 last_valid_range = curRange;
181 float R =
min(maxDistanceInsertion,0.5f*last_valid_range);
182 *scanPoint_x = px + cos(A)*
R;
183 *scanPoint_y = py + sin(A)*
R;
194 new_x_max = max( new_x_max, *scanPoint_x );
195 new_x_min =
min( new_x_min, *scanPoint_x );
196 new_y_max = max( new_y_max, *scanPoint_y );
197 new_y_min =
min( new_y_min, *scanPoint_y );
201 float securMargen = 15*resolution;
203 if (new_x_max>x_max-securMargen)
204 new_x_max+= 2*securMargen;
205 else new_x_max = x_max;
206 if (new_x_min<x_min+securMargen)
208 else new_x_min = x_min;
210 if (new_y_max>y_max-securMargen)
211 new_y_max+= 2*securMargen;
212 else new_y_max = y_max;
213 if (new_y_min<y_min+securMargen)
215 else new_y_min = y_min;
220 resizeGrid(new_x_min,new_x_max, new_y_min,new_y_max,0.5);
224 unsigned theMapSize_x = size_x;
231 for (idx=0;idx<nRanges;idx+=K)
233 if ( !o->
validRange[idx] && !invalidAsFree )
continue;
240 int trg_cx = x2idx(scanPoints_x[idx]);
241 int trg_cy = y2idx(scanPoints_y[idx]);
245 static_cast<unsigned int>(trg_cx) < size_x &&
246 static_cast<unsigned int>(trg_cy) < size_y);
250 int Acx = trg_cx - cx;
251 int Acy = trg_cy - cy;
256 int nStepsRay = max( Acx_, Acy_ );
257 if (!nStepsRay)
continue;
260 float N_1 = 1.0f / nStepsRay;
263 int frAcx = (Acx<0 ? -1:+1)*
round((Acx_ <<
FRBITS) * N_1);
264 int frAcy = (Acy<0 ? -1:+1)*
round((Acy_ <<
FRBITS) * N_1);
269 for (
int nStep = 0;nStep<nStepsRay;nStep++)
271 updateCell_fast_free(cx,cy, logodd_observation, logodd_thres_free, theMapArray, theMapSize_x );
285 updateCell_fast_occupied(trg_cx,trg_cy, logodd_observation_occupied, logodd_thres_occupied, theMapArray, theMapSize_x );
310 new_x_max = -(numeric_limits<float>::max)();
311 new_x_min = (numeric_limits<float>::max)();
312 new_y_max = -(numeric_limits<float>::max)();
313 new_y_min = (numeric_limits<float>::max)();
315 last_valid_range = maxDistanceInsertion;
316 for (idx=0;idx<nRanges;idx+=K)
318 float scanPoint_x,scanPoint_y;
321 curRange = o->
scan[idx];
322 float R =
min(maxDistanceInsertion,curRange);
324 scanPoint_x = px + cos(A)*
R;
325 scanPoint_y = py + sin(A)*
R;
326 last_valid_range = curRange;
333 float R =
min(maxDistanceInsertion,0.5f*last_valid_range);
334 scanPoint_x = px + cos(A)*
R;
335 scanPoint_y = py + sin(A)*
R;
346 new_x_max = max( new_x_max, scanPoint_x );
347 new_x_min =
min( new_x_min, scanPoint_x );
348 new_y_max = max( new_y_max, scanPoint_y );
349 new_y_min =
min( new_y_min, scanPoint_y );
353 float securMargen = 15*resolution;
355 if (new_x_max>x_max-securMargen)
356 new_x_max+= 2*securMargen;
357 else new_x_max = x_max;
358 if (new_x_min<x_min+securMargen)
360 else new_x_min = x_min;
362 if (new_y_max>y_max-securMargen)
363 new_y_max+= 2*securMargen;
364 else new_y_max = y_max;
365 if (new_y_min<y_min+securMargen)
367 else new_y_min = y_min;
372 resizeGrid(new_x_min,new_x_max, new_y_min,new_y_max,0.5);
376 unsigned theMapSize_x = size_x;
400 last_valid_range = maxDistanceInsertion;
402 const double dA_2 = 0.5 * o->
aperture / N;
403 for (idx=0;idx<nRanges; idx+=K, A+=dAK)
408 curRange = o->
scan[idx];
409 last_valid_range = curRange;
410 theR =
min(maxDistanceInsertion,curRange);
417 theR =
min(maxDistanceInsertion,0.5f*last_valid_range);
421 if (theR < resolution)
continue;
430 P1.
x = px + cos(A-dA_2) * theR;
431 P1.
y = py + sin(A-dA_2) * theR;
433 P2.
x = px + cos(A+dA_2) * theR;
434 P2.
y = py + sin(A+dA_2) * theR;
437 if (P2.
y<P1.
y) std::swap(P2,P1);
438 if (P2.
y<P0.
y) std::swap(P2,P0);
439 if (P1.
y<P0.
y) std::swap(P1,P0);
443 P0.
cx = x2idx( P0.
x ); P0.
cy = y2idx( P0.
y );
444 P1.
cx = x2idx( P1.
x ); P1.
cy = y2idx( P1.
y );
445 P2.
cx = x2idx( P2.
x ); P2.
cy = y2idx( P2.
y );
447 #if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG) 449 ASSERT_( static_cast<unsigned int>(P0.
cx)<size_x && static_cast<unsigned int>(P0.
cy)<size_y );
450 ASSERT_( static_cast<unsigned int>(P1.
cx)<size_x && static_cast<unsigned int>(P1.
cy)<size_y );
451 ASSERT_( static_cast<unsigned int>(P2.
cx)<size_x && static_cast<unsigned int>(P2.
cy)<size_y );
454 struct {
int frX,frY;
int cx,cy; } R1,R2;
463 for (
int ccx=min_cx;ccx<=max_cx;ccx++)
464 updateCell_fast_free(ccx,P0.
cy, logodd_observation, logodd_thres_free, theMapArray, theMapSize_x );
470 P1b.
x = P0.
x + (P1.
y-P0.
y) * (P2.
x-P0.
x) / (P2.
y-P0.
y);
472 P1b.
cx= x2idx( P1b.
x ); P1b.
cy= y2idx( P1b.
y );
477 const int Acx01 = P1.
cx - P0.
cx;
478 const int Acy01 = P1.
cy - P0.
cy;
479 const int Acx01b = P1b.
cx - P0.
cx;
483 const float inv_N_01 = 1.0f / (
max3(abs(Acx01),abs(Acy01),abs(Acx01b)) + 1 );
484 const int frAcx01 =
round( (Acx01<<
FRBITS) * inv_N_01 );
485 const int frAcy01 =
round( (Acy01<<
FRBITS) * inv_N_01 );
486 const int frAcx01b =
round((Acx01b<<
FRBITS)* inv_N_01 );
496 int frAx_R1=0, frAx_R2=0;
497 int frAy_R1 = frAcy01;
526 int last_insert_cy = -1;
530 if (last_insert_cy!=R1.cy)
532 last_insert_cy = R1.cy;
535 for (
int ccx=R1.cx;ccx<=R2.cx;ccx++)
536 updateCell_fast_free(ccx,R1.cy, logodd_observation, logodd_thres_free, theMapArray, theMapSize_x );
539 R1.frX += frAx_R1; R1.frY += frAy_R1;
545 }
while ( R1.cy < P1.
cy );
553 const int Acx12 = P2.
cx - P1.
cx;
554 const int Acy12 = P2.
cy - P1.
cy;
555 const int Acx1b2 = P2.
cx - P1b.
cx;
559 const float inv_N_12 = 1.0f / (
max3(abs(Acx12),abs(Acy12),abs(Acx1b2)) + 1 );
560 const int frAcx12 =
round( (Acx12<<
FRBITS) * inv_N_12 );
561 const int frAcy12 =
round( (Acy12<<
FRBITS) * inv_N_12 );
562 const int frAcx1b2 =
round((Acx1b2<<
FRBITS)* inv_N_12 );
602 if (last_insert_cy!=R1.cy)
605 last_insert_cy = R1.cy;
606 for (
int ccx=R1.cx;ccx<=R2.cx;ccx++)
607 updateCell_fast_free(ccx,R1.cy, logodd_observation, logodd_thres_free, theMapArray, theMapSize_x );
610 R1.frX += frAx_R1; R1.frY += frAy_R1;
616 }
while ( R1.cy <= P2.
cy );
630 P1.
x = px + cos(A-dA_2) * theR;
631 P1.
y = py + sin(A-dA_2) * theR;
633 P2.
x = px + cos(A+dA_2) * theR;
634 P2.
y = py + sin(A+dA_2) * theR;
636 P1.
cx = x2idx( P1.
x ); P1.
cy = y2idx( P1.
y );
637 P2.
cx = x2idx( P2.
x ); P2.
cy = y2idx( P2.
y );
639 #if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG) 641 ASSERT_( static_cast<unsigned int>(P1.
cx)<size_x && static_cast<unsigned int>(P1.
cy)<size_y );
642 ASSERT_( static_cast<unsigned int>(P2.
cx)<size_x && static_cast<unsigned int>(P2.
cy)<size_y );
648 updateCell_fast_occupied(P1.
cx,P1.
cy, logodd_observation_occupied, logodd_thres_occupied, theMapArray, theMapSize_x );
654 const int AcxE = P2.
cx - P1.
cx;
655 const int AcyE = P2.
cy - P1.
cy;
658 const int nSteps = ( max(abs(AcxE),abs(AcyE)) + 1 );
659 const float inv_N_12 = 1.0f / nSteps;
660 const int frAcxE =
round( (AcxE<<
FRBITS) * inv_N_12 );
661 const int frAcyE =
round( (AcyE<<
FRBITS) * inv_N_12 );
668 for (
int nStep=0;nStep<=nSteps;nStep++)
670 updateCell_fast_occupied(R1.cx,R1.cy, logodd_observation_occupied, logodd_thres_occupied, theMapArray, theMapSize_x );
700 CPose3D sensorPose3D = robotPose3D + spose;
701 CPose2D laserPose( sensorPose3D );
705 bool reallyInsert =
true;
706 unsigned int decimation = insertionOptions.decimation;
709 if ( insertionOptions.useMapAltitude &&
710 fabs(insertionOptions.mapAltitude - sensorPose3D.z() ) > 0.001 )
712 reallyInsert =
false;
725 const float maxDistanceInsertion = insertionOptions.maxDistanceInsertion;
726 const bool invalidAsFree = insertionOptions.considerInvalidRangesAsFreeSpace;
727 float new_x_max, new_x_min;
728 float new_y_max, new_y_min;
729 float last_valid_range = maxDistanceInsertion;
731 float maxCertainty = insertionOptions.maxOccupancyUpdateCertainty;
732 cellType logodd_observation = p2l(maxCertainty);
733 cellType logodd_observation_occupied = 3*logodd_observation;
736 if (logodd_observation<=0)
737 logodd_observation=1;
739 cellType logodd_thres_occupied = OCCGRID_CELLTYPE_MIN+logodd_observation_occupied;
740 cellType logodd_thres_free = OCCGRID_CELLTYPE_MAX-logodd_observation;
743 int K = updateInfoChangeOnly.enabled ? updateInfoChangeOnly.laserRaysSkip : decimation;
751 #if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG) 763 new_x_max = -(numeric_limits<float>::max)();
764 new_x_min = (numeric_limits<float>::max)();
765 new_y_max = -(numeric_limits<float>::max)();
766 new_y_min = (numeric_limits<float>::max)();
768 last_valid_range = maxDistanceInsertion;
770 for (idx=0;idx<nRanges;idx+=K)
772 float scanPoint_x,scanPoint_y;
773 if ( o->
sensedData[idx].sensedDistance < maxDistanceInsertion )
776 float R =
min(maxDistanceInsertion,curRange);
778 scanPoint_x = px + cos(A)*
R;
779 scanPoint_y = py + sin(A)*
R;
780 last_valid_range = curRange;
787 float R =
min(maxDistanceInsertion,0.5f*last_valid_range);
788 scanPoint_x = px + cos(A)*
R;
789 scanPoint_y = py + sin(A)*
R;
800 new_x_max = max( new_x_max, scanPoint_x );
801 new_x_min =
min( new_x_min, scanPoint_x );
802 new_y_max = max( new_y_max, scanPoint_y );
803 new_y_min =
min( new_y_min, scanPoint_y );
807 float securMargen = 15*resolution;
809 if (new_x_max>x_max-securMargen)
810 new_x_max+= 2*securMargen;
811 else new_x_max = x_max;
812 if (new_x_min<x_min+securMargen)
814 else new_x_min = x_min;
816 if (new_y_max>y_max-securMargen)
817 new_y_max+= 2*securMargen;
818 else new_y_max = y_max;
819 if (new_y_min<y_min+securMargen)
821 else new_y_min = y_min;
826 resizeGrid(new_x_min,new_x_max, new_y_min,new_y_max,0.5);
830 unsigned theMapSize_x = size_x;
846 last_valid_range = maxDistanceInsertion;
849 for (idx=0;idx<nRanges; idx+=K, A+=dAK)
852 if ( o->
sensedData[idx].sensedDistance < maxDistanceInsertion )
855 last_valid_range = curRange;
856 theR =
min(maxDistanceInsertion,curRange);
863 theR =
min(maxDistanceInsertion,0.5f*last_valid_range);
867 if (theR < resolution)
continue;
876 P1.
x = px + cos(A-dA_2) * theR;
877 P1.
y = py + sin(A-dA_2) * theR;
879 P2.
x = px + cos(A+dA_2) * theR;
880 P2.
y = py + sin(A+dA_2) * theR;
883 if (P2.
y<P1.
y) std::swap(P2,P1);
884 if (P2.
y<P0.
y) std::swap(P2,P0);
885 if (P1.
y<P0.
y) std::swap(P1,P0);
889 P0.
cx = x2idx( P0.
x ); P0.
cy = y2idx( P0.
y );
890 P1.
cx = x2idx( P1.
x ); P1.
cy = y2idx( P1.
y );
891 P2.
cx = x2idx( P2.
x ); P2.
cy = y2idx( P2.
y );
893 #if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG) 895 ASSERT_( static_cast<unsigned int>(P0.
cx)<size_x && static_cast<unsigned int>(P0.
cy)<size_y );
896 ASSERT_( static_cast<unsigned int>(P1.
cx)<size_x && static_cast<unsigned int>(P1.
cy)<size_y );
897 ASSERT_( static_cast<unsigned int>(P2.
cx)<size_x && static_cast<unsigned int>(P2.
cy)<size_y );
900 struct {
int frX,frY;
int cx,cy; } R1,R2;
909 for (
int ccx=min_cx;ccx<=max_cx;ccx++)
910 updateCell_fast_free(ccx,P0.
cy, logodd_observation, logodd_thres_free, theMapArray, theMapSize_x );
916 P1b.
x = P0.
x + (P1.
y-P0.
y) * (P2.
x-P0.
x) / (P2.
y-P0.
y);
918 P1b.
cx= x2idx( P1b.
x ); P1b.
cy= y2idx( P1b.
y );
923 const int Acx01 = P1.
cx - P0.
cx;
924 const int Acy01 = P1.
cy - P0.
cy;
925 const int Acx01b = P1b.
cx - P0.
cx;
929 const float inv_N_01 = 1.0f / (
max3(abs(Acx01),abs(Acy01),abs(Acx01b)) + 1 );
930 const int frAcx01 =
round( (Acx01<<
FRBITS) * inv_N_01 );
931 const int frAcy01 =
round( (Acy01<<
FRBITS) * inv_N_01 );
932 const int frAcx01b =
round((Acx01b<<
FRBITS)* inv_N_01 );
942 int frAx_R1=0, frAx_R2=0;
943 int frAy_R1 = frAcy01;
971 int last_insert_cy = -1;
975 if (last_insert_cy!=R1.cy)
977 last_insert_cy = R1.cy;
980 for (
int ccx=R1.cx;ccx<=R2.cx;ccx++)
981 updateCell_fast_free(ccx,R1.cy, logodd_observation, logodd_thres_free, theMapArray, theMapSize_x );
984 R1.frX += frAx_R1; R1.frY += frAy_R1;
990 }
while ( R1.cy < P1.
cy );
997 const int Acx12 = P2.
cx - P1.
cx;
998 const int Acy12 = P2.
cy - P1.
cy;
999 const int Acx1b2 = P2.
cx - P1b.
cx;
1003 const float inv_N_12 = 1.0f / (
max3(abs(Acx12),abs(Acy12),abs(Acx1b2)) + 1 );
1004 const int frAcx12 =
round( (Acx12<<
FRBITS) * inv_N_12 );
1005 const int frAcy12 =
round( (Acy12<<
FRBITS) * inv_N_12 );
1006 const int frAcx1b2 =
round((Acx1b2<<
FRBITS)* inv_N_12 );
1041 last_insert_cy=-100;
1046 if (last_insert_cy!=R1.cy)
1049 last_insert_cy = R1.cy;
1050 for (
int ccx=R1.cx;ccx<=R2.cx;ccx++)
1051 updateCell_fast_free(ccx,R1.cy, logodd_observation, logodd_thres_free, theMapArray, theMapSize_x );
1054 R1.frX += frAx_R1; R1.frY += frAy_R1;
1057 R1.cx = R1.frX >>
FRBITS;
1058 R1.cy = R1.frY >>
FRBITS;
1059 R2.cx = R2.frX >>
FRBITS;
1060 }
while ( R1.cy <= P2.
cy );
1070 if ( o->
sensedData[idx].sensedDistance < maxDistanceInsertion )
1074 P1.
x = px + cos(A-dA_2) * theR;
1075 P1.
y = py + sin(A-dA_2) * theR;
1077 P2.
x = px + cos(A+dA_2) * theR;
1078 P2.
y = py + sin(A+dA_2) * theR;
1080 P1.
cx = x2idx( P1.
x ); P1.
cy = y2idx( P1.
y );
1081 P2.
cx = x2idx( P2.
x ); P2.
cy = y2idx( P2.
y );
1083 #if defined(_DEBUG) || (MRPT_ALWAYS_CHECKS_DEBUG) 1085 ASSERT_( static_cast<unsigned int>(P1.
cx)<size_x && static_cast<unsigned int>(P1.
cy)<size_y );
1086 ASSERT_( static_cast<unsigned int>(P2.
cx)<size_x && static_cast<unsigned int>(P2.
cy)<size_y );
1092 updateCell_fast_occupied(P1.
cx,P1.
cy, logodd_observation_occupied, logodd_thres_occupied, theMapArray, theMapSize_x );
1098 const int AcxE = P2.
cx - P1.
cx;
1099 const int AcyE = P2.
cy - P1.
cy;
1102 const int nSteps = ( max(abs(AcxE),abs(AcyE)) + 1 );
1103 const float inv_N_12 = 1.0f / nSteps;
1104 const int frAcxE =
round( (AcxE<<
FRBITS) * inv_N_12 );
1105 const int frAcyE =
round( (AcyE<<
FRBITS) * inv_N_12 );
1112 for (
int nStep=0;nStep<=nSteps;nStep++)
1114 updateCell_fast_occupied(R1.cx,R1.cy, logodd_observation_occupied, logodd_thres_occupied, theMapArray, theMapSize_x );
1118 R1.cx = R1.frX >>
FRBITS;
1119 R1.cy = R1.frY >>
FRBITS;
1150 useMapAltitude ( false ),
1151 maxDistanceInsertion ( 15.0f ),
1152 maxOccupancyUpdateCertainty ( 0.65f ),
1153 considerInvalidRangesAsFreeSpace ( true ),
1155 horizontalTolerance (
DEG2RAD(0.05) ),
1157 CFD_features_gaussian_size ( 1 ),
1158 CFD_features_median_size ( 3 ),
1160 wideningBeamsWithDistance ( false )
1189 out.
printf(
"\n----------- [COccupancyGridMap2D::TInsertionOptions] ------------ \n\n");
double x() const
Common members of all points & poses classes.
Declares a class derived from "CObservation" that encapsules a single range measurement, and associated parameters.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
const T min3(const T &A, const T &B, const T &C)
Local stucture used in the next method (must be here for usage within STL stuff)
float sensorConeApperture
Cone aperture of each ultrasonic beam, in radians.
#define MRPT_CHECK_NORMAL_NUMBER(val)
#define LOADABLEOPTS_DUMP_VAR(variableName, variableType)
Macro for dumping a variable to a stream, within the method "dumpToTextStream(out)" (Variable types a...
virtual bool internal_insertObservation(const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose=NULL) MRPT_OVERRIDE
Insert the observation information into this map.
This class allows loading and storing values and vectors of different types from a configuration text...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
virtual const mrpt::utils::TRuntimeClassId * GetRuntimeClass() const
Returns information about the class of an object in runtime.
mrpt::math::CMatrixDouble44 getHomogeneousMatrixVal() const
bool isPlanarScan(const double tolerance=0) const
Return true if the laser scanner is "horizontal", so it has an absolute value of "pitch" and "roll" l...
This namespace contains representation of robot actions and observations.
mrpt::utils::ContainerReadOnlyProxyAccessor< std::vector< char > > validRange
It's false (=0) on no reflected rays, referenced to elements in scan.
GLsizei const GLchar ** string
#define mrpt_alloca(nBytes)
In platforms and compilers with support to "alloca", allocate a memory block on the stack; if alloca ...
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
#define CLASS_ID(class_name)
Access to runtime class ID for a defined class name.
#define MRPT_LOAD_CONFIG_VAR(variableName, variableType, configFileObject, sectionNameStr)
An useful macro for loading variables stored in a INI-like file under a key with the same name that t...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Declares a class that represents any robot's observation.
#define MRPT_LOAD_CONFIG_VAR_DEGREES(variableName, configFileObject, sectionNameStr)
Loads a double variable, stored as radians but entered in the INI-file as degrees.
const double & phi() const
Get the phi angle of the 2D pose (in radians)
bool m_is_empty
True upon construction; used by isEmpty()
float aperture
The "aperture" or field-of-view of the range finder, in radians (typically M_PI = 180 degrees)...
const T max3(const T &A, const T &B, const T &C)
int round(const T value)
Returns the closer integer (int) to x.
void dumpToTextStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE
This method should clearly display all the contents of the structure in textual form, sending it to a CStream.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string §ion) MRPT_OVERRIDE
This method load the options from a ".ini" file.
#define mrpt_alloca_free(mem_block)
This method must be called to "free" each memory block allocated with "system::alloca": If the block ...
mrpt::utils::ContainerReadOnlyProxyAccessor< std::vector< float > > scan
The range values of the scan, in meters. Must have same length than validRange.
TInsertionOptions()
Initilization of default parameters.
int16_t cellType
The type of the map cells:
mrpt::poses::CPose3D sensorPose
The 6D pose of the sensor on the robot at the moment of starting the scan.
TMeasurementList sensedData
All the measurements.
virtual int printf(const char *fmt,...) MRPT_printf_format_check(2
Writes a string to the stream in a textual form.
bool rightToLeft
The scanning direction: true=counterclockwise; false=clockwise.
virtual void OnPostSuccesfulInsertObs(const mrpt::obs::CObservation *) MRPT_OVERRIDE
See base class.