Karlsruhe Institute of Technology (KIT) Logo

Master Motor Map

Whole-body human reference model and tools for unifying representations of whole-body human motion

Public Member Functions | Protected Member Functions | Protected Attributes
MMM::BasicSensor< M,, > Class Template Referenceabstract

The templated interface with already implemented methods for implementing new sensor classes. More...

#include <BasicSensor.h>

Inheritance diagram for MMM::BasicSensor< M,, >:
[legend]

Public Member Functions

virtual bool addSensorMeasurement (std::shared_ptr< M > measurement)
 
virtual bool checkModel (ModelPtr model)=0
 
SensorPtr clone ()
 
virtual std::shared_ptr< BasicSensor< M > > cloneConfiguration ()=0
 
std::shared_ptr< BasicSensor< M > > cloneDerived ()
 
virtual bool equalsConfiguration (SensorPtr other)=0
 
void extend (float minTimestep, float maxTimestep)
 
virtual std::shared_ptr< M > getDerivedMeasurement (float timestep)
 
virtual std::shared_ptr< M > getDerivedMeasurement (float timestep, float delta)
 
float getMaxTimestep ()
 
SensorMeasurementPtr getMeasurement (float timestep)
 
SensorMeasurementPtr getMeasurement (float timestep, float delta)
 
std::map< float, SensorMeasurementPtr > getMeasurements ()
 
float getMinTimestep ()
 
SensorPtr getSegmentSensor (float startTimestep, float endTimestep, bool changeTimestep=false)
 
std::vector< float > getTimesteps ()
 
bool hasMeasurement ()
 
bool hasMeasurement (float timestep)
 
virtual void shiftMeasurements (float delta)
 
- Public Member Functions inherited from MMM::Sensor
void appendSensorXML (simox::xml::RapidXMLWrapperNodePtr node, const std::filesystem::path &filePath)
 
std::string getDescription ()
 
std::string getName ()
 
virtual int getPriority ()
 
virtual std::vector< std::string > getSensorSpecificInformation (const std::string &name)
 
virtual std::string getType ()=0
 
std::string getUniqueName ()
 
virtual std::string getVersion ()=0
 
virtual bool hasSensorConfigurationContent () const =0
 
virtual void initializeModel (ModelPtr model, float timestep, bool extend=false, bool update=false)
 
virtual void initializeModel (ModelPtr model, float timestep, float delta, bool extend=false, bool update=false)
 
virtual bool isInterpolatable ()
 
virtual bool isMirrorSupported (MotionType type)
 
virtual void mirrorMotionData (const Eigen::Matrix4f &referencePose, int referenceAxis)
 
virtual void scaleMotionData (float scaleFactor)
 
void setDescription (const std::string &description)
 
void setName (const std::string &name)
 
void setUniqueName (const std::string &uniqueName)
 
virtual void shiftMotionData (const Eigen::Vector3f &positionDelta)
 
void synchronizeSensorMeasurements (float timeFrequency)
 Synchronizes all possible sensormeasurements on a specific time frequency via linear interpolation.
 
virtual void synchronizeSensorMeasurements (float timeFrequency, float minTimestep, float maxTimestep)
 Synchronizes all possible sensormeasurements on a specific time frequency via linear interpolation. Removes all measurements outside the given intervall.
 

Protected Member Functions

virtual void appendDataXML (simox::xml::RapidXMLWrapperNodePtr node) override
 
 BasicSensor (const std::string &description=std::string(), const std::map< float, std::shared_ptr< M > > &measurements=std::map< float, std::shared_ptr< M > >())
 
SensorPtr joinSensor (SensorPtr sensor)
 
virtual void loadMeasurementNodeXML (simox::xml::RapidXMLWrapperNodePtr node) override
 
virtual void loadMeasurementXML (simox::xml::RapidXMLWrapperNodePtr node, float timestep, SensorMeasurementType type)=0
 
- Protected Member Functions inherited from MMM::Sensor
virtual void appendConfigurationXML (simox::xml::RapidXMLWrapperNodePtr node, const std::filesystem::path &filePath)=0
 
virtual void appendTypeXML (simox::xml::RapidXMLWrapperNodePtr node)
 
virtual void loadConfigurationXML (simox::xml::RapidXMLWrapperNodePtr node, const std::filesystem::path &filePath)=0
 
virtual void loadSensor (simox::xml::RapidXMLWrapperNodePtr node, const std::filesystem::path &filePath)
 
 Sensor (const std::string &description="")
 

Protected Attributes

std::map< float, std::shared_ptr< M > > measurements
 
- Protected Attributes inherited from MMM::Sensor
std::string description
 
