Klamp't  0.9.0
Public Member Functions | Public Attributes | List of all members
Klampt::GyroSensor Class Reference

Simulates a gyroscope. More...

#include <InertialSensors.h>

Inheritance diagram for Klampt::GyroSensor:
Klampt::SensorBase

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 Reset () override
 Should be overridden if the sensor is stateful to reset to an initial state.
 
virtual void Advance (Real dt) override
 
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 void GetInternalState (vector< double > &state) const override
 Any other state besides measurements/settings that you might want to store. Used in ReadState.
 
virtual void SetInternalState (const vector< double > &state) override
 Any other state besides measurements/settings that you might want to store. Used in WriteState.
 
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 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 DrawGL (const RobotModel &robot, const vector< double > &measurements)
 

Public Attributes

int link
 The link on which the sensor is located.
 
bool hasAngAccel
 True if angular accel is directly measured.
 
bool hasAngVel
 True if angular velocity is directly measured.
 
bool hasRotation
 True if rotation is directly measured.
 
Matrix3 angAccelVariance
 The variance associated with the measurement.
 
Matrix3 angVelVariance
 The variance associated with the measurement.
 
Matrix3 rotationVariance
 The variance associated with the measurement.
 
Vector3 angAccel
 Measurement: the angular accel reading.
 
Vector3 angVel
 Measurement: the angular velocity reading.
 
Matrix3 rotation
 Measurement: the rotation matrix reading.
 
Real last_dt
 Temporary: needed to derive accel from ODE.
 
Vector3 last_w
 Temporary: needed to derive accel from ODE.
 
- Public Attributes inherited from Klampt::SensorBase
string name
 
double rate
 
bool enabled
 

Detailed Description

Simulates a gyroscope.

Configurable settings:

Member Function Documentation

virtual void Klampt::GyroSensor::SetMeasurements ( const vector< double > &  values)
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.

virtual bool Klampt::GyroSensor::SetSetting ( const string &  name,
const string &  str 
)
overridevirtual

Set a named setting. Returns false if the name is not supported, or the value is formatted incorrectly

Reimplemented from Klampt::SensorBase.


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