RobWorkProject  23.9.11-
Classes | Public Types | Public Member Functions | List of all members
TactileArrayModel Class Reference

the TactileArrayModel describes tactile sensor consisting of arrays of tactile cells that can be placed on a defined shape. The shape is described with a matrix of 3d vertices. Such that tactil (0,0) maps to the quad defined by the four vertices {(0,0),(0,1),(1,1),(1,0)}. Notice that the normal is defined by sequence of the vertices and that the normal defines the direction of tactile sensing. More...

#include <TactileArrayModel.hpp>

Inherits SensorModel.

Classes

class  TactileModelCache
 cache to store state information More...
 

Public Types

typedef rw::core::Ptr< TactileArrayModelPtr
 smart pointer type
 
typedef Eigen::MatrixXf ValueMatrix
 type of tactile array readings
 
typedef boost::multi_array< rw::math::Vector3D<>, 2 > VertexMatrix
 type of vertices describing geometry of sensor
 
- Public Types inherited from SensorModel
typedef rw::core::Ptr< SensorModelPtr
 smart pointer type
 
- Public Types inherited from Stateless
typedef rw::core::Ptr< StatelessPtr
 Smart pointer type for Stateless.
 

Public Member Functions

 TactileArrayModel (const std::string &name, rw::core::Ptr< rw::kinematics::Frame > sensorframe, const rw::math::Transform3D<> &fThmap, const ValueMatrix &heightMap, double cell_width, double cell_height)
 constructor More...
 
virtual ~TactileArrayModel ()
 destructor
 
rw::math::Vector2D getTexelSize (int x, int y) const
 gets the size of an individual tactile cell with coordinates (x,y) More...
 
std::pair< double, double > getPressureLimit () const
 get the minimum and maximum pressure capability of any tactile cell in the TactileArray More...
 
void setPressureLimit (double min, double max)
 set pressure limits. should define min max of any tactile cell in array More...
 
void setPressureLimit (std::pair< double, double > range)
 
const VertexMatrixgetVertexGrid () const
 gets the 3d geometry of this tactilearray. The vertexes are expressed realtive to the transform. More...
 
const rw::math::Transform3DgetTransform () const
 a transformation from the sensor frame to the geometric data of the tactile array. More...
 
const VertexMatrixgetCenters () const
 a matrix with position of each tactile cell center. The coordinates are described relative to the TactileArray transform (see getTransform()) More...
 
const VertexMatrixgetNormals () const
 a matrix of normals that are described relative to each tactile cell center. More...
 
int getWidth () const
 get width of tactile array
 
int getHeight () const
 get height of tactile array
 
ValueMatrixgetTexelData (rw::kinematics::State &state) const
 returns the pressure on each texel of the TactileArray in the unit Pa (N/m^2). More...
 
const ValueMatrixgetTexelData (const rw::kinematics::State &state) const
 
void setTexelData (const ValueMatrix &data, rw::kinematics::State &state) const
 set the pressure on each texel of the TactileArray in the unit Pa (N/m^2). More...
 
- Public Member Functions inherited from SensorModel
 SensorModel (const std::string &name, rw::core::Ptr< kinematics::Frame > frame)
 constructor More...
 
 SensorModel (const std::string &name, rw::core::Ptr< kinematics::Frame > frame, const std::string &description)
 constructor More...
 
virtual ~SensorModel ()
 destructor
 
void setName (const std::string &name)
 sets the name of this sensor More...
 
void setDescription (const std::string &description)
 sets the description of this sensor More...
 
const std::string & getName () const
 returns the name of this sensor More...
 
const std::string & getDescription () const
 returns a description of this sensor More...
 
kinematics::FramegetFrame () const
 The frame to which the sensor is attached. More...
 
virtual void attachTo (rw::core::Ptr< kinematics::Frame > frame)
 Sets the frame to which the sensor should be attached. More...
 
rw::core::PropertyMapgetPropertyMap ()
 gets the propertymap of this sensor
 
const rw::core::PropertyMapgetPropertyMap () const
 gets the propertymap of this sensor
 
