MRPT
1.9.9
|
A 3D occupancy grid map with a regular, even distribution of voxels.
This is a faster alternative to COctoMap, but use with caution with limited map extensions, since it could easily exaust available memory.
Each voxel follows a Bernoulli probability distribution: a value of 0 means certainly occupied, 1 means a certainly empty voxel. Initially 0.5 means uncertainty.
Definition at line 33 of file COccupancyGridMap3D.h.
#include <mrpt/maps/COccupancyGridMap3D.h>
Classes | |
class | TInsertionOptions |
With this struct options are provided to the observation insertion process. More... | |
class | TLikelihoodOptions |
With this struct options are provided to the observation likelihood computation process. More... | |
struct | TMapDefinition |
struct | TMapDefinitionBase |
struct | TRenderingOptions |
Options for the conversion of a mrpt::maps::COccupancyGridMap3D into a mrpt::opengl::COctoMapVoxels. More... | |
Public Types | |
enum | TLikelihoodMethod { lmLikelihoodField_Thrun = 0, lmRayTracing } |
The type for selecting a likelihood computation method. More... | |
using | voxelType = OccGridCellTraits::cellType |
The type of the map voxels: More... | |
using | voxelTypeUnsigned = OccGridCellTraits::cellTypeUnsigned |
using | cell_t = OccGridCellTraits::cellType |
The type of cells. More... | |
using | traits_t = detail::logoddscell_traits< OccGridCellTraits::cellType > |
using | grid_t = mrpt::containers::CDynamicGrid3D< OccGridCellTraits::cellType > |
Public Member Functions | |
COccupancyGridMap3D (const mrpt::math::TPoint3D &corner_min={-5.0f, -5.0f, -5.0f}, const mrpt::math::TPoint3D &corner_max={5.0f, 5.0f, 5.0f}, float resolution=0.25f) | |
Constructor. More... | |
void | fill (float default_value=0.5f) |
Fills all the voxels with a default value. More... | |
void | setSize (const mrpt::math::TPoint3D &corner_min, const mrpt::math::TPoint3D &corner_max, float resolution, float default_value=0.5f) |
Change the size of gridmap, erasing all its previous contents. More... | |
void | resizeGrid (const mrpt::math::TPoint3D &corner_min, const mrpt::math::TPoint3D &corner_max, float new_voxels_default_value=0.5f) |
Change the size of gridmap, maintaining previous contents. More... | |
void | updateCell (int cx_idx, int cy_idx, int cz_idx, float v) |
Performs the Bayesian fusion of a new observation of a cell. More... | |
void | setCellFreeness (unsigned int cx, unsigned int cy, unsigned int cz, float value) |
Change the contents [0,1] (0:occupied, 1:free) of a voxel, given its index. More... | |
float | getCellFreeness (unsigned int cx, unsigned int cy, unsigned int cz) const |
Read the real valued [0,1] (0:occupied, 1:free) contents of a voxel, given its index. More... | |
void | setFreenessByPos (float x, float y, float z, float value) |
Change the contents [0,1] of a voxel, given its coordinates. More... | |
float | getFreenessByPos (float x, float y, float z) const |
Read the real valued [0,1] contents of a voxel, given its coordinates. More... | |
void | insertRay (const mrpt::math::TPoint3D &sensor, const mrpt::math::TPoint3D &end, bool endIsOccupied=true) |
Increases the freeness of a ray segment, and the occupancy of the voxel at its end point (unless endIsOccupied=false). More... | |
void | insertPointCloud (const mrpt::math::TPoint3D &sensorCenter, const mrpt::maps::CPointsMap &pts, const float maxValidRange=std::numeric_limits< float >::max()) |
Calls insertRay() for each point in the point cloud, using as sensor central point (the origin of all rays), the given sensorCenter . More... | |
void | getAsOctoMapVoxels (mrpt::opengl::COctoMapVoxels &gl_obj) const |
void | getAs3DObject (mrpt::opengl::CSetOfObjects::Ptr &outObj) const override |
Returns a 3D object representing the map. More... | |
void | simulateScanRay (const double x, const double y, const double angle_direction, float &out_range, bool &out_valid, const double max_range_meters, const float threshold_free=0.4f, const double noiseStd=.0, const double angleNoiseStd=.0) const |
Simulate just one "ray" in the grid map. More... | |
double | computeLikelihoodField_Thrun (const CPointsMap &pm, const mrpt::poses::CPose3D &relativePose=mrpt::poses::CPose3D()) |
Computes the likelihood [0,1] of a set of points, given the current grid map as reference. More... | |
bool | isEmpty () const override |
Returns true upon map construction or after calling clear(), the return changes to false upon successful insertObservation() or any other method to load data in the map. More... | |
void | determineMatching2D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose2D &otherMapPose, mrpt::tfest::TMatchingPairList &correspondences, const TMatchingParams ¶ms, TMatchingExtraResults &extraResults) const override |
See docs in base class: in this class this always returns 0. More... | |
float | compute3DMatchingRatio (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, const TMatchingRatioParams ¶ms) const override |
See docs in base class: in this class this always returns 0. More... | |
void | saveMetricMapRepresentationToFile (const std::string &f) const override |
This virtual method saves the map to a file "filNamePrefix"+< some_file_extension >, as an image or in any other applicable way (Notice that other methods to save the map may be implemented in classes implementing this virtual interface). More... | |
void | clear () |
Erase all the contents of the map. More... | |
void | loadFromProbabilisticPosesAndObservations (const mrpt::maps::CSimpleMap &Map) |
Load the map contents from a CSimpleMap object, erasing all previous content of the map. More... | |
void | loadFromSimpleMap (const mrpt::maps::CSimpleMap &Map) |
! More... | |
bool | insertObservation (const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D *robotPose=nullptr) |
Insert the observation information into this map. More... | |
bool | insertObservationPtr (const mrpt::obs::CObservation::Ptr &obs, const mrpt::poses::CPose3D *robotPose=nullptr) |
A wrapper for smart pointers, just calls the non-smart pointer version. More... | |
double | computeObservationLikelihood (const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D &takenFrom) |
Computes the log-likelihood of a given observation given an arbitrary robot 3D pose. More... | |
double | computeObservationLikelihood (const mrpt::obs::CObservation &obs, const mrpt::poses::CPose2D &takenFrom) |
virtual bool | canComputeObservationLikelihood (const mrpt::obs::CObservation &obs) const |
Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. More... | |
double | computeObservationsLikelihood (const mrpt::obs::CSensoryFrame &sf, const mrpt::poses::CPose2D &takenFrom) |
Returns the sum of the log-likelihoods of each individual observation within a mrpt::obs::CSensoryFrame. More... | |
bool | canComputeObservationsLikelihood (const mrpt::obs::CSensoryFrame &sf) const |
Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. More... | |
virtual void | determineMatching3D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, mrpt::tfest::TMatchingPairList &correspondences, const TMatchingParams ¶ms, TMatchingExtraResults &extraResults) const |
Computes the matchings between this and another 3D points map - method used in 3D-ICP. More... | |
virtual void | auxParticleFilterCleanUp () |
This method is called at the end of each "prediction-update-map
insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation". More... | |
virtual float | squareDistanceToClosestCorrespondence (float x0, float y0) const |
Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map. More... | |
virtual const mrpt::maps::CSimplePointsMap * | getAsSimplePointsMap () const |
If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points map, return it. More... | |
mrpt::maps::CSimplePointsMap * | getAsSimplePointsMap () |
virtual mxArray * | writeToMatlab () const |
Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More... | |
void | updateCell_fast_occupied (const unsigned x, const unsigned y, const unsigned z, const cell_t logodd_obs, const cell_t thres) |
Performs Bayesian fusion of a new observation of a cell. More... | |
void | updateCell_fast_free (const unsigned x, const unsigned y, const unsigned z, const cell_t logodd_obs, const cell_t thres) |
Performs the Bayesian fusion of a new observation of a cell. More... | |
RTTI classes and functions for polymorphic hierarchies | |
mrpt::rtti::CObject::Ptr | duplicateGetSmartPtr () const |
Makes a deep copy of the object and returns a smart pointer to it. More... | |
Static Public Member Functions | |
static float | l2p (const voxelType l) |
Scales an integer representation of the log-odd into a real valued probability in [0,1], using p=exp(l)/(1+exp(l)) More... | |
static uint8_t | l2p_255 (const voxelType l) |
Scales an integer representation of the log-odd into a linear scale [0,255], using p=exp(l)/(1+exp(l)) More... | |
static voxelType | p2l (const float p) |
Scales a real valued probability in [0,1] to an integer representation of: log(p)-log(1-p) in the valid range of voxelType. More... | |
static void | updateCell_fast_occupied (cell_t *theCell, const cell_t logodd_obs, const cell_t thres) |
Performs Bayesian fusion of a new observation of a cell. More... | |
static void | updateCell_fast_free (cell_t *theCell, const cell_t logodd_obs, const cell_t thres) |
Performs Bayesian fusion of a new observation of a cell. More... | |
Public Attributes | |
TInsertionOptions | insertionOptions |
With this struct options are provided to the observation insertion process. More... | |
TLikelihoodOptions | likelihoodOptions |
TRenderingOptions | renderingOptions |
TMapGenericParams | genericMapParams |
Common params to all maps. More... | |
grid_t | m_grid |
The actual 3D voxels container. More... | |
Protected Member Functions | |
void | OnPostSuccesfulInsertObs (const mrpt::obs::CObservation &) override |
See base class. More... | |
void | internal_clear () override |
Clear the map: It set all voxels to their default occupancy value (0.5), without changing the resolution (the grid extension is reset to the default values). More... | |
bool | internal_insertObservation (const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D *robotPose=nullptr) override |
Insert the observation information into this map. More... | |
void | internal_insertObservationScan2D (const mrpt::obs::CObservation2DRangeScan &o, const mrpt::poses::CPose3D &robotPose) |
void | internal_insertObservationScan3D (const mrpt::obs::CObservation3DRangeScan &o, const mrpt::poses::CPose3D &robotPose) |
void | publishEvent (const mrptEvent &e) const |
Called when you want this object to emit an event to all the observers currently subscribed to this object. More... | |
bool | hasSubscribers () const |
Can be called by a derived class before preparing an event for publishing with publishEvent to determine if there is no one subscribed, so it can save the wasted time preparing an event that will be not read. More... | |
CSerializable virtual methods | |
uint8_t | serializeGetVersion () const override |
Must return the current versioning number of the object. More... | |
void | serializeTo (mrpt::serialization::CArchive &out) const override |
Pure virtual method for writing (serializing) to an abstract archive. More... | |
void | serializeFrom (mrpt::serialization::CArchive &in, uint8_t serial_version) override |
Pure virtual method for reading (deserializing) from an abstract archive. More... | |
CSerializable virtual methods | |
virtual void | serializeTo (CSchemeArchiveBase &out) const |
Virtual method for writing (serializing) to an abstract schema based archive. More... | |
virtual void | serializeFrom (CSchemeArchiveBase &in) |
Virtual method for reading (deserializing) from an abstract schema based archive. More... | |
Static Protected Member Functions | |
static CLogOddsGridMapLUT< voxelType > & | get_logodd_lut () |
Lookup tables for log-odds. More... | |
Protected Attributes | |
bool | m_is_empty {true} |
True upon construction; used by isEmpty() More... | |
Private Member Functions | |
double | internal_computeObservationLikelihood (const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D &takenFrom) override |
Internal method called by computeObservationLikelihood() More... | |
bool | internal_canComputeObservationLikelihood (const mrpt::obs::CObservation &obs) const override |
Internal method called by canComputeObservationLikelihood() More... | |
RTTI stuff | |
using | Ptr = std::shared_ptr< COccupancyGridMap3D > |
using | ConstPtr = std::shared_ptr< const COccupancyGridMap3D > |
using | UniquePtr = std::unique_ptr< COccupancyGridMap3D > |
using | ConstUniquePtr = std::unique_ptr< const COccupancyGridMap3D > |
static mrpt::rtti::CLASSINIT | _init_COccupancyGridMap3D |
static const mrpt::rtti::TRuntimeClassId | runtimeClassId |
static constexpr const char * | className = "COccupancyGridMap3D" |
static const mrpt::rtti::TRuntimeClassId * | _GetBaseClass () |
static constexpr auto | getClassName () |
static const mrpt::rtti::TRuntimeClassId & | GetRuntimeClassIdStatic () |
static std::shared_ptr< CObject > | CreateObject () |
template<typename... Args> | |
static Ptr | Create (Args &&... args) |
template<typename Alloc , typename... Args> | |
static Ptr | CreateAlloc (const Alloc &alloc, Args &&... args) |
template<typename... Args> | |
static UniquePtr | CreateUnique (Args &&... args) |
virtual const mrpt::rtti::TRuntimeClassId * | GetRuntimeClass () const override |
Returns information about the class of an object in runtime. More... | |
virtual mrpt::rtti::CObject * | clone () const override |
Returns a deep copy (clone) of the object, indepently of its class. More... | |
Map Definition Interface stuff (see * mrpt::maps::TMetricMapInitializer) @{ | |
static const size_t | m_private_map_register_id = mrpt::maps::internal::TMetricMapTypesRegistry::Instance().doRegister( "COccupancyGridMap3D" , & mrpt::maps::COccupancyGridMap3D ::MapDefinition, & mrpt::maps::COccupancyGridMap3D ::internal_CreateFromMapDefinition) |
ID used to initialize class registration (just ignore it) More... | |
static mrpt::maps::TMetricMapInitializer * | MapDefinition () |
Returns default map definition initializer. More... | |
static COccupancyGridMap3D * | CreateFromMapDefinition (const mrpt::maps::TMetricMapInitializer &def) |
Constructor from a map definition structure: initializes the map and * its parameters accordingly. More... | |
static mrpt::maps::CMetricMap * | internal_CreateFromMapDefinition (const mrpt::maps::TMetricMapInitializer &def) |
|
inherited |
The type of cells.
Definition at line 30 of file CLogOddsGridMap3D.h.
Definition at line 37 of file COccupancyGridMap3D.h.
using mrpt::maps::COccupancyGridMap3D::ConstUniquePtr = std::unique_ptr<const COccupancyGridMap3D > |
Definition at line 37 of file COccupancyGridMap3D.h.
|
inherited |
Definition at line 32 of file CLogOddsGridMap3D.h.
A type for the associated smart pointer
Definition at line 37 of file COccupancyGridMap3D.h.
|
inherited |
Definition at line 31 of file CLogOddsGridMap3D.h.
using mrpt::maps::COccupancyGridMap3D::UniquePtr = std::unique_ptr< COccupancyGridMap3D > |
Definition at line 37 of file COccupancyGridMap3D.h.
The type of the map voxels:
Definition at line 40 of file COccupancyGridMap3D.h.
Definition at line 41 of file COccupancyGridMap3D.h.
The type for selecting a likelihood computation method.
Enumerator | |
---|---|
lmLikelihoodField_Thrun | |
lmRayTracing |
Definition at line 246 of file COccupancyGridMap3D.h.
COccupancyGridMap3D::COccupancyGridMap3D | ( | const mrpt::math::TPoint3D & | corner_min = {-5.0f, -5.0f, -5.0f} , |
const mrpt::math::TPoint3D & | corner_max = {5.0f, 5.0f, 5.0f} , |
||
float | resolution = 0.25f |
||
) |
Constructor.
Definition at line 88 of file COccupancyGridMap3D.cpp.
References MRPT_END, MRPT_START, mrpt::maps::COccupancyGridMap3D::TMapDefinition::resolution, and setSize().
Referenced by internal_CreateFromMapDefinition().
|
staticprotected |
|
inlinevirtualinherited |
This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation".
This method should normally do nothing, but in some cases can be used to free auxiliary cached variables.
Reimplemented in mrpt::maps::CLandmarksMap, and mrpt::maps::CMultiMetricMap.
Definition at line 283 of file CMetricMap.h.
|
virtualinherited |
Returns true if this map is able to compute a sensible likelihood function for this observation (i.e.
an occupancy grid map cannot with an image). See: Maps and observations compatibility matrix
obs | The observation. |
Definition at line 172 of file CMetricMap.cpp.
|
inherited |
Returns true if this map is able to compute a sensible likelihood function for this observation (i.e.
an occupancy grid map cannot with an image). See: Maps and observations compatibility matrix
sf | The observations. |
Definition at line 85 of file CMetricMap.cpp.
References mrpt::obs::CSensoryFrame::begin(), and mrpt::obs::CSensoryFrame::end().
|
inherited |
Erase all the contents of the map.
Definition at line 30 of file CMetricMap.cpp.
Referenced by mrpt::maps::CHeightGridMap2D_MRF::CHeightGridMap2D_MRF(), mrpt::maps::CReflectivityGridMap2D::clear(), mrpt::maps::CHeightGridMap2D::clear(), mrpt::maps::CRandomFieldGridMap2D::clear(), mrpt::maps::CPointsMap::extractCylinder(), mrpt::maps::CPointsMap::extractPoints(), mrpt::opengl::CAngularObservationMesh::generatePointCloud(), mrpt::maps::COccupancyGridMap2D::getAsPointCloud(), mrpt::opengl::CPlanarLaserScan::getBoundingBox(), mrpt::nav::CReactiveNavigationSystem3D::loggingGetWSObstaclesAndShape(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::prediction_and_update_pfOptimalProposal(), mrpt::vision::projectMatchedFeatures(), mrpt::opengl::CPlanarLaserScan::render_dl(), run_rnav_test(), mrpt::maps::CPointsMap::setFromPCLPointCloud(), mrpt::maps::CColouredPointsMap::setFromPCLPointCloudRGB(), mrpt::maps::CPointsMapXYZI::setFromPCLPointCloudXYZI(), mrpt::maps::CRandomFieldGridMap2D::setSize(), and mrpt::nav::PlannerTPS_VirtualBase::transformPointcloudWithSquareClipping().
|
overridevirtual |
Returns a deep copy (clone) of the object, indepently of its class.
Implements mrpt::rtti::CObject.
|
overridevirtual |
See docs in base class: in this class this always returns 0.
Reimplemented from mrpt::maps::CMetricMap.
Definition at line 204 of file COccupancyGridMap3D.cpp.
References MRPT_UNUSED_PARAM, and THROW_EXCEPTION.
double mrpt::maps::COccupancyGridMap3D::computeLikelihoodField_Thrun | ( | const CPointsMap & | pm, |
const mrpt::poses::CPose3D & | relativePose = mrpt::poses::CPose3D() |
||
) |
Computes the likelihood [0,1] of a set of points, given the current grid map as reference.
pm | The points map |
relativePose | The relative pose of the points map in this map's coordinates, or nullptr for (0,0,0). See "likelihoodOptions" for configuration parameters. |
|
inherited |
Computes the log-likelihood of a given observation given an arbitrary robot 3D pose.
See: Maps and observations compatibility matrix
takenFrom | The robot's pose the observation is supposed to be taken from. |
obs | The observation. |
Definition at line 181 of file CMetricMap.cpp.
Referenced by mrpt::maps::CMultiMetricMapPDF::PF_SLAM_computeObservationLikelihoodForParticle().
|
inherited |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 76 of file CMetricMap.cpp.
|
inherited |
Returns the sum of the log-likelihoods of each individual observation within a mrpt::obs::CSensoryFrame.
See: Maps and observations compatibility matrix
takenFrom | The robot's pose the observation is supposed to be taken from. |
sf | The set of observations in a CSensoryFrame. |
Definition at line 66 of file CMetricMap.cpp.
Referenced by mrpt::hmtslam::CLSLAM_RBPF_2DLASER::auxiliarComputeObservationLikelihood().
|
inlinestatic |
Definition at line 37 of file COccupancyGridMap3D.h.
|
inlinestatic |
Definition at line 37 of file COccupancyGridMap3D.h.
|
static |
Constructor from a map definition structure: initializes the map and * its parameters accordingly.
Definition at line 23 of file COccupancyGridMap3D.cpp.
|
static |
|
inlinestatic |
Definition at line 37 of file COccupancyGridMap3D.h.
|
overridevirtual |
See docs in base class: in this class this always returns 0.
Reimplemented from mrpt::maps::CMetricMap.
Definition at line 188 of file COccupancyGridMap3D.cpp.
References MRPT_END, MRPT_START, and THROW_EXCEPTION.
|
virtualinherited |
Computes the matchings between this and another 3D points map - method used in 3D-ICP.
This method finds the set of point pairs in each map.
The method is the most time critical one into ICP-like algorithms.
The algorithm is:
otherMap | [IN] The other map to compute the matching with. |
otherMapPose | [IN] The pose of the other map as seen from "this". |
params | [IN] Parameters for the determination of pairings. |
correspondences | [OUT] The detected matchings pairs. |
extraResults | [OUT] Other results. |
Reimplemented in mrpt::maps::CPointsMap.
Definition at line 134 of file CMetricMap.cpp.
References MRPT_END, MRPT_START, MRPT_UNUSED_PARAM, and THROW_EXCEPTION.
Referenced by mrpt::slam::CICP::ICP3D_Method_Classic().
|
inlineinherited |
Makes a deep copy of the object and returns a smart pointer to it.
Definition at line 200 of file CObject.h.
References mrpt::rtti::CObject::clone().
Referenced by mrpt::obs::CRawlog::addActions(), and mrpt::obs::CRawlog::addObservations().
void COccupancyGridMap3D::fill | ( | float | default_value = 0.5f | ) |
Fills all the voxels with a default value.
Definition at line 151 of file COccupancyGridMap3D.cpp.
References mrpt::containers::CDynamicGrid3D< T, coord_t >::fill(), mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, and p2l().
|
staticprotected |
Lookup tables for log-odds.
Definition at line 83 of file COccupancyGridMap3D.cpp.
References logodd_lut.
Referenced by l2p(), l2p_255(), and p2l().
|
overridevirtual |
Returns a 3D object representing the map.
Implements mrpt::maps::CMetricMap.
Definition at line 360 of file COccupancyGridMap3D.cpp.
References mrpt::opengl::COctoMapVoxels::Create(), and getAsOctoMapVoxels().
void COccupancyGridMap3D::getAsOctoMapVoxels | ( | mrpt::opengl::COctoMapVoxels & | gl_obj | ) | const |
Definition at line 216 of file COccupancyGridMap3D.cpp.
References mrpt::opengl::COctoMapVoxels::clear(), mrpt::maps::COccupancyGridMap3D::TRenderingOptions::generateFreeVoxels, mrpt::maps::COccupancyGridMap3D::TRenderingOptions::generateGridLines, mrpt::maps::COccupancyGridMap3D::TRenderingOptions::generateOccupiedVoxels, getCellFreeness(), mrpt::opengl::CRenderizable::getColor(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getResolutionXY(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getResolutionZ(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getSizeX(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getSizeY(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getSizeZ(), mrpt::opengl::COctoMapVoxels::getVisualizationMode(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getXMax(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getXMin(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getYMax(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getYMin(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getZMax(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getZMin(), mrpt::containers::CDynamicGrid3D< T, coord_t >::idx2x(), mrpt::containers::CDynamicGrid3D< T, coord_t >::idx2y(), mrpt::containers::CDynamicGrid3D< T, coord_t >::idx2z(), mrpt::opengl::COctoMapVoxels::isCubeTransparencyEnabled(), mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, MRPT_END, MRPT_START, mrpt::opengl::COctoMapVoxels::push_back_GridCube(), mrpt::opengl::COctoMapVoxels::push_back_Voxel(), renderingOptions, mrpt::opengl::COctoMapVoxels::reserveGridCubes(), mrpt::opengl::COctoMapVoxels::reserveVoxels(), mrpt::opengl::COctoMapVoxels::resizeVoxelSets(), mrpt::opengl::COctoMapVoxels::setBoundingBox(), mrpt::opengl::COctoMapVoxels::showVoxels(), mrpt::opengl::COctoMapVoxels::sort_voxels_by_z(), THROW_EXCEPTION, mrpt::maps::COccupancyGridMap3D::TRenderingOptions::visibleFreeVoxels, mrpt::maps::COccupancyGridMap3D::TRenderingOptions::visibleOccupiedVoxels, mrpt::opengl::VOXEL_SET_FREESPACE, and mrpt::opengl::VOXEL_SET_OCCUPIED.
Referenced by getAs3DObject().
|
inlinevirtualinherited |
If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points map, return it.
Otherwise, return nullptr
Reimplemented in mrpt::maps::CMultiMetricMap, and mrpt::maps::CSimplePointsMap.
Definition at line 296 of file CMetricMap.h.
Referenced by mrpt::maps::CPointsMap::compute3DMatchingRatio(), and mrpt::maps::CMetricMap::getAsSimplePointsMap().
|
inlineinherited |
Definition at line 300 of file CMetricMap.h.
References mrpt::maps::CMetricMap::getAsSimplePointsMap().
|
inline |
Read the real valued [0,1] (0:occupied, 1:free) contents of a voxel, given its index.
Definition at line 145 of file COccupancyGridMap3D.h.
References mrpt::containers::CDynamicGrid3D< T, coord_t >::cellByIndex(), l2p(), and mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid.
Referenced by getAsOctoMapVoxels(), and getFreenessByPos().
|
inlinestatic |
Definition at line 37 of file COccupancyGridMap3D.h.
|
inline |
Read the real valued [0,1] contents of a voxel, given its coordinates.
Definition at line 162 of file COccupancyGridMap3D.h.
References getCellFreeness(), mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, mrpt::containers::CDynamicGrid3D< T, coord_t >::x2idx(), mrpt::containers::CDynamicGrid3D< T, coord_t >::y2idx(), and mrpt::containers::CDynamicGrid3D< T, coord_t >::z2idx().
Referenced by TEST().
|
overridevirtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::maps::CMetricMap.
|
static |
|
inlineprotectedinherited |
Can be called by a derived class before preparing an event for publishing with publishEvent to determine if there is no one subscribed, so it can save the wasted time preparing an event that will be not read.
Definition at line 53 of file CObservable.h.
References mrpt::system::CObservable::m_subscribers.
Referenced by mrpt::gui::CWindowDialog::OnMouseDown(), mrpt::gui::CWindowDialog::OnMouseMove(), mrpt::gui::CWindowDialog::OnResize(), and mrpt::opengl::COpenGLViewport::render().
|
inherited |
Insert the observation information into this map.
This method must be implemented in derived classes. See: Maps and observations compatibility matrix
obs | The observation |
robotPose | The 3D pose of the robot mobile base in the map reference system, or NULL (default) if you want to use the origin. |
Definition at line 93 of file CMetricMap.cpp.
Referenced by ICPTests::align2scans(), mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_likelihoodField_Thrun(), mrpt::opengl::CPlanarLaserScan::getBoundingBox(), mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::getICPEdge(), CAngularObservationMesh_fnctr::operator()(), mrpt::opengl::CPlanarLaserScan::render_dl(), TEST(), and mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::updateMapVisualization().
|
inherited |
A wrapper for smart pointers, just calls the non-smart pointer version.
See: Maps and observations compatibility matrix
Definition at line 107 of file CMetricMap.cpp.
References MRPT_END, MRPT_START, and THROW_EXCEPTION.
Referenced by mrpt::slam::CMetricMapBuilderICP::processObservation().
void COccupancyGridMap3D::insertPointCloud | ( | const mrpt::math::TPoint3D & | sensorCenter, |
const mrpt::maps::CPointsMap & | pts, | ||
const float | maxValidRange = std::numeric_limits<float>::max() |
||
) |
Calls insertRay() for each point in the point cloud, using as sensor central point (the origin of all rays), the given sensorCenter
.
[in] | maxValidRange | If a point has larger distance from sensorCenter than maxValidRange , it will be considered a non-echo, and NO occupied voxel will be created at the end of the segment. |
Definition at line 73 of file COccupancyGridMap3D_insert.cpp.
References mrpt::maps::COccupancyGridMap3D::TInsertionOptions::decimation, mrpt::maps::CPointsMap::getPointsBufferRef_x(), mrpt::maps::CPointsMap::getPointsBufferRef_y(), mrpt::maps::CPointsMap::getPointsBufferRef_z(), insertionOptions, insertRay(), MRPT_END, and MRPT_START.
Referenced by internal_insertObservationScan2D(), and internal_insertObservationScan3D().
void COccupancyGridMap3D::insertRay | ( | const mrpt::math::TPoint3D & | sensor, |
const mrpt::math::TPoint3D & | end, | ||
bool | endIsOccupied = true |
||
) |
Increases the freeness of a ray segment, and the occupancy of the voxel at its end point (unless endIsOccupied=false).
Normally, users would prefer the higher-level method CMetricMap::insertObservation()
Definition at line 115 of file COccupancyGridMap3D_insert.cpp.
References FRBITS, insertionOptions, mrpt::containers::CDynamicGrid3D< T, coord_t >::isOutOfBounds(), mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, mrpt::max3(), mrpt::maps::COccupancyGridMap3D::TInsertionOptions::maxFreenessUpdateCertainty, mrpt::maps::COccupancyGridMap3D::TInsertionOptions::maxOccupancyUpdateCertainty, MRPT_END, MRPT_START, p2l(), mrpt::round(), mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::updateCell_fast_free(), mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::updateCell_fast_occupied(), mrpt::math::TPoint3D_data::x, mrpt::containers::CDynamicGrid3D< T, coord_t >::x2idx(), mrpt::math::TPoint3D_data::y, mrpt::containers::CDynamicGrid3D< T, coord_t >::y2idx(), mrpt::math::TPoint3D_data::z, and mrpt::containers::CDynamicGrid3D< T, coord_t >::z2idx().
Referenced by insertPointCloud().
|
overrideprivatevirtual |
Internal method called by canComputeObservationLikelihood()
Reimplemented from mrpt::maps::CMetricMap.
Definition at line 25 of file COccupancyGridMap3D_likelihood.cpp.
|
overrideprotectedvirtual |
Clear the map: It set all voxels to their default occupancy value (0.5), without changing the resolution (the grid extension is reset to the default values).
Implements mrpt::maps::CMetricMap.
Definition at line 138 of file COccupancyGridMap3D.cpp.
References mrpt::containers::CDynamicGrid3D< T, coord_t >::getResolutionXY(), mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, m_is_empty, mrpt::maps::COccupancyGridMap3D::TMapDefinition::max_x, mrpt::maps::COccupancyGridMap3D::TMapDefinition::max_y, mrpt::maps::COccupancyGridMap3D::TMapDefinition::max_z, mrpt::maps::COccupancyGridMap3D::TMapDefinition::min_x, mrpt::maps::COccupancyGridMap3D::TMapDefinition::min_y, mrpt::maps::COccupancyGridMap3D::TMapDefinition::min_z, and setSize().
|
overrideprivatevirtual |
Internal method called by computeObservationLikelihood()
Implements mrpt::maps::CMetricMap.
Definition at line 18 of file COccupancyGridMap3D_likelihood.cpp.
References THROW_EXCEPTION.
|
static |
Definition at line 64 of file COccupancyGridMap3D.cpp.
References COccupancyGridMap3D().
|
overrideprotectedvirtual |
Insert the observation information into this map.
obs | The observation |
robotPose | The 3D pose of the robot mobile base in the map reference system, or nullptr (default) if you want to use CPose2D(0,0,deg) |
Implements mrpt::maps::CMetricMap.
Definition at line 23 of file COccupancyGridMap3D_insert.cpp.
References internal_insertObservationScan2D(), internal_insertObservationScan3D(), MRPT_END, and MRPT_START.
|
protected |
Definition at line 49 of file COccupancyGridMap3D_insert.cpp.
References mrpt::maps::CPointsMap::insertionOptions, insertPointCloud(), MRPT_END, MRPT_START, and mrpt::obs::CObservation2DRangeScan::sensorPose.
Referenced by internal_insertObservation().
|
protected |
Definition at line 93 of file COccupancyGridMap3D_insert.cpp.
References mrpt::obs::T3DPointsProjectionParams::decimation, mrpt::maps::COccupancyGridMap3D::TInsertionOptions::decimation_3d_range, insertionOptions, insertPointCloud(), mrpt::obs::CObservation3DRangeScan::maxRange, MRPT_END, MRPT_START, mrpt::obs::detail::project3DPointsFromDepthImageInto(), mrpt::obs::CObservation3DRangeScan::sensorPose, and mrpt::obs::T3DPointsProjectionParams::takeIntoAccountSensorPoseOnRobot.
Referenced by internal_insertObservation().
|
overridevirtual |
Returns true upon map construction or after calling clear(), the return changes to false upon successful insertObservation() or any other method to load data in the map.
Implements mrpt::maps::CMetricMap.
Definition at line 202 of file COccupancyGridMap3D.cpp.
References m_is_empty.
|
inlinestatic |
Scales an integer representation of the log-odd into a real valued probability in [0,1], using p=exp(l)/(1+exp(l))
Definition at line 113 of file COccupancyGridMap3D.h.
References get_logodd_lut().
Referenced by getCellFreeness().
Scales an integer representation of the log-odd into a linear scale [0,255], using p=exp(l)/(1+exp(l))
Definition at line 119 of file COccupancyGridMap3D.h.
References get_logodd_lut().
|
inherited |
Load the map contents from a CSimpleMap object, erasing all previous content of the map.
This is done invoking insertObservation()
for each observation at the mean 3D robot pose of each pose-observations pair in the CSimpleMap object.
std::exception | Some internal steps in invoked methods can raise exceptions on invalid parameters, etc... |
Definition at line 36 of file CMetricMap.cpp.
References ASSERTMSG_, mrpt::containers::clear(), mrpt::maps::CSimpleMap::get(), and mrpt::maps::CSimpleMap::size().
Referenced by mrpt::maps::CMetricMap::loadFromSimpleMap(), and run_test_pf_localization().
|
inlineinherited |
!
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 107 of file CMetricMap.h.
References mrpt::maps::CMetricMap::loadFromProbabilisticPosesAndObservations().
Referenced by mrpt::maps::CRandomFieldGridMap2D::internal_clear().
|
static |
Returns default map definition initializer.
See * mrpt::maps::TMetricMapInitializer
Definition at line 23 of file COccupancyGridMap3D.cpp.
|
overrideprotectedvirtual |
See base class.
Reimplemented from mrpt::maps::CMetricMap.
Definition at line 203 of file COccupancyGridMap3D_insert.cpp.
References m_is_empty.
|
inlinestatic |
Scales a real valued probability in [0,1] to an integer representation of: log(p)-log(1-p) in the valid range of voxelType.
Definition at line 125 of file COccupancyGridMap3D.h.
References get_logodd_lut().
Referenced by fill(), insertRay(), resizeGrid(), setCellFreeness(), setSize(), and updateCell().
Called when you want this object to emit an event to all the observers currently subscribed to this object.
Definition at line 48 of file CObservable.cpp.
References MRPT_END, and MRPT_START.
Referenced by mrpt::gui::CDisplayWindow3D::internal_emitGrabImageEvent(), mrpt::gui::CWindowDialog::OnChar(), mrpt::gui::CWindowDialog::OnClose(), mrpt::gui::C3DWindowDialog::OnClose(), mrpt::gui::CWindowDialog::OnMouseDown(), mrpt::gui::CWindowDialog::OnMouseMove(), mrpt::gui::CWindowDialog::OnResize(), mrpt::gui::C3DWindowDialog::OnResize(), and mrpt::opengl::COpenGLViewport::render().
void COccupancyGridMap3D::resizeGrid | ( | const mrpt::math::TPoint3D & | corner_min, |
const mrpt::math::TPoint3D & | corner_max, | ||
float | new_voxels_default_value = 0.5f |
||
) |
Change the size of gridmap, maintaining previous contents.
new_voxels_default_value | Value of new voxels, tipically 0.5 |
Definition at line 120 of file COccupancyGridMap3D.cpp.
References mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, m_is_empty, MRPT_END, MRPT_START, p2l(), mrpt::containers::CDynamicGrid3D< T, coord_t >::resize(), mrpt::math::TPoint3D_data::x, mrpt::math::TPoint3D_data::y, and mrpt::math::TPoint3D_data::z.
|
overridevirtual |
This virtual method saves the map to a file "filNamePrefix"+< some_file_extension >, as an image or in any other applicable way (Notice that other methods to save the map may be implemented in classes implementing this virtual interface).
Implements mrpt::maps::CMetricMap.
Definition at line 498 of file COccupancyGridMap3D.cpp.
|
overrideprotectedvirtual |
Pure virtual method for reading (deserializing) from an abstract archive.
Users don't call this method directly. Instead, use stream >> object;
.
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 411 of file COccupancyGridMap3D.cpp.
References ASSERT_, mrpt::containers::CDynamicGrid3D< T, coord_t >::cellByIndex(), mrpt::maps::COccupancyGridMap3D::TInsertionOptions::decimation, mrpt::maps::COccupancyGridMap3D::TInsertionOptions::decimation_3d_range, mrpt::containers::CDynamicGrid3D< T, coord_t >::dyngridcommon_readFromStream(), mrpt::maps::TMetricMapInitializer::genericMapParams, mrpt::containers::CDynamicGrid3D< T, coord_t >::getSizeX(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getSizeY(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getSizeZ(), insertionOptions, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_decimation, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_maxCorrsDistance, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_maxRange, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_stdHit, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_useSquareDist, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_zHit, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_zRandom, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::likelihoodMethod, likelihoodOptions, mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, m_is_empty, mrpt::maps::COccupancyGridMap3D::TInsertionOptions::maxDistanceInsertion, mrpt::maps::COccupancyGridMap3D::TInsertionOptions::maxFreenessUpdateCertainty, mrpt::maps::COccupancyGridMap3D::TInsertionOptions::maxOccupancyUpdateCertainty, MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::rayTracing_decimation, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::rayTracing_stdHit, mrpt::maps::COccupancyGridMap3D::TRenderingOptions::readFromStream(), and renderingOptions.
|
inlineprotectedvirtualinherited |
Virtual method for reading (deserializing) from an abstract schema based archive.
Definition at line 74 of file CSerializable.h.
References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.
|
overrideprotectedvirtual |
Must return the current versioning number of the object.
Start in zero for new classes, and increments each time there is a change in the stored format.
Implements mrpt::serialization::CSerializable.
Definition at line 368 of file COccupancyGridMap3D.cpp.
|
overrideprotectedvirtual |
Pure virtual method for writing (serializing) to an abstract archive.
Users don't call this method directly. Instead, use stream << object;
.
std::exception | On any I/O error |
Implements mrpt::serialization::CSerializable.
Definition at line 369 of file COccupancyGridMap3D.cpp.
References mrpt::containers::CDynamicGrid3D< T, coord_t >::cellByIndex(), mrpt::maps::COccupancyGridMap3D::TInsertionOptions::decimation, mrpt::maps::COccupancyGridMap3D::TInsertionOptions::decimation_3d_range, mrpt::containers::CDynamicGrid3D< T, coord_t >::dyngridcommon_writeToStream(), mrpt::maps::TMetricMapInitializer::genericMapParams, mrpt::containers::CDynamicGrid3D< T, coord_t >::getSizeX(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getSizeY(), mrpt::containers::CDynamicGrid3D< T, coord_t >::getSizeZ(), insertionOptions, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_decimation, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_maxCorrsDistance, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_maxRange, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_stdHit, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_useSquareDist, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_zHit, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::LF_zRandom, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::likelihoodMethod, likelihoodOptions, mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, mrpt::maps::COccupancyGridMap3D::TInsertionOptions::maxDistanceInsertion, mrpt::maps::COccupancyGridMap3D::TInsertionOptions::maxFreenessUpdateCertainty, mrpt::maps::COccupancyGridMap3D::TInsertionOptions::maxOccupancyUpdateCertainty, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::rayTracing_decimation, mrpt::maps::COccupancyGridMap3D::TLikelihoodOptions::rayTracing_stdHit, renderingOptions, mrpt::serialization::CArchive::WriteAs(), mrpt::serialization::CArchive::WriteBuffer(), mrpt::serialization::CArchive::WriteBufferFixEndianness(), and mrpt::maps::COccupancyGridMap3D::TRenderingOptions::writeToStream().
|
inlineprotectedvirtualinherited |
Virtual method for writing (serializing) to an abstract schema based archive.
Definition at line 64 of file CSerializable.h.
References mrpt::serialization::CSerializable::GetRuntimeClass(), and THROW_EXCEPTION.
|
inline |
Change the contents [0,1] (0:occupied, 1:free) of a voxel, given its index.
Definition at line 136 of file COccupancyGridMap3D.h.
References mrpt::containers::CDynamicGrid3D< T, coord_t >::cellByIndex(), mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, and p2l().
Referenced by setFreenessByPos().
|
inline |
Change the contents [0,1] of a voxel, given its coordinates.
Definition at line 155 of file COccupancyGridMap3D.h.
References mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, setCellFreeness(), mrpt::containers::CDynamicGrid3D< T, coord_t >::x2idx(), mrpt::containers::CDynamicGrid3D< T, coord_t >::y2idx(), and mrpt::containers::CDynamicGrid3D< T, coord_t >::z2idx().
void COccupancyGridMap3D::setSize | ( | const mrpt::math::TPoint3D & | corner_min, |
const mrpt::math::TPoint3D & | corner_max, | ||
float | resolution, | ||
float | default_value = 0.5f |
||
) |
Change the size of gridmap, erasing all its previous contents.
resolution | The new size of voxels. |
default_value | The value of voxels, tipically 0.5. |
Definition at line 97 of file COccupancyGridMap3D.cpp.
References ASSERT_ABOVE_, ASSERT_ABOVEEQ_, ASSERT_BELOWEQ_, mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, m_is_empty, MRPT_END, MRPT_START, p2l(), mrpt::containers::CDynamicGrid3D< T, coord_t >::setSize(), mrpt::math::TPoint3D_data::x, mrpt::math::TPoint3D_data::y, and mrpt::math::TPoint3D_data::z.
Referenced by COccupancyGridMap3D(), and internal_clear().
void mrpt::maps::COccupancyGridMap3D::simulateScanRay | ( | const double | x, |
const double | y, | ||
const double | angle_direction, | ||
float & | out_range, | ||
bool & | out_valid, | ||
const double | max_range_meters, | ||
const float | threshold_free = 0.4f , |
||
const double | noiseStd = .0 , |
||
const double | angleNoiseStd = .0 |
||
) | const |
Simulate just one "ray" in the grid map.
This method is used internally to sonarSimulator and laserScanSimulator.
|
virtualinherited |
Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map.
Reimplemented in mrpt::maps::CPointsMap.
Definition at line 162 of file CMetricMap.cpp.
References MRPT_END, MRPT_START, MRPT_UNUSED_PARAM, and THROW_EXCEPTION.
void COccupancyGridMap3D::updateCell | ( | int | cx_idx, |
int | cy_idx, | ||
int | cz_idx, | ||
float | v | ||
) |
Performs the Bayesian fusion of a new observation of a cell.
Definition at line 158 of file COccupancyGridMap3D.cpp.
References ASSERT_, mrpt::containers::CDynamicGrid3D< T, coord_t >::cellByIndex(), mrpt::containers::CDynamicGrid3D< T, coord_t >::isOutOfBounds(), mrpt::maps::CLogOddsGridMap3D< OccGridCellTraits::cellType >::m_grid, and p2l().
|
inlinestaticinherited |
Performs Bayesian fusion of a new observation of a cell.
This method increases the "free-ness" of a cell, managing possible saturation.
logodd_obs | Observation of the cell, in log-odd form as transformed by p2l. |
thres | This must be CELLTYPE_MAX-logodd_obs |
Definition at line 83 of file CLogOddsGridMap3D.h.
Referenced by insertRay().
|
inlineinherited |
Performs the Bayesian fusion of a new observation of a cell.
This method increases the "free-ness" of a cell, managing possible saturation.
x | Cell index in X axis. |
y | Cell index in Y axis. |
z | Cell index in Z axis. |
logodd_obs | Observation of the cell, in log-odd form as transformed by p2l. |
thres | This must be CELLTYPE_MAX-logodd_obs |
Definition at line 104 of file CLogOddsGridMap3D.h.
References mrpt::containers::CDynamicGrid3D< T, coord_t >::cellByIndex(), mrpt::maps::CLogOddsGridMap3D< TCELL >::m_grid, and mrpt::maps::CLogOddsGridMap3D< TCELL >::updateCell_fast_free().
|
inlinestaticinherited |
Performs Bayesian fusion of a new observation of a cell.
This method increases the "occupancy-ness" of a cell, managing possible saturation.
theCell | The cell to modify |
logodd_obs | Observation of the cell, in log-odd form as transformed by p2l. |
thres | This must be CELLTYPE_MIN+logodd_obs |
Definition at line 46 of file CLogOddsGridMap3D.h.
Referenced by insertRay().
|
inlineinherited |
Performs Bayesian fusion of a new observation of a cell.
This method increases the "occupancy-ness" of a cell, managing possible saturation.
x | Cell index in X axis. |
y | Cell index in Y axis. |
z | Cell index in Z axis. |
logodd_obs | Observation of the cell, in log-odd form as transformed by p2l. |
thres | This must be CELLTYPE_MIN+logodd_obs |
Definition at line 67 of file CLogOddsGridMap3D.h.
References mrpt::containers::CDynamicGrid3D< T, coord_t >::cellByIndex(), mrpt::maps::CLogOddsGridMap3D< TCELL >::m_grid, and mrpt::maps::CLogOddsGridMap3D< TCELL >::updateCell_fast_occupied().
|
inlinevirtualinherited |
Introduces a pure virtual method responsible for writing to a mxArray
Matlab object, typically a MATLAB struct
whose contents are documented in each derived class.
mxArray
(caller is responsible of memory freeing) or nullptr is class does not support conversion to MATLAB. Definition at line 90 of file CSerializable.h.
|
staticprotected |
Definition at line 37 of file COccupancyGridMap3D.h.
|
static |
Definition at line 37 of file COccupancyGridMap3D.h.
|
inherited |
Common params to all maps.
Definition at line 275 of file CMetricMap.h.
Referenced by mrpt::maps::internal::TMetricMapTypesRegistry::factoryMapObjectFromDefinition(), mrpt::maps::CWirelessPowerGridMap2D::getAs3DObject(), mrpt::maps::CGasConcentrationGridMap2D::getAs3DObject(), mrpt::maps::CReflectivityGridMap2D::getAs3DObject(), mrpt::maps::CHeightGridMap2D::getAs3DObject(), mrpt::maps::CRandomFieldGridMap2D::getAs3DObject(), mrpt::maps::CLandmarksMap::getAs3DObject(), mrpt::maps::CPointsMap::getAs3DObject(), mrpt::maps::CGasConcentrationGridMap2D::serializeFrom(), mrpt::maps::CWirelessPowerGridMap2D::serializeFrom(), mrpt::maps::CReflectivityGridMap2D::serializeFrom(), mrpt::maps::CHeightGridMap2D::serializeFrom(), mrpt::maps::CWirelessPowerGridMap2D::serializeTo(), mrpt::maps::CGasConcentrationGridMap2D::serializeTo(), mrpt::maps::CReflectivityGridMap2D::serializeTo(), and mrpt::maps::CHeightGridMap2D::serializeTo().
TInsertionOptions mrpt::maps::COccupancyGridMap3D::insertionOptions |
With this struct options are provided to the observation insertion process.
Definition at line 243 of file COccupancyGridMap3D.h.
Referenced by insertPointCloud(), insertRay(), internal_insertObservationScan3D(), serializeFrom(), and serializeTo().
TLikelihoodOptions mrpt::maps::COccupancyGridMap3D::likelihoodOptions |
Definition at line 305 of file COccupancyGridMap3D.h.
Referenced by serializeFrom(), and serializeTo().
|
inherited |
The actual 3D voxels container.
Definition at line 35 of file CLogOddsGridMap3D.h.
Referenced by fill(), getAsOctoMapVoxels(), getCellFreeness(), getFreenessByPos(), insertRay(), internal_clear(), resizeGrid(), serializeFrom(), serializeTo(), setCellFreeness(), setFreenessByPos(), setSize(), and updateCell().
|
protected |
True upon construction; used by isEmpty()
Definition at line 51 of file COccupancyGridMap3D.h.
Referenced by internal_clear(), isEmpty(), OnPostSuccesfulInsertObs(), resizeGrid(), serializeFrom(), and setSize().
|
static |
ID used to initialize class registration (just ignore it)
Definition at line 402 of file COccupancyGridMap3D.h.
TRenderingOptions mrpt::maps::COccupancyGridMap3D::renderingOptions |
Definition at line 338 of file COccupancyGridMap3D.h.
Referenced by getAsOctoMapVoxels(), serializeFrom(), and serializeTo().
|
staticprotected |
Definition at line 37 of file COccupancyGridMap3D.h.
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019 |