Klamp't
0.8.1
|
A Klamp't controlled robot that communicates to a robot (either real or virtual) using the Klamp't controller serialization mechanism. Acts as a client connecting to the given host. More...
#include <SerialControlledRobot.h>
Public Member Functions | |
SerialControlledRobot (const char *host, double timeout=Inf) | |
virtual bool | Init (Robot *robot, RobotController *controller) |
call this first before calling Run | |
bool | Process (double timeout) |
Call to process a single message. | |
bool | Run () |
void | Stop () |
Called by an external thread to stop the Run() loop. | |
void | SetMutex (Mutex *controllerMutex) |
virtual void | ReadSensorData (RobotSensors &sensors) |
virtual void | WriteCommandData (const RobotMotorCommand &command) |
Public Member Functions inherited from ControlledRobot | |
virtual void | Step (Real dt) |
void | GetCommandedConfig (Config &q) |
void | GetCommandedVelocity (Config &dq) |
void | GetSensedConfig (Config &q) |
void | GetSensedVelocity (Config &dq) |
Public Attributes | |
string | host |
shared_ptr< SocketPipeWorker > | controllerPipe |
Real | robotTime |
Real | timeStep |
int | numOverruns |
bool | stopFlag |
Mutex * | controllerMutex |
Public Attributes inherited from ControlledRobot | |
Robot * | klamptRobotModel |
RobotController * | klamptController |
RobotMotorCommand | command |
RobotSensors | sensors |
A Klamp't controlled robot that communicates to a robot (either real or virtual) using the Klamp't controller serialization mechanism. Acts as a client connecting to the given host.
You usually use this if you want to set up a Klamp't C++ controller running as a standalone program to communicate with SimTest.
bool SerialControlledRobot::Run | ( | ) |
This call will run the controller forever and never terminate unless an external thread calls Stop()