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

A controllre that saves/replays low-level commands from disk. More...

#include <LoggingController.h>

Inheritance diagram for Klampt::LoggingController:

Public Member Functions

 LoggingController (RobotModel &robot, const shared_ptr< RobotController > &base)
virtual const char * Type () const
virtual void Update (Real dt)
virtual void Reset ()
virtual bool ReadState (File &f)
virtual bool WriteState (File &f) const
bool SaveLog (const char *fn) const
bool LoadLog (const char *fn)
virtual map< string, string > Settings () const
virtual bool GetSetting (const string &name, string &str) const
virtual bool SetSetting (const string &name, const string &str)
virtual vector< string > Commands () const
virtual bool SendCommand (const string &name, const string &str)
bool EqualCommand (const ActuatorCommand &a, const ActuatorCommand &b) const
bool EqualCommand (const RobotMotorCommand &a, const RobotMotorCommand &b) const
void RemoveDelays (Real maxDelayTime)
- Public Member Functions inherited from Klampt::RobotController
 RobotController (RobotModel &robot)
void SetPIDCommand (const Config &qdes)
void SetPIDCommand (const Config &qdes, const Config &dqdes)
void SetFeedforwardPIDCommand (const Config &qdes, const Config &dqdes, const Vector &torques)
void SetTorqueCommand (const Vector &torques)
bool GetCommandedConfig (Config &q)
bool GetCommandedVelocity (Config &dq)
bool GetSensedConfig (Config &q)
bool GetSensedVelocity (Config &dq)

Public Attributes

shared_ptr< RobotControllerbase
bool save
bool replay
bool onlyJointCommands
vector< pair< Real, RobotMotorCommand > > trajectory
int replayIndex
- Public Attributes inherited from Klampt::RobotController
Real time
Real nominalTimeStep
 a "desired" time step, by default 0, which acts as a hint to the simulator. Note that it doesn't have to abide the hint.
 sensor input (filled in by simulator)
 motor command output (output to simulator)

Detailed Description

A controllre that saves/replays low-level commands from disk.

Use the boolean flags 'save' and 'replay' to control the logging. 'Replay' overrides the base controller's normal update function. Be careful not to interleave the replay mode with commands to the base controller!

If 'onlyJointCommands' is true, only the joint commands qdes, dqdes, torque, and desiredVelocity are replayed. The standard servo parameters are left untouched.

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