Klamp't  0.8.1
Public Member Functions | Public Attributes | List of all members
Accelerometer Class Reference

Simulates an accelerometer. More...

#include <InertialSensors.h>

Inheritance diagram for Accelerometer:
SensorBase

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 Advance (double dt)
 Advances to the next time step with duration dt elapsed.
 
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 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 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)
 
- Public Member Functions inherited from SensorBase
virtual bool ReadState (File &f)
 
virtual bool WriteState (File &f) const
 
virtual void DrawGL (const Robot &robot, const vector< double > &measurements)
 

Public Attributes

int link
 
RigidTransform Tsensor
 Position of unit on link.
 
bool hasAxis [3]
 true if accel is measured along the given axis
 
Vector3 accelVariance
 Estimated variances of the sensor.
 
Vector3 accel
 Measurement: acceleration value.
 
Real last_dt
 Temporary: needed to derive accel from ODE.
 
Vector3 last_v
 Temporary: needed to derive accel from ODE.
 
- Public Attributes inherited from SensorBase
string name
 
double rate
 

Detailed Description

Simulates an accelerometer.

Configurable settings:

Member Function Documentation

virtual void Accelerometer::SetMeasurements ( const vector< double > &  values)
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 bool Accelerometer::SetSetting ( const string &  name,
const string &  str 
)
virtual

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

Reimplemented from SensorBase.


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