std::string name
 
std::string uniqueName
 

Additional Inherited Members

- Static Public Member Functions inherited from MMM::Sensor
static SensorPtr join (SensorPtr sensor1, SensorPtr sensor2)
 
- Static Public Attributes inherited from MMM::Sensor
static std::function< bool(std::filesystem::path &)> handleSensorFilePath = NULL
 

Detailed Description

template<typename M, typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
class MMM::BasicSensor< M,, >

The templated interface with already implemented methods for implementing new sensor classes.

Member Function Documentation

◆ checkModel()

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
virtual bool MMM::BasicSensor< M,, >::checkModel ( ModelPtr  model)
pure virtual

◆ clone()

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
SensorPtr MMM::BasicSensor< M,, >::clone ( )
inlinevirtual

Creates a copy of this sensor.

Implements MMM::Sensor.

◆ equalsConfiguration()

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
virtual bool MMM::BasicSensor< M,, >::equalsConfiguration ( SensorPtr  other)
pure virtual

◆ extend()

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
void MMM::BasicSensor< M,, >::extend ( float  minTimestep,
float  maxTimestep 
)
inlinevirtual

Extend sensor to given timesteps by readding copies first and last measurement

Implements MMM::Sensor.

◆ getMaxTimestep()

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
float MMM::BasicSensor< M,, >::getMaxTimestep ( )
inlinevirtual

Returns the maximum timestep of all measurements of this sensor or -1 if no measurements exists.

Implements MMM::Sensor.

◆ getMeasurement() [1/2]

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
SensorMeasurementPtr MMM::BasicSensor< M,, >::getMeasurement ( float  timestep)
inlinevirtual

If the sensor contains a sensor measurement at the certain given time, it is returned. Else if possible the sensor measurement is interpolated.

Returns
Sensor measurement or nullpointer.

Implements MMM::Sensor.

◆ getMeasurement() [2/2]

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
SensorMeasurementPtr MMM::BasicSensor< M,, >::getMeasurement ( float  timestep,
float  delta 
)
inlinevirtual

Returns the closest sensor measurement in a given delta around the given timestep.

Returns
Sensor measurement or nullpointer.

Implements MMM::Sensor.

◆ getMeasurements()

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
std::map<float, SensorMeasurementPtr> MMM::BasicSensor< M,, >::getMeasurements ( )
inlinevirtual

Returns a map of sensor measurements according to their timesteps. This method runs in linear time.

Implements MMM::Sensor.

◆ getMinTimestep()

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
float MMM::BasicSensor< M,, >::getMinTimestep ( )
inlinevirtual

Returns the minimum timestep of all measurements of this sensor or -1 if no measurements exists.

Implements MMM::Sensor.

◆ getSegmentSensor()

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
SensorPtr MMM::BasicSensor< M,, >::getSegmentSensor ( float  startTimestep,
float  endTimestep,
bool  changeTimestep = false 
)
inlinevirtual

Returns a section copy of this sensor.

Parameters
startTimestepStart timestep of the section.
endTimestepEnd timestep of the section.
changeTimestepSection begin at 0.0 or the startTimestep.

Implements MMM::Sensor.

◆ getTimesteps()

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
std::vector<float> MMM::BasicSensor< M,, >::getTimesteps ( )
inlinevirtual

Returns all timesteps on which the sensor contains real sensor measurements.

Implements MMM::Sensor.

◆ hasMeasurement() [1/2]

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
bool MMM::BasicSensor< M,, >::hasMeasurement ( )
inlinevirtual

Returns true, if the sensor contains a sensor measurement

Implements MMM::Sensor.

◆ hasMeasurement() [2/2]

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
bool MMM::BasicSensor< M,, >::hasMeasurement ( float  timestep)
inlinevirtual

Returns true, if the sensor contains a real(!= interpolated) sensor measurement at the given time.

Implements MMM::Sensor.

◆ shiftMeasurements()

template<typename M , typename std::enable_if< std::is_base_of< SensorMeasurement, M >::value >::type * = nullptr, typename std::enable_if< std::is_base_of< SMCloneable< M >, M >::value >::type * = nullptr>
virtual void MMM::BasicSensor< M,, >::shiftMeasurements ( float  delta)
inlinevirtual

Shifts the sensor measurements by a given delta value.

Implements MMM::Sensor.


The documentation for this class was generated from the following file:
KoroiBot Logo WALK-MAN Logo Xperience Logo SecondHands Logo TimeStorm Logo I-SUPPORT Logo
PACO-PLUS Logo SFB-588 Logo SPP1527 Logo