iCub-main
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CtrlThread Class Reference
+ Inheritance diagram for CtrlThread:

Public Member Functions

 CtrlThread (unsigned int _period, ResourceFinder &_rf, string _remote, string _local)
 
bool threadInit ()
 
void afterStart (bool s)
 
void run ()
 
void threadRelease ()
 
void limitTorsoPitch (const int axis)
 
double calcExecTime (const Vector &xd)
 
void printStatus ()
 
 CtrlThread (unsigned int _period, ResourceFinder &_rf)
 
virtual bool threadInit ()
 
virtual void afterStart (bool s)
 
virtual void run ()
 
virtual void threadRelease ()
 
void printStatus ()
 
 CtrlThread (const double period)
 
virtual bool threadInit ()
 
virtual void afterStart (bool s)
 
virtual void run ()
 
virtual void threadRelease ()
 
void generateTarget ()
 
void limitTorsoPitch ()
 
void printStatus ()
 
 CtrlThread (const double period)
 
virtual bool threadInit ()
 
virtual void afterStart (bool s)
 
virtual void run ()
 
virtual void threadRelease ()
 
void generateTarget ()
 
void storeInterestingPoint ()
 
void printStatus ()
 

Protected Member Functions

virtual void cartesianEventCallback ()
 
virtual void gazeEventCallback ()
 

Protected Attributes

ResourceFinder & rf
 
PolyDriver driver
 
ICartesianControl * iarm
 
BufferedPort< Bottle > port_xd
 
bool ctrlCompletePose
 
bool reinstateContext
 
string remote
 
string local
 
int startup_context_id
 
int task_context_id
 
Vector xd
 
Vector od
 
double defaultExecTime
 
double t0
 
BufferedPort< Bottle > port_command
 
BufferedPort< Bottle > port_axis_only
 
BufferedPort< Bottle > port_buttons_only
 
bool silent
 
bool force_cfg
 
int numAxes
 
int numBalls
 
int numHats
 
int numButtons
 
int joy_id
 
SDL_Joystick * joy1
 
string button_actions [20]
 
string hat_actions [20]
 
int * rawButtons
 
int * rawButtonsOld
 
int * rawHats
 
int * rawHatsOld
 
double * rawAxes
 
double * outAxes
 
int num_inputs
 
int num_outputs
 
double * inputMax
 
double * inputMin
 
double * outputMax
 
double * outputMin
 
double * jointDeadband
 
int * reverse
 
struct_jointProperties * jointProperties
 
PolyDriver client
 
ICartesianControl * icart
 
double t
 
double t1
 
PolyDriver clientGaze
 
PolyDriver clientTorso
 
IGazeControl * igaze
 
IEncoders * ienc
 
IPositionControl * ipos
 
int state
 
Vector fp
 
deque< Vector > poiList
 
mutex mtx
 
double t2
 
double t3
 

Detailed Description

Definition at line 144 of file main.cpp.

Constructor & Destructor Documentation

◆ CtrlThread() [1/4]

CtrlThread::CtrlThread ( unsigned int  _period,
ResourceFinder &  _rf,
string  _remote,
string  _local 
)
inline

Definition at line 167 of file main.cpp.

◆ CtrlThread() [2/4]

CtrlThread::CtrlThread ( unsigned int  _period,
ResourceFinder &  _rf 
)
inline

Definition at line 158 of file main.cpp.

◆ CtrlThread() [3/4]

CtrlThread::CtrlThread ( const double  period)
inline

Definition at line 56 of file tutorial_cartesian_interface.cpp.

◆ CtrlThread() [4/4]

CtrlThread::CtrlThread ( const double  period)
inline

Definition at line 91 of file tutorial_gaze_interface.cpp.

Member Function Documentation

◆ afterStart() [1/4]

virtual void CtrlThread::afterStart ( bool  s)
inlinevirtual

Definition at line 128 of file tutorial_cartesian_interface.cpp.

◆ afterStart() [2/4]

virtual void CtrlThread::afterStart ( bool  s)
inlinevirtual

Definition at line 155 of file tutorial_gaze_interface.cpp.

◆ afterStart() [3/4]

void CtrlThread::afterStart ( bool  s)
inline

Definition at line 265 of file main.cpp.

◆ afterStart() [4/4]

virtual void CtrlThread::afterStart ( bool  s)
inlinevirtual

Definition at line 501 of file main.cpp.

◆ calcExecTime()

double CtrlThread::calcExecTime ( const Vector &  xd)
inline

Definition at line 318 of file main.cpp.

◆ cartesianEventCallback()

virtual void CtrlThread::cartesianEventCallback ( )
inlineprotectedvirtual

Definition at line 50 of file tutorial_cartesian_interface.cpp.

◆ gazeEventCallback()

virtual void CtrlThread::gazeEventCallback ( )
inlineprotectedvirtual

Definition at line 66 of file tutorial_gaze_interface.cpp.