- Public Member Functions inherited from Stateless
virtual ~Stateless ()
 destructor
 
virtual void registerIn (State &state)
 initialize this stateless data to a specific state More...
 
virtual void registerIn (StateStructure::Ptr state)
 register this stateless object in a statestructure.
 
virtual void unregister ()
 unregisters all state data of this stateless object
 
StateStructure::Ptr getStateStructure ()
 Get the state structure. More...
 
const StateStructure::Ptr getStateStructure () const
 Get the state structure. More...
 
bool isRegistered ()
 Check if object has registered its state. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Stateless
 Stateless ()
 constructor
 
template<class T >
void add (StatelessData< T > &data)
 implementations of sensor should add all their stateless data on initialization
 
void add (StateData *data)
 Add data. More...
 
void add (rw::core::Ptr< StateData > data)
 implementations of sensor should add all their state data on initialization
 
- Protected Attributes inherited from Stateless
bool _registered
 True if object has registered its state.
 
std::vector< rw::core::Ptr< StateData > > _datas
 Data.
 
StateStructure::Ptr _stateStruct
 The state structure.
 

Detailed Description

the TactileArrayModel describes tactile sensor consisting of arrays of tactile cells that can be placed on a defined shape. The shape is described with a matrix of 3d vertices. Such that tactil (0,0) maps to the quad defined by the four vertices {(0,0),(0,1),(1,1),(1,0)}. Notice that the normal is defined by sequence of the vertices and that the normal defines the direction of tactile sensing.

Constructor & Destructor Documentation

◆ TactileArrayModel()

TactileArrayModel ( const std::string &  name,
rw::core::Ptr< rw::kinematics::Frame sensorframe,
const rw::math::Transform3D<> &  fThmap,
const ValueMatrix heightMap,
double  cell_width,
double  cell_height 
)

constructor

Parameters
name[in] name of sensor
sensorframe[in] the frame to which the sensor is attached
fThmap[in] transformation from sensor frame to the heightmap definition
heightMap[in] a height map defining the height of each corner in the tactile array
cell_width[in] width of cell
cell_height[in] height of cell

Member Function Documentation

◆ getCenters()

const VertexMatrix& getCenters ( ) const

a matrix with position of each tactile cell center. The coordinates are described relative to the TactileArray transform (see getTransform())

Returns
a matrix describing the center of each tactile cell.

◆ getNormals()

const VertexMatrix& getNormals ( ) const

a matrix of normals that are described relative to each tactile cell center.

Returns

◆ getPressureLimit()

std::pair<double, double> getPressureLimit ( ) const

get the minimum and maximum pressure capability of any tactile cell in the TactileArray

Returns
min and max pressure in Pa

◆ getTexelData()

ValueMatrix& getTexelData ( rw::kinematics::State state) const

returns the pressure on each texel of the TactileArray in the unit Pa (N/m^2).

Parameters
state[in] state to get the values from
Returns
matrix of texel pressure values

◆ getTexelSize()

rw::math::Vector2D getTexelSize ( int  x,
int  y 
) const

gets the size of an individual tactile cell with coordinates (x,y)

Parameters
x
y
Returns
the dimensions of the tactile cell in meters

◆ getTransform()

const rw::math::Transform3D& getTransform ( ) const

a transformation from the sensor frame to the geometric data of the tactile array.

Returns

◆ getVertexGrid()

const VertexMatrix& getVertexGrid ( ) const

gets the 3d geometry of this tactilearray. The vertexes are expressed realtive to the transform.

Returns

◆ setPressureLimit()

void setPressureLimit ( double  min,
double  max 
)

set pressure limits. should define min max of any tactile cell in array

Parameters
min[in] min pressure in Pa
max[in] max pressure in Pa

◆ setTexelData()

void setTexelData ( const ValueMatrix data,
rw::kinematics::State state 
) const

set the pressure on each texel of the TactileArray in the unit Pa (N/m^2).

Parameters
data[in] pressure values
state[in] state to set the values in

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