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

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>

Inheritance diagram for SerialControlledRobot:
ControlledRobot

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
RobotklamptRobotModel
 
RobotControllerklamptController
 
RobotMotorCommand command
 
RobotSensors sensors
 

Detailed Description

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.

Member Function Documentation

bool SerialControlledRobot::Run ( )

This call will run the controller forever and never terminate unless an external thread calls Stop()


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