◆ generateTarget() [1/2]

void CtrlThread::generateTarget ( )
inline

Definition at line 165 of file tutorial_cartesian_interface.cpp.

◆ generateTarget() [2/2]

void CtrlThread::generateTarget ( )
inline

Definition at line 242 of file tutorial_gaze_interface.cpp.

◆ limitTorsoPitch() [1/2]

void CtrlThread::limitTorsoPitch ( )
inline

Definition at line 181 of file tutorial_cartesian_interface.cpp.

◆ limitTorsoPitch() [2/2]

void CtrlThread::limitTorsoPitch ( const int  axis)
inline

Definition at line 311 of file main.cpp.

◆ printStatus() [1/4]

void CtrlThread::printStatus ( )
inline

Definition at line 196 of file tutorial_cartesian_interface.cpp.

◆ printStatus() [2/4]

void CtrlThread::printStatus ( )
inline

Definition at line 275 of file tutorial_gaze_interface.cpp.

◆ printStatus() [3/4]

void CtrlThread::printStatus ( )
inline

Definition at line 329 of file main.cpp.

◆ printStatus() [4/4]

void CtrlThread::printStatus ( )
inline

Definition at line 759 of file main.cpp.

◆ run() [1/4]

virtual void CtrlThread::run ( )
inlinevirtual

Definition at line 138 of file tutorial_cartesian_interface.cpp.

◆ run() [2/4]

virtual void CtrlThread::run ( )
inlinevirtual

Definition at line 163 of file tutorial_gaze_interface.cpp.

◆ run() [3/4]

void CtrlThread::run ( )
inline

Definition at line 275 of file main.cpp.

◆ run() [4/4]

virtual void CtrlThread::run ( )
inlinevirtual

Definition at line 511 of file main.cpp.

◆ storeInterestingPoint()

void CtrlThread::storeInterestingPoint ( )
inline

Definition at line 252 of file tutorial_gaze_interface.cpp.

◆ threadInit() [1/4]

virtual bool CtrlThread::threadInit ( )
inlinevirtual

Definition at line 64 of file tutorial_cartesian_interface.cpp.

◆ threadInit() [2/4]

virtual bool CtrlThread::threadInit ( )
inlinevirtual

Definition at line 98 of file tutorial_gaze_interface.cpp.

◆ threadInit() [3/4]

bool CtrlThread::threadInit ( )
inline

Definition at line 173 of file main.cpp.

◆ threadInit() [4/4]

virtual bool CtrlThread::threadInit ( )
inlinevirtual

Definition at line 182 of file main.cpp.

◆ threadRelease() [1/4]

virtual void CtrlThread::threadRelease ( )
inlinevirtual

Definition at line 152 of file tutorial_cartesian_interface.cpp.

◆ threadRelease() [2/4]

virtual void CtrlThread::threadRelease ( )
inlinevirtual

Definition at line 228 of file tutorial_gaze_interface.cpp.

◆ threadRelease() [3/4]

void CtrlThread::threadRelease ( )
inline

Definition at line 301 of file main.cpp.

◆ threadRelease() [4/4]

virtual void CtrlThread::threadRelease ( )
inlinevirtual

Definition at line 736 of file main.cpp.

Member Data Documentation

◆ button_actions

string CtrlThread::button_actions[20]
protected

Definition at line 133 of file main.cpp.

◆ client

PolyDriver CtrlThread::client
protected

Definition at line 37 of file tutorial_cartesian_interface.cpp.

◆ clientGaze

PolyDriver CtrlThread::clientGaze
protected

Definition at line 45 of file tutorial_gaze_interface.cpp.

◆ clientTorso

PolyDriver CtrlThread::clientTorso
protected

Definition at line 46 of file tutorial_gaze_interface.cpp.

◆ ctrlCompletePose

bool CtrlThread::ctrlCompletePose
protected

Definition at line 151 of file main.cpp.

◆ defaultExecTime

double CtrlThread::defaultExecTime
protected

Definition at line 162 of file main.cpp.

◆ driver

PolyDriver CtrlThread::driver
protected

Definition at line 147 of file main.cpp.

◆ force_cfg

bool CtrlThread::force_cfg
protected

Definition at line 121 of file main.cpp.

◆ fp

Vector CtrlThread::fp
protected

Definition at line 54 of file tutorial_gaze_interface.cpp.

◆ hat_actions

string CtrlThread::hat_actions[20]
protected

Definition at line 136 of file main.cpp.

◆ iarm

ICartesianControl* CtrlThread::iarm
protected

Definition at line 148 of file main.cpp.

◆ icart

ICartesianControl* CtrlThread::icart
protected

Definition at line 38 of file tutorial_cartesian_interface.cpp.

◆ ienc

IEncoders* CtrlThread::ienc
protected

Definition at line 48 of file tutorial_gaze_interface.cpp.

◆ igaze

IGazeControl* CtrlThread::igaze
protected

