Klamp't
0.9.0
|
Simulates a tilt sensor that measures the angle of a reference direction about certain axes. More...
#include <InertialSensors.h>
Public Member Functions | |
virtual const char * | Type () const override |
virtual void | Simulate (SimRobotController *robot, Simulator *sim) override |
Called whenever the sensor is updated from the simulaton. | |
virtual void | SimulateKinematic (RobotModel &robot, WorldModel &world) override |
Updates the sensor for a kinematic world. Useful for non-simulation debugging. | |
virtual void | Advance (double dt) override |
Advances to the next time step with duration dt elapsed. | |
virtual void | Reset () override |
Should be overridden if the sensor is stateful to reset to an initial state. | |
virtual void | MeasurementNames (vector< string > &names) const override |
Must be overridden to produce a list of names of each measurement. | |
virtual void | GetMeasurements (vector< double > &values) const override |
Must be overridden to returns a list of all measurements. | |
virtual void | SetMeasurements (const vector< double > &values) override |
virtual map< string, string > | Settings () const override |
Returns a map of all current name-value pairs of the sensor's settings. | |
virtual bool | GetSetting (const string &name, string &str) const override |
Get a named setting. Returns false if the name is not supported. | |
virtual bool | SetSetting (const string &name, const string &str) override |
Public Member Functions inherited from Klampt::SensorBase | |
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. | |
virtual void | DrawGL (const RobotModel &robot, const vector< double > &measurements) |
Public Attributes | |
int | link |
Vector3 | referenceDir |
Matrix3 | Rsensor |
Orientation of unit on link. | |
bool | hasAxis [3] |
true if tilt is measured on the x, y, z axes | |
Vector3 | resolution |
Vector3 | variance |
bool | hasVelocity |
Vector3 | alocal |
Vector3 | wlocal |
Public Attributes inherited from Klampt::SensorBase | |
string | name |
double | rate |
bool | enabled |
Simulates a tilt sensor that measures the angle of a reference direction about certain axes.
Configurable settings:
|
overridevirtual |
Updates the internal measurement vector. Should be overridden to correctly restore state using ReadState(), or to visualize a physical robot's sensors.
Reimplemented from Klampt::SensorBase.
|
overridevirtual |
Set a named setting. Returns false if the name is not supported, or the value is formatted incorrectly
Reimplemented from Klampt::SensorBase.