23 class vtkStructuredGrid;
34 #if defined(MRPT_IS_X86_AMD64) // Pragma defined to ensure no structure packing: since we'll serialize TRandomFieldVoxel to streams, we want it not to depend on compiler options, etc. 43 mean_value(_mean_value),
44 stddev_value(_stddev_value)
47 #if defined(MRPT_IS_X86_AMD64) 75 public mrpt::utils::COutputLogger
89 double x_min = -2,
double x_max = 2,
90 double y_min = -2,
double y_max = 2,
91 double z_min = -2,
double z_max = 2,
92 double voxel_size = 0.5,
93 bool call_initialize_now =
true 104 bool saveAsCSV(const
std::
string &filName_mean, const
std::
string &filName_stddev =
std::
string() ) const;
107 bool saveAsVtkStructuredGrid(const
std::
string &fil) const;
119 void loadFromConfigFile(
121 const std::string §ion);
136 double new_x_min,
double new_x_max,
137 double new_y_min,
double new_y_max,
138 double new_z_min,
double new_z_max,
143 const
double x_min, const
double x_max,
144 const
double y_min, const
double y_max,
145 const
double z_min, const
double z_max,
146 const
double resolution_xy, const
double resolution_z = -1.0,
158 virtual bool getEdgeInformation(
160 size_t icx,
size_t icy,
size_t icz,
161 size_t jcx,
size_t jcy,
size_t jcz,
162 double &out_edge_information
168 void setVoxelsConnectivity(
const ConnectivityDescriptorPtr &new_connectivity_descriptor);
178 bool insertIndividualReading(
179 const double sensorReading,
180 const double sensorVariance,
183 const bool update_map
186 void updateMapEstimation();
189 void getAsVtkStructuredGrid(vtkStructuredGrid* output,
const std::string &label_mean = std::string(
"mean"),
const std::string &label_stddev = std::string(
"stddev") )
const;
193 void internal_initialize(
bool erase_prev_contents =
true);
206 void evalJacobian(
double &dr_dx) const MRPT_OVERRIDE;
219 void evalJacobian(
double &dr_dx_i,
double &dr_dx_j) const MRPT_OVERRIDE;
bool GMRF_skip_variance
(Default:false) Skip the computation of the variance, just compute the mean
Simple, scalar (1-dim) constraint (edge) for a GMRF.
mrpt::graphs::ScalarFactorGraph m_gmrf
The virtual base class which provides a unified interface for all persistent objects in MRPT...
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
The contents of each voxel in a CRandomFieldGridMap3D map.
double GMRF_lambdaPrior
The information (Lambda) of fixed map constraints.
stlplus::smart_ptr< ConnectivityDescriptor > ConnectivityDescriptorPtr
A 3D rectangular grid of dynamic size which stores any kind of data at each voxel.
void clear()
Clear the contents of this container.
This class allows loading and storing values and vectors of different types from a configuration text...
ConnectivityDescriptorPtr m_gmrf_connectivity
Empty: default.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
double Lambda
"Information" of the observation (=inverse of the variance)
std::vector< std::deque< TObservationGMRF > > m_mrf_factors_activeObs
Vector with the active observations and their respective Information, for each map cell...
double Lambda
"Information" of the observation (=inverse of the variance)
virtual ~ConnectivityDescriptor()
EIGEN_STRONG_INLINE void setSize(size_t row, size_t col)
Changes the size of matrix, maintaining its previous content as possible and padding with zeros where...
double stddev_value
Mean and sigma (standard deviation) estimated values for the voxel.
double obsValue
Observation value.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
CRandomFieldGridMap3D represents a 3D regular grid where each voxel is associated one real-valued pro...
utils::CDynamicGrid3D< TRandomFieldVoxel > BASE
TVoxelInterpolationMethod
Parameters common to any derived class.
CRandomFieldGridMap3D * m_parent
Simple, scalar (1-dim) constraint (edge) for a GMRF.
CRandomFieldGridMap3D * m_parent
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
static bool ENABLE_GMRF_PROFILER
[default:false] Enables a profiler to show a performance report at application end.
std::deque< TPriorFactorGMRF > m_mrf_factors_priors
Vector with the precomputed priors for each GMRF model.
TInsertionOptions insertionOptions
Base class for user-supplied objects capable of describing voxels connectivity, used to build prior f...
TRandomFieldVoxel(double _mean_value=.0, double _stddev_value=.0)
Constructor.
Sparse solver for GMRF (Gaussian Markov Random Fields) graphical models.