RobWorkProject
23.9.11-
|
A sensor that measures force and torque between two bodies around some reference frame. More...
#include <SimulatedFTSensor.hpp>
Inherits SimulatedTactileSensor.
Public Types | |
typedef rw::core::Ptr< SimulatedFTSensor > | Ptr |
Smart pointer type for SimulatedFTSensor. | |
Public Types inherited from SimulatedSensor | |
typedef rw::core::Ptr< SimulatedSensor > | Ptr |
smart pointer type of this class | |
Public Types inherited from Stateless | |
typedef rw::core::Ptr< Stateless > | Ptr |
Smart pointer type for Stateless. | |
Public Member Functions | |
SimulatedFTSensor (const std::string &name, dynamics::Body::Ptr body, dynamics::Body::Ptr body1, rw::core::Ptr< rw::kinematics::Frame > frame=NULL) | |
constructor - the forces will be described relative to body body1 More... | |
virtual | ~SimulatedFTSensor () |
destructor | |
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... | |
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<> &cnormal, rw::kinematics::State &state, dynamics::Body::Ptr 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<> &cnormal, rw::kinematics::State &state, dynamics::Body::Ptr body=NULL) |
add a force to a point on the sensor geometry. The force is described relative to the sensor frame. More... | |
void | addWrenchToCOM (const rw::math::Vector3D<> &force, const rw::math::Vector3D<> &torque, rw::kinematics::State &state, dynamics::Body::Ptr body=NULL) |
add a wrench to the center of mass of this object More... | |
void | addWrenchWToCOM (const rw::math::Vector3D<> &force, const rw::math::Vector3D<> &torque, rw::kinematics::State &state, dynamics::Body::Ptr body=NULL) |
add a wrench described in World frame to the center of mass of this object More... | |
rw::math::Transform3D | getTransform () const |
Get the transform. More... | |
rw::math::Vector3D | getForce (const rw::kinematics::State &state) const |
Get the measured force in the reference frame. More... | |
rw::math::Vector3D | getTorque (const rw::kinematics::State &state) const |
Get the measured torque around and in the reference frame. More... | |
rw::math::Vector3D | getMaxTorque () const |
Maximum torque. More... | |
rw::math::Vector3D | getMaxForce () const |
Maximum force. More... | |
rw::kinematics::Frame * | getSensorFrame () const |
Get the sensor frame (the body1 body frame unless reference frame is set differently). More... | |
void | acquire () |
Acquire new force reading. More... | |
rw::sensor::FTSensor::Ptr | getFTSensor (rwlibs::simulation::Simulator::Ptr sim) |
Get a FTSensor version of this sensor. More... | |
rwsim::dynamics::Body::Ptr | getBody1 () const |
Get the first body (the body influencing the sensor body) More... | |
rwsim::dynamics::Body::Ptr | getBody2 () const |
Get the second body (the sensor body). More... | |
Public Member Functions inherited from SimulatedTactileSensor | |
virtual | ~SimulatedTactileSensor () |
destructor | |
virtual void | addForceW (const rw::math::Vector3D<> &point, const rw::math::Vector3D<> &force, const rw::math::Vector3D<> &cnormal, rw::kinematics::State &state, rw::core::Ptr< rwsim::dynamics::Body > body=NULL)=0 |
add a force to a point on the sensor geometry. The force is described relative to the world frame. More... | |
virtual void | addForce (const rw::math::Vector3D<> &point, const rw::math::Vector3D<> &force, const rw::math::Vector3D<> &cnormal, rw::kinematics::State &state, rw::core::Ptr< rwsim::dynamics::Body > body=NULL)=0 |
add a force to a point on the sensor geometry. The force is described relative to the sensor frame. More... | |
virtual void | addWrenchToCOM (const rw::math::Vector3D<> &force, const rw::math::Vector3D<> &torque, rw::kinematics::State &state, rw::core::Ptr< rwsim::dynamics::Body > body=NULL)=0 |
add a wrench to the center of mass of this object More... | |
virtual void | addWrenchWToCOM (const rw::math::Vector3D<> &force, const rw::math::Vector3D<> &torque, rw::kinematics::State &state, rw::core::Ptr< rwsim::dynamics::Body > body=NULL)=0 |
add a wrench described in World frame to the center of mass of this object More... | |
Public Member Functions inherited from SimulatedSensor | |
virtual | ~SimulatedSensor () |
destructor | |
const std::string & | getName () const |
get name of this simulated sensor | |
rw::kinematics::Frame * | getFrame () const |
get frame that this sensor is attached to. More... | |
rw::sensor::SensorModel::Ptr | getSensorModel () |
get the sensor model of this simulated sensor. | |
rw::sensor::Sensor::Ptr | getSensorHandle (rwlibs::simulation::Simulator::Ptr sim) |
get a handle to controlling an instance of the simulated sensor in a specific simulator More... | |
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 SimulatedTactileSensor | |
SimulatedTactileSensor (rw::sensor::SensorModel::Ptr model) | |
Constructor. More... | |
Protected Member Functions inherited from SimulatedSensor | |
SimulatedSensor (rw::sensor::SensorModel::Ptr model) | |
constructor | |
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. | |
A sensor that measures force and torque between two bodies around some reference frame.
SimulatedFTSensor | ( | const std::string & | name, |
dynamics::Body::Ptr | body, | ||
dynamics::Body::Ptr | body1, | ||
rw::core::Ptr< rw::kinematics::Frame > | frame = NULL |
||
) |
constructor - the forces will be described relative to body body1
name | [in] identifier |
body | [in] the first body |
body1 | [in] the second body |
frame | [in] (optional) the reference frame - default is the body1 body frame. |
|
inline |
Acquire new force reading.
void addForce | ( | const rw::math::Vector3D<> & | point, |
const rw::math::Vector3D<> & | force, | ||
const rw::math::Vector3D<> & | cnormal, | ||
rw::kinematics::State & | state, | ||
dynamics::Body::Ptr | 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 |
cnormal | [in] the contact normal where the origin is on the contacting body and the direction is toward the sensor |
state | [in/out] the state is updated with new sensor information. |
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<> & | cnormal, | ||
rw::kinematics::State & | state, | ||
dynamics::Body::Ptr | body = NULL |
||
) |
add a force to a point on the sensor geometry. The force is described relative to the world frame.
Interface inherited from SimulatedTactileSensor
point | [in] the point where the force is acting. |
force | [in] the direction in which the force is acting |
cnormal | [in] the contact normal where the origin is on the contacting body and the direction is toward the sensor |
state | [in/out] the state is updated with new sensor information. |
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 addWrenchToCOM | ( | const rw::math::Vector3D<> & | force, |
const rw::math::Vector3D<> & | torque, | ||
rw::kinematics::State & | state, | ||
dynamics::Body::Ptr | body = NULL |
||
) |
add a wrench to the center of mass of this object
force | |
torque | |
state | |
body |
void addWrenchWToCOM | ( | const rw::math::Vector3D<> & | force, |
const rw::math::Vector3D<> & | torque, | ||
rw::kinematics::State & | state, | ||
dynamics::Body::Ptr | body = NULL |
||
) |
add a wrench described in World frame to the center of mass of this object
force | |
torque | |
state | |
body |
|
inline |
Get the first body (the body influencing the sensor body)
|
inline |
Get the second body (the sensor body).
rw::math::Vector3D getForce | ( | const rw::kinematics::State & | state | ) | const |
Get the measured force in the reference frame.
state | [in] the state. |
rw::sensor::FTSensor::Ptr getFTSensor | ( | rwlibs::simulation::Simulator::Ptr | sim | ) |
Get a FTSensor version of this sensor.
sim | [in] the simulator in which the simulated sensor is instantiated |
|
inline |
Maximum force.
|
inline |
Maximum torque.
|
inline |
Get the sensor frame (the body1 body frame unless reference frame is set differently).
rw::math::Vector3D getTorque | ( | const rw::kinematics::State & | state | ) | const |
Get the measured torque around and in the reference frame.
state | [in] the state. |
rw::math::Transform3D getTransform | ( | ) | const |
Get the transform.
|
virtual |
Resets the state of the SimulatedSensor to that of state.
state | [in] the state that the sensor is reset too. |
Implements SimulatedSensor.
|
virtual |
steps the the SimulatedSensor with time dt and saves any state changes in state.
Interface inherited from SimulatedSensor
info | [in] update information related to the time step. |
state | [out] changes of the SimulatedSensor is saved in state. |
Implements SimulatedSensor.