![]() |
RobWorkProject
23.9.11-
|
class for keeping statefull information More...
#include <TactileArraySensor.hpp>
Inherits StateCache.
Public Types | |
typedef rw::core::Ptr< TactileArraySensor::ClassState > | Ptr |
![]() | |
typedef rw::core::Ptr< StateCache > | Ptr |
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::DistPoint > | generateContacts (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::StateCache > | clone () const |
this creates a deep copy of this cache | |
![]() | |
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 |
class for keeping statefull information
void acquire | ( | ) |
acquires force data from the tactile cells
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.
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 |
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.
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 |
|
inline |
all contacts that was accumulated into pressure
Eigen::MatrixXf getTexelData | ( | ) | const |
returns the pressure on each texel of the TactileArray in the unit N/m^2.
void reset | ( | const rw::kinematics::State & | state | ) |
Resets the state of the SimulatedSensor to that of state.
state | [in] the state that the sensor is reset too. |
|
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.
The number of doubles allocated by this StateCache in each State object.
Implements StateCache.
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.
info | [in] update information related to the time step. |
state | [out] changes of the SimulatedSensor is saved in state. |