The meat and potatoes of the controller server. More...
#include <Thread.h>
Classes | |
| class | ControllerRpcServerCallback | 
| A callback function which binds the rpc server port opened in the contoller server module to the controller thread's parsing function.  More... | |
| class | DebugRpcServerCallback | 
| A callback function which binds the rpc server port opened in the contoller server module to the controller thread's parsing function.  More... | |
Public Member Functions | |
| Thread (OcraControllerOptions &controller_options, std::shared_ptr< wbi::wholeBodyInterface > wbi) | |
| virtual | ~Thread () | 
| bool | threadInit () | 
| void | run () | 
| void | threadRelease () | 
Private Member Functions | |
| ocra_icub::OCRA_ICUB_MESSAGE | convertStringToOcraIcubMessage (const std::string &s) | 
| void | parseIncomingMessage (yarp::os::Bottle &input, yarp::os::Bottle &reply) | 
| void | parseDebugMessage (yarp::os::Bottle &input, yarp::os::Bottle &reply) | 
| void | writeDebugData () | 
| void | putAnklesIntoIdle (double idleTime) | 
| void | sendTorqueReferenceToDebugJoint (int idx) | 
| bool | setDebugJointToTorqueMode (int idx) | 
Private Attributes | |
| ocra::Model::Ptr | model | 
| std::shared_ptr < IcubControllerServer >  | ctrlServer | 
| Eigen::ArrayXd | minTorques | 
| Eigen::ArrayXd | maxTorques | 
| OcraControllerOptions | ctrlOptions | 
| std::shared_ptr < wbi::wholeBodyInterface >  | yarpWbi | 
| Eigen::VectorXd | torques | 
| Eigen::VectorXd | initialPosture | 
| ocra_icub::OCRA_ICUB_MESSAGE | controllerStatus | 
| ControllerRpcServerCallback::shared_ptr | rpcServerCallback | 
| yarp::os::RpcServer | rpcServerPort | 
| int | debugJointIndex | 
| yarp::os::RpcServer | debugRpcPort | 
| yarp::os::Port | debugRefOutPort | 
| yarp::os::Port | debugRealOutPort | 
| DebugRpcServerCallback::shared_ptr | debugRpcCallback | 
| Eigen::VectorXd | measuredTorques | 
| bool | debuggingAllJoints | 
| bool | userHasSetDebugIndex | 
| Eigen::Displacementd | l_foot_disp_inverse | 
| iDynTree::SimpleLeggedOdometry | odometry | 
Static Private Attributes | |
| static const int | ALL_JOINTS = -1 | 
| static const int | TORQUE_MIN = -24 | 
| static const int | TORQUE_MAX = 24 | 
The meat and potatoes of the controller server.
| Thread::Thread | ( | OcraControllerOptions & | controller_options, | 
| std::shared_ptr< wbi::wholeBodyInterface > | wbi | ||
| ) | 
Constructor
| controller_options | The various arguments and options used to define what type of controller and tasks to use. See OcraControllerOptions. | 
| wbi | A shared pointer to a wholeBodyInterface object. | 
| Thread::~Thread | ( | ) |  [virtual] | 
        
| ocra_icub::OCRA_ICUB_MESSAGE Thread::convertStringToOcraIcubMessage | ( | const std::string & | s | ) |  [private] | 
        
| void Thread::parseDebugMessage | ( | yarp::os::Bottle & | input, | 
| yarp::os::Bottle & | reply | ||
| ) |  [private] | 
        
| void Thread::parseIncomingMessage | ( | yarp::os::Bottle & | input, | 
| yarp::os::Bottle & | reply | ||
| ) |  [private] | 
        
| void Thread::putAnklesIntoIdle | ( | double | idleTime | ) |  [private] | 
        
| void Thread::run | ( | ) | 
| void Thread::sendTorqueReferenceToDebugJoint | ( | int | idx | ) |  [private] | 
        
| bool Thread::setDebugJointToTorqueMode | ( | int | idx | ) |  [private] | 
        
| bool Thread::threadInit | ( | ) | 
| void Thread::threadRelease | ( | ) | 
| void Thread::writeDebugData | ( | ) |  [private] | 
        
const int Thread::ALL_JOINTS = -1 [static, private] | 
        
Maximum possible actuator torques
OcraControllerOptions Thread::ctrlOptions [private] | 
        
The controller options.
std::shared_ptr<IcubControllerServer> Thread::ctrlServer [private] | 
        
bool Thread::debuggingAllJoints [private] | 
        
int Thread::debugJointIndex [private] | 
        
yarp::os::Port Thread::debugRealOutPort [private] | 
        
yarp::os::Port Thread::debugRefOutPort [private] | 
        
DebugRpcServerCallback::shared_ptr Thread::debugRpcCallback [private] | 
        
Rpc server port callback function.
yarp::os::RpcServer Thread::debugRpcPort [private] | 
        
Eigen::VectorXd Thread::initialPosture [private] | 
        
The torques calculated at each run() loop.
Eigen::Displacementd Thread::l_foot_disp_inverse [private] | 
        
For gazebo visualization. You can't get the l_sole pose directly in gazebo, but you can get the l_foot, so since all poses from ocra::Model are calculated in the l_sole then we need to go from l_sole to l_foot.
Eigen::ArrayXd Thread::maxTorques [private] | 
        
An eigen array filled with the max torques.
Eigen::VectorXd Thread::measuredTorques [private] | 
        
Eigen::ArrayXd Thread::minTorques [private] | 
        
An eigen array filled with the min torques.
ocra::Model::Ptr Thread::model [private] | 
        
iDynTree::SimpleLeggedOdometry Thread::odometry [private] | 
        
Odometry object
ControllerRpcServerCallback::shared_ptr Thread::rpcServerCallback [private] | 
        
Rpc server port callback function.
yarp::os::RpcServer Thread::rpcServerPort [private] | 
        
Rpc server port.
const int Thread::TORQUE_MAX = 24 [static, private] | 
        
Maximum possible actuator torques
const int Thread::TORQUE_MIN = -24 [static, private] | 
        
Minimum possible actuator torques
Eigen::VectorXd Thread::torques [private] | 
        
The torques calculated at each run() loop.
bool Thread::userHasSetDebugIndex [private] | 
        
std::shared_ptr<wbi::wholeBodyInterface> Thread::yarpWbi [private] | 
        
The WBI used to talk to the robot.