Gazebo Math

API Reference

8.0.0~pre1
TimeVaryingVolumetricGridLookupField< T, V, InMemorySession< T, V > > Class Template Reference

Specialized version of TimeVaryingVolumetricGridLookupField for in-memory lookup. It loads the whole dataset into memory. More...

#include <TimeVaryingVolumetricGridLookupField.hh>

Public Member Functions

 TimeVaryingVolumetricGridLookupField ()
 Default constructor.
 
void AddVolumetricGridField (const T &_time, const VolumetricGridLookupField< V > &_field)
 Documentation inherited.
 
std::pair< Vector3< V >, Vector3< V > > Bounds (const InMemorySession< T, V > &_session) const
 Get the bounds of this grid field.
 
InMemorySession< T, VCreateSession () const
 Documentation inherited.
 
InMemorySession< T, VCreateSession (const T &_time) const
 Documentation inherited.
 
template<typename X >
std::optional< X > EstimateQuadrilinear (const InMemorySession< T, V > &_session, const std::vector< InterpolationPoint4D< T, V > > &_interpolators, const std::vector< X > &_values1, const std::vector< X > &_values2, const Vector3< X > &_position, const X _default=X(0)) const
 Uses quadrilinear interpolation to estimate value of current point. Returns nullopt if query is out of range.
 
bool IsValid (const InMemorySession< T, V > &_session) const
 In memory session.
 
std::vector< InterpolationPoint4D< T, V > > LookUp (const InMemorySession< T, V > &_session, const Vector3< V > &_point, const Vector3< V > &_tol=Vector3< V >{1e-6, 1e-6, 1e-6}) const
 Documentation inherited.
 
std::optional< InMemorySession< T, V > > StepTo (const InMemorySession< T, V > &_session, const T &_time) const
 Documentation inherited.
 

Detailed Description

template<typename T, typename V>
class gz::math::TimeVaryingVolumetricGridLookupField< T, V, InMemorySession< T, V > >

Specialized version of TimeVaryingVolumetricGridLookupField for in-memory lookup. It loads the whole dataset into memory.

Constructor & Destructor Documentation

◆ TimeVaryingVolumetricGridLookupField()

Default constructor.

Member Function Documentation

◆ AddVolumetricGridField()

template<typename T , typename V >
void AddVolumetricGridField ( const T &  _time,
const VolumetricGridLookupField< V > &  _field 
)
inline

Documentation inherited.

◆ Bounds()

template<typename T , typename V >
std::pair< Vector3< V >, Vector3< V > > Bounds ( const InMemorySession< T, V > &  _session) const
inline

Get the bounds of this grid field.

Returns
A pair of vectors. All zeros if session is invalid.

◆ CreateSession() [1/2]

template<typename T , typename V >
InMemorySession< T, V > CreateSession ( ) const
inline

Documentation inherited.

◆ CreateSession() [2/2]

template<typename T , typename V >
InMemorySession< T, V > CreateSession ( const T &  _time) const
inline

Documentation inherited.

◆ EstimateQuadrilinear()

template<typename T , typename V >
template<typename X >
std::optional< X > EstimateQuadrilinear ( const InMemorySession< T, V > &  _session,
const std::vector< InterpolationPoint4D< T, V > > &  _interpolators,
const std::vector< X > &  _values1,
const std::vector< X > &  _values2,
const Vector3< X > &  _position,
const _default = X(0) 
) const
inline

Uses quadrilinear interpolation to estimate value of current point. Returns nullopt if query is out of range.

Parameters
[in]_session- The session
[in]_interpolators- The interpolation points retrieved from LookUp()
[in]_values1- Value array at timestep 1.
[in]_values2- Value array at timestep 2.
[in]_position- The position to be queried.
[in]_default- Value used if there is a hole in the data.
Returns
The estimated value for the point. Nullopt if we are outside the field. Default value if in the field but no value is in the index.

Got nothing to interpolate. Out of bounds.

Only one of the two time-slices has data. Use that slice to guess.

Default case where both time-slices has interpolation

References std::next().

◆ IsValid()

template<typename T , typename V >
bool IsValid ( const InMemorySession< T, V > &  _session) const
inline

In memory session.

◆ LookUp()

template<typename T , typename V >
std::vector< InterpolationPoint4D< T, V > > LookUp ( const InMemorySession< T, V > &  _session,
const Vector3< V > &  _point,
const Vector3< V > &  _tol = Vector3<V>{1e-6, 1e-6, 1e-6} 
) const
inline

Documentation inherited.

◆ StepTo()

template<typename T , typename V >
std::optional< InMemorySession< T, V > > StepTo ( const InMemorySession< T, V > &  _session,
const T &  _time 
) const
inline

Documentation inherited.

References std::next().


The documentation for this class was generated from the following file: