RobWorkProject  23.9.11-
Public Types | Public Member Functions | Public Attributes | List of all members
TactileArraySensor::ClassState Class Reference

class for keeping statefull information More...

#include <TactileArraySensor.hpp>

Inherits StateCache.

Public Types

typedef rw::core::Ptr< TactileArraySensor::ClassStatePtr
 
- Public Types inherited from StateCache
typedef rw::core::Ptr< StateCachePtr
 Smart pointer type.
 

Public Member Functions

 ClassState (TactileArraySensor *tsensor, size_t dim_x, size_t dim_y)
 
void acquire ()
 acquires force data from the tactile cells More...
 
Eigen::MatrixXf getTexelData () const
 returns the pressure on each texel of the TactileArray in the unit N/m^2. More...
 
void setTexelData (const Eigen::MatrixXf &data)
 
void reset (const rw::kinematics::State &state)
 Resets the state of the SimulatedSensor to that of state. More...
 
void addForceW (const rw::math::Vector3D<> &point, const rw::math::Vector3D<> &force, const rw::math::Vector3D<> &snormal, rw::core::Ptr< rwsim::dynamics::Body > body=NULL)
 add a force to a point on the sensor geometry. The force is described relative to the world frame. More...
 
void addForce (const rw::math::Vector3D<> &point, const rw::math::Vector3D<> &force, const rw::math::Vector3D<> &snormal, rw::core::Ptr< rwsim::dynamics::Body > body=NULL)
 add a force to a point on the sensor geometry. The force is described relative to the sensor frame. More...
 
void update (const rwlibs::simulation::Simulator::UpdateInfo &info, rw::kinematics::State &state)
 steps the the SimulatedSensor with time dt and saves any state changes in state. More...
 
const std::vector< rw::sensor::Contact3D > & getActualContacts ()
 all contacts that was accumulated into pressure More...
 
std::vector< TactileArraySensor::DistPointgenerateContacts (dynamics::Body *body, const rw::math::Vector3D<> &normal, const rw::kinematics::State &state)
 
size_t size () const
 An integer ID for the StateCache. More...
 
rw::core::Ptr< rw::kinematics::StateCacheclone () const
 this creates a deep copy of this cache
 
- Public Member Functions inherited from StateCache
virtual ~StateCache ()
 destructor
 

Public Attributes

TactileArraySensor_tsensor
 
Eigen::MatrixXf _distMatrix
 
ValueMatrix _accForces
 
ValueMatrix _pressure
 
double _accTime
 
double _stime
 
rw::math::Transform3D _wTf
 
rw::math::Transform3D _fTw
 
std::vector< rw::sensor::Contact3D_allAccForces
 
std::vector< rw::sensor::Contact3D_allForces
 
std::map< rw::core::Ptr< rwsim::dynamics::Body >, std::vector< rw::sensor::Contact3D > > _forces
 
rw::proximity::ProximityStrategyData _pdata
 

Detailed Description

class for keeping statefull information

Member Function Documentation

◆ acquire()

void acquire ( )

acquires force data from the tactile cells

◆ addForce()

void addForce ( const rw::math::Vector3D<> &  point,
const rw::math::Vector3D<> &  force,
const rw::math::Vector3D<> &  snormal,
rw::core::Ptr< rwsim::dynamics::Body body = NULL 
)

add a force to a point on the sensor geometry. The force is described relative to the sensor frame.

Parameters
point[in] the point where the force is acting.
force[in] the direction in which the force is acting
snormal[in] the contact normal where the origin is on the contacting body and the direction is toward the sensor
body[in] the body that caused the contact force. If no body caused the force on the sensor (could be user input) then the body is NULL

◆ addForceW()

void addForceW ( const rw::math::Vector3D<> &  point,
const rw::math::Vector3D<> &  force,
const rw::math::Vector3D<> &  snormal,
rw::core::Ptr< rwsim::dynamics::Body body = NULL 
)

add a force to a point on the sensor geometry. The force is described relative to the world frame.

Parameters
point[in] the point where the force is acting.
force[in] the direction in which the force is acting
snormal[in] the contact normal where the origin is on the contacting body and the direction is toward the sensor
body[in] the body that caused the contact force. If no body caused the force on the sensor (could be user input) then the body is NULL

◆ getActualContacts()

const std::vector<rw::sensor::Contact3D>& getActualContacts ( )
inline

all contacts that was accumulated into pressure

◆ getTexelData()

Eigen::MatrixXf getTexelData ( ) const

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

Returns
matrix of texel pressure values

◆ reset()

void reset ( const rw::kinematics::State state)

Resets the state of the SimulatedSensor to that of state.

Parameters
state[in] the state that the sensor is reset too.

◆ size()

size_t size ( ) const
inlinevirtual

An integer ID for the StateCache.

IDs are assigned to the state data upon insertion State. StateCache that are not in a State have an ID of -1.

StateCache present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of frame IDs yourself.

Returns
An integer ID for the frame.

The number of doubles allocated by this StateCache in each State object.

Returns
The number of doubles allocated by the StateCache

Implements StateCache.

◆ update()

void update ( const rwlibs::simulation::Simulator::UpdateInfo info,
rw::kinematics::State state 
)

steps the the SimulatedSensor with time dt and saves any state changes in state.

Parameters
info[in] update information related to the time step.
state[out] changes of the SimulatedSensor is saved in state.

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