Klamp't
0.8.1
|
Simulates a force-torque sensor mounted between a link and its parent. Can be configured to be up to 6DOF. More...
#include <ForceSensors.h>
Public Member Functions | |
virtual const char * | Type () const |
virtual void | Simulate (ControlledRobotSimulator *robot, WorldSimulation *sim) |
Called whenever the sensor is updated from the simulaton. | |
virtual void | SimulateKinematic (Robot &robot, RobotWorld &world) |
Updates the sensor for a kinematic world. Useful for non-simulation debugging. | |
virtual void | Reset () |
Should be overridden if the sensor is stateful to reset to an initial state. | |
virtual void | MeasurementNames (vector< string > &names) const |
Must be overridden to produce a list of names of each measurement. | |
virtual void | GetMeasurements (vector< double > &values) const |
Must be overridden to returns a list of all measurements. | |
virtual void | SetMeasurements (const vector< double > &values) |
virtual map< string, string > | Settings () const |
Returns a map of all current name-value pairs of the sensor's settings. | |
virtual bool | GetSetting (const string &name, string &str) const |
Get a named setting. Returns false if the name is not supported. | |
virtual bool | SetSetting (const string &name, const string &str) |
virtual void | DrawGL (const Robot &robot, const vector< double > &measurements) |
![]() | |
virtual void | Advance (double dt) |
Advances to the next time step with duration dt elapsed. | |
virtual bool | ReadState (File &f) |
virtual bool | WriteState (File &f) const |
virtual void | GetInternalState (vector< double > &state) const |
Any other state besides measurements/settings that you might want to store. Used in ReadState. | |
virtual void | SetInternalState (const vector< double > &state) |
Any other state besides measurements/settings that you might want to store. Used in WriteState. | |
Public Attributes | |
int | link |
The link on which the sensor is located (between link and parent) | |
bool | hasForce [3] |
true if force is measured along the given axis (default false) | |
bool | hasTorque [3] |
true if torque is measured along the given axis (default false) | |
Vector3 | fVariance |
Vector3 | tVariance |
Estimated variance of the sensor (default 0) | |
Vector3 | f |
Vector3 | t |
Measurement: the force/torque at the given position, on the link (negative on the parent link) | |
![]() | |
string | name |
double | rate |
Simulates a force-torque sensor mounted between a link and its parent. Can be configured to be up to 6DOF.
To set up an accurate model of a force-torque sensor, you need to set up a link centered at the sensor frame welded to its parent link. The parent link must contain all the mass of the mount on the mounting side, and the sensor link must contain all the mass on the other (end effector) side. Any descendant links of the end effector (like fingers of a hand) should be attached to the sensor link. NOTE: This conflicts with the way that Klampt's ODE implementation handles welded links! TODO: fix that.
Configurable settings:
|
virtual |
If the sensor can be drawn, draw the sensor on the robot's current configuration, using these measurements, using OpenGL calls.
Reimplemented from SensorBase.
|
virtual |
Updates the internal measurement vector. Should be overridden to correctly restore state using ReadState(), or to visualize a physical robot's sensors.
Reimplemented from SensorBase.
|
virtual |
Set a named setting. Returns false if the name is not supported, or the value is formatted incorrectly
Reimplemented from SensorBase.