28 #ifndef CObservation3DRangeScan_H
29 #define CObservation3DRangeScan_H
49 template <
class POINTMAP>
121 bool m_points3D_external_stored;
122 std::
string m_points3D_external_file;
124 bool m_rangeImage_external_stored;
125 std::
string m_rangeImage_external_file;
129 virtual ~CObservation3DRangeScan( );
138 virtual
void load() const;
142 virtual
void unload();
182 template <class POINTMAP>
184 POINTMAP & dest_pointcloud,
185 const
bool takeIntoAccountSensorPoseOnRobot,
186 const mrpt::poses::
CPose3D *robotPoseInTheWorld=NULL,
187 const
bool PROJ3D_USE_LUT=true)
189 detail::project3DPointsFromDepthImageInto<POINTMAP>(*
this,dest_pointcloud,takeIntoAccountSensorPoseOnRobot,robotPoseInTheWorld,PROJ3D_USE_LUT);
227 void convertTo2DScan(
229 const std::string & sensorLabel,
230 const double angle_sup =
DEG2RAD(5),
231 const double angle_inf =
DEG2RAD(5),
232 const double oversampling_ratio = 1.2 );
241 void resizePoints3DVectors(
const size_t nPoints);
246 void points3D_getExternalStorageFileAbsolutePath(std::string &out_path)
const;
249 points3D_getExternalStorageFileAbsolutePath(tmp);
252 void points3D_convertToExternalStorage(
const std::string &fileName,
const std::string &use_this_base_dir );
259 void rangeImage_setSize(
const int HEIGHT,
const int WIDTH);
264 void rangeImage_getExternalStorageFileAbsolutePath(std::string &out_path)
const;
267 rangeImage_getExternalStorageFileAbsolutePath(tmp);
270 void rangeImage_convertToExternalStorage(
const std::string &fileName,
const std::string &use_this_base_dir );
302 bool doDepthAndIntensityCamerasCoincide()
const;
324 void getZoneAsObs(
CObservation3DRangeScan &obs,
const unsigned int &r1,
const unsigned int &r2,
const unsigned int &c1,
const unsigned int &c2 );
330 static double recoverCameraCalibrationParameters(
333 const double camera_offset = 0.01 );
350 using namespace ::mrpt::slam;
379 static const int HAS_RGB = 0;
380 static const int HAS_RGBf = 0;
381 static const int HAS_RGBu8 = 0;
386 inline size_t size()
const {
return m_obj.points3D_x.size(); }
389 if (N) m_obj.hasPoints3D =
true;
390 m_obj.resizePoints3DVectors(N);
394 template <
typename T>
395 inline void getPointXYZ(
const size_t idx, T &x,T &y, T &z)
const {
396 x=m_obj.points3D_x[idx];
397 y=m_obj.points3D_y[idx];
398 z=m_obj.points3D_z[idx];
402 m_obj.points3D_x[idx]=x;
403 m_obj.points3D_y[idx]=y;
404 m_obj.points3D_z[idx]=z;