Definition at line 47 of file tutorial_gaze_interface.cpp.

◆ inputMax

double* CtrlThread::inputMax
protected

Definition at line 149 of file main.cpp.

◆ inputMin

double* CtrlThread::inputMin
protected

Definition at line 150 of file main.cpp.

◆ ipos

IPositionControl* CtrlThread::ipos
protected

Definition at line 49 of file tutorial_gaze_interface.cpp.

◆ jointDeadband

double* CtrlThread::jointDeadband
protected

Definition at line 153 of file main.cpp.

◆ jointProperties

struct_jointProperties* CtrlThread::jointProperties
protected

Definition at line 155 of file main.cpp.

◆ joy1

SDL_Joystick* CtrlThread::joy1
protected

Definition at line 130 of file main.cpp.

◆ joy_id

int CtrlThread::joy_id
protected

Definition at line 129 of file main.cpp.

◆ local

string CtrlThread::local
protected

Definition at line 154 of file main.cpp.

◆ mtx

mutex CtrlThread::mtx
protected

Definition at line 57 of file tutorial_gaze_interface.cpp.

◆ num_inputs

int CtrlThread::num_inputs
protected

Definition at line 147 of file main.cpp.

◆ num_outputs

int CtrlThread::num_outputs
protected

Definition at line 148 of file main.cpp.

◆ numAxes

int CtrlThread::numAxes
protected

Definition at line 125 of file main.cpp.

◆ numBalls

int CtrlThread::numBalls
protected

Definition at line 126 of file main.cpp.

◆ numButtons

int CtrlThread::numButtons
protected

Definition at line 128 of file main.cpp.

◆ numHats

int CtrlThread::numHats
protected

Definition at line 127 of file main.cpp.

◆ od

Vector CtrlThread::od
protected

Definition at line 160 of file main.cpp.

◆ outAxes

double* CtrlThread::outAxes
protected

Definition at line 144 of file main.cpp.

◆ outputMax

double* CtrlThread::outputMax
protected

Definition at line 151 of file main.cpp.

◆ outputMin

double* CtrlThread::outputMin
protected

Definition at line 152 of file main.cpp.

◆ poiList

deque<Vector> CtrlThread::poiList
protected

Definition at line 56 of file tutorial_gaze_interface.cpp.

◆ port_axis_only

BufferedPort<Bottle> CtrlThread::port_axis_only
protected

Definition at line 118 of file main.cpp.

◆ port_buttons_only

BufferedPort<Bottle> CtrlThread::port_buttons_only
protected

Definition at line 119 of file main.cpp.

◆ port_command

BufferedPort<Bottle> CtrlThread::port_command
protected

Definition at line 117 of file main.cpp.

◆ port_xd

BufferedPort<Bottle> CtrlThread::port_xd
protected

Definition at line 149 of file main.cpp.

◆ rawAxes

double* CtrlThread::rawAxes
protected

Definition at line 143 of file main.cpp.

◆ rawButtons

int* CtrlThread::rawButtons
protected

Definition at line 139 of file main.cpp.

◆ rawButtonsOld

int* CtrlThread::rawButtonsOld
protected

Definition at line 140 of file main.cpp.

◆ rawHats

int* CtrlThread::rawHats
protected

Definition at line 141 of file main.cpp.

◆ rawHatsOld

int* CtrlThread::rawHatsOld
protected

Definition at line 142 of file main.cpp.

◆ reinstateContext

bool CtrlThread::reinstateContext
protected

Definition at line 152 of file main.cpp.

◆ remote

string CtrlThread::remote
protected

Definition at line 153 of file main.cpp.

◆ reverse

int* CtrlThread::reverse
protected

Definition at line 154 of file main.cpp.

◆ rf

ResourceFinder & CtrlThread::rf
protected

Definition at line 146 of file main.cpp.

◆ silent

bool CtrlThread::silent
protected

Definition at line 120 of file main.cpp.

◆ startup_context_id

int CtrlThread::startup_context_id
protected

Definition at line 156 of file main.cpp.

◆ state

int CtrlThread::state
protected

Definition at line 51 of file tutorial_gaze_interface.cpp.

◆ t

double CtrlThread::t
protected

Definition at line 45 of file tutorial_cartesian_interface.cpp.

◆ t0

double CtrlThread::t0
protected

Definition at line 163 of file main.cpp.

◆ t1

double CtrlThread::t1
protected

Definition at line 47 of file tutorial_cartesian_interface.cpp.

◆ t2

double CtrlThread::t2
protected

Definition at line 62 of file tutorial_gaze_interface.cpp.

◆ t3

double CtrlThread::t3
protected

Definition at line 63 of file tutorial_gaze_interface.cpp.

◆ task_context_id

int CtrlThread::task_context_id
protected

Definition at line 157 of file main.cpp.

◆ xd

Vector CtrlThread::xd
protected

Definition at line 159 of file main.cpp.


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