Klamp't  0.8.1
ControlledRobot.h
1 #ifndef CONTROLLED_ROBOT_H
2 #define CONTROLLED_ROBOT_H
3 
4 #include "Controller.h"
5 
20 {
21  public:
23  virtual ~ControlledRobot() {}
24  virtual bool Init(Robot* robot,RobotController* controller=NULL);
25  virtual void Step(Real dt);
26  virtual void ReadSensorData(RobotSensors& sensors)=0;
27  virtual void WriteCommandData(const RobotMotorCommand& command)=0;
28 
29  //convenience functions for inspection
30  void GetCommandedConfig(Config& q);
31  void GetCommandedVelocity(Config& dq);
32  void GetSensedConfig(Config& q);
33  void GetSensedVelocity(Config& dq);
34 
35  //settings
36  Robot* klamptRobotModel;
37  RobotController* klamptController;
38 
39  //state
40  RobotMotorCommand command;
41  RobotSensors sensors;
42 };
43 
44 #endif
The main robot type used in RobotSim.
Definition: Robot.h:79
A collection of basic motor types.
Definition: Command.h:43
An interface for a Klamp't controlled robot. This should be implemented if you wish to use Klamp't co...
Definition: ControlledRobot.h:19
A set of sensors for the robot.
Definition: Sensor.h:106
A base class for a robot controller. The base class does nothing.
Definition: Controller.h:27