iCub-main
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ClientCartesianController Class Reference

clientcartesiancontroller : implements the client part of the Cartesian Interface. More...

#include <ClientCartesianController.h>

+ Inheritance diagram for ClientCartesianController:

Public Member Functions

 ClientCartesianController ()
 
 ClientCartesianController (yarp::os::Searchable &config)
 
bool open (yarp::os::Searchable &config)
 
bool close ()
 
bool setTrackingMode (const bool f)
 
bool getTrackingMode (bool *f)
 
bool setReferenceMode (const bool f)
 
bool getReferenceMode (bool *f)
 
bool setPosePriority (const std::string &p)
 
bool getPosePriority (std::string &p)
 
bool getPose (yarp::sig::Vector &x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL)
 
bool getPose (const int axis, yarp::sig::Vector &x, yarp::sig::Vector &o, yarp::os::Stamp *stamp=NULL)
 
bool goToPose (const yarp::sig::Vector &xd, const yarp::sig::Vector &od, const double t=0.0)
 
bool goToPosition (const yarp::sig::Vector &xd, const double t=0.0)
 
bool goToPoseSync (const yarp::sig::Vector &xd, const yarp::sig::Vector &od, const double t=0.0)
 
bool goToPositionSync (const yarp::sig::Vector &xd, const double t=0.0)
 
bool getDesired (yarp::sig::Vector &xdhat, yarp::sig::Vector &odhat, yarp::sig::Vector &qdhat)
 
bool askForPose (const yarp::sig::Vector &xd, const yarp::sig::Vector &od, yarp::sig::Vector &xdhat, yarp::sig::Vector &odhat, yarp::sig::Vector &qdhat)
 
bool askForPose (const yarp::sig::Vector &q0, const yarp::sig::Vector &xd, const yarp::sig::Vector &od, yarp::sig::Vector &xdhat, yarp::sig::Vector &odhat, yarp::sig::Vector &qdhat)
 
bool askForPosition (const yarp::sig::Vector &xd, yarp::sig::Vector &xdhat, yarp::sig::Vector &odhat, yarp::sig::Vector &qdhat)
 
bool askForPosition (const yarp::sig::Vector &q0, const yarp::sig::Vector &xd, yarp::sig::Vector &xdhat, yarp::sig::Vector &odhat, yarp::sig::Vector &qdhat)
 
bool getDOF (yarp::sig::Vector &curDof)
 
bool setDOF (const yarp::sig::Vector &newDof, yarp::sig::Vector &curDof)
 
bool getRestPos (yarp::sig::Vector &curRestPos)
 
bool setRestPos (const yarp::sig::Vector &newRestPos, yarp::sig::Vector &curRestPos)
 
bool getRestWeights (yarp::sig::Vector &curRestWeights)
 
bool setRestWeights (const yarp::sig::Vector &newRestWeights, yarp::sig::Vector &curRestWeights)
 
bool getLimits (const int axis, double *min, double *max)
 
bool setLimits (const int axis, const double min, const double max)
 
bool getTrajTime (double *t)
 
bool setTrajTime (const double t)
 
bool getInTargetTol (double *tol)
 
bool setInTargetTol (const double tol)
 
bool getJointsVelocities (yarp::sig::Vector &qdot)
 
bool getTaskVelocities (yarp::sig::Vector &xdot, yarp::sig::Vector &odot)
 
bool setTaskVelocities (const yarp::sig::Vector &xdot, const yarp::sig::Vector &odot)
 
bool attachTipFrame (const yarp::sig::Vector &x, const yarp::sig::Vector &o)
 
bool getTipFrame (yarp::sig::Vector &x, yarp::sig::Vector &o)
 
bool removeTipFrame ()
 
bool checkMotionDone (bool *f)
 
bool waitMotionDone (const double period=0.1, const double timeout=0.0)
 
bool stopControl ()
 
bool storeContext (int *id)
 
bool restoreContext (const int id)
 
bool deleteContext (const int id)
 
bool getInfo (yarp::os::Bottle &info)
 
bool registerEvent (yarp::dev::CartesianEvent &event)
 
bool unregisterEvent (yarp::dev::CartesianEvent &event)
 
bool tweakSet (const yarp::os::Bottle &options)
 
bool tweakGet (yarp::os::Bottle &options)
 
virtual ~ClientCartesianController ()
 

Protected Member Functions

void init ()
 
bool deleteContexts ()
 
void eventHandling (yarp::os::Bottle &event)
 
bool getInfoHelper (yarp::os::Bottle &info)
 

Protected Attributes

bool connected
 
bool closed
 
double timeout
 
double lastPoseMsgArrivalTime
 
yarp::sig::Vector pose
 
yarp::os::Stamp poseStamp
 
yarp::os::BufferedPort< yarp::sig::Vector > portState
 
yarp::os::BufferedPort< yarp::os::Bottle > portCmd
 
yarp::os::RpcClient portRpc
 
std::set< int > contextIdList
 
std::map< std::string, yarp::dev::CartesianEvent * > eventsMap
 
CartesianEventHandler portEvents
 

Friends

class CartesianEventHandler
 

Additional Inherited Members

- Static Protected Member Functions inherited from iCub::iKin::CartesianHelper
static void addVectorOption (yarp::os::Bottle &b, const int vcb, const yarp::sig::Vector &v)
 
static bool getDesiredOption (const yarp::os::Bottle &reply, yarp::sig::Vector &xdhat, yarp::sig::Vector &odhat, yarp::sig::Vector &qdhat)
 
static void addTargetOption (yarp::os::Bottle &b, const yarp::sig::Vector &xd)
 Appends to a bottle all data needed to command a target. More...
 
static void addDOFOption (yarp::os::Bottle &b, const yarp::sig::Vector &dof)
 Appends to a bottle all data needed to reconfigure chain's dof. More...
 
static void addJointsResPosOption (yarp::os::Bottle &b, const yarp::sig::Vector &restPos)
 Appends to a bottle all data needed to modify joints rest position. More...
 
static void addJointsRestWeightsOption (yarp::os::Bottle &b, const yarp::sig::Vector &restWeights)
 Appends to a bottle all data needed to modify joints rest weights. More...
 
static void addPoseOption (yarp::os::Bottle &b, const unsigned int pose)
 Appends to a bottle all data needed to change the pose mode. More...
 
static void addModeOption (yarp::os::Bottle &b, const bool tracking)
 Appends to a bottle all data needed to change the tracking mode. More...
 
static void addTokenOption (yarp::os::Bottle &b, const double token)
 Appends to a bottle a token to be exchanged with the solver. More...
 
static yarp::os::Bottle * getTargetOption (const yarp::os::Bottle &b)
 Retrieves commanded target data from a bottle. More...
 
static yarp::os::Bottle * getEndEffectorPoseOption (const yarp::os::Bottle &b)
 Retrieves the end-effector pose data. More...
 
static yarp::os::Bottle * getJointsOption (const yarp::os::Bottle &b)
 Retrieves the joints configuration data. More...
 
static bool getTokenOption (const yarp::os::Bottle &b, double *token)
 Retrieves the token from the bottle. More...
 
static bool computeFixationPointData (iKinChain &eyeL, iKinChain &eyeR, yarp::sig::Vector &fp)
 Retrieves current fixation point given the current kinematics configuration of the eyes. More...
 
static bool computeFixationPointData (iKinChain &eyeL, iKinChain &eyeR, yarp::sig::Vector &fp, yarp::sig::Matrix &J)
 Retrieves current fixation point and its Jacobian wrt eyes tilt-pan-vergence dofs given the current kinematics configuration of the eyes. More...
 

Detailed Description

clientcartesiancontroller : implements the client part of the Cartesian Interface.

Note
Please read carefully the Cartesian Interface documentation.
YARP device name
clientcartesiancontroller

Definition at line 63 of file ClientCartesianController.h.

Constructor & Destructor Documentation

◆ ClientCartesianController() [1/2]

ClientCartesianController::ClientCartesianController ( )

Definition at line 60 of file ClientCartesianController.cpp.

◆ ClientCartesianController() [2/2]

ClientCartesianController::ClientCartesianController ( yarp::os::Searchable &  config)

◆ ~ClientCartesianController()

ClientCartesianController::~ClientCartesianController ( )
virtual

Definition at line 1601 of file ClientCartesianController.cpp.

Member Function Documentation

◆ askForPose() [1/2]

bool ClientCartesianController::askForPose ( const yarp::sig::Vector &  q0,
const yarp::sig::Vector &  xd,
const yarp::sig::Vector &  od,
yarp::sig::Vector &  xdhat,
yarp::sig::Vector &  odhat,
yarp::sig::Vector &  qdhat 
)

◆ askForPose() [2/2]

bool ClientCartesianController::askForPose ( const yarp::sig::Vector &  xd,
const yarp::sig::Vector &  od,
yarp::sig::Vector &  xdhat,
yarp::sig::Vector &  odhat,
yarp::sig::Vector &  qdhat 
)

◆ askForPosition() [1/2]

bool ClientCartesianController::askForPosition ( const yarp::sig::Vector &  q0,
const yarp::sig::Vector &  xd,
yarp::sig::Vector &  xdhat,
yarp::sig::Vector &  odhat,
yarp::sig::Vector &  qdhat 
)

◆ askForPosition() [2/2]

bool ClientCartesianController::askForPosition ( const yarp::sig::Vector &  xd,
yarp::sig::Vector &  xdhat,
yarp::sig::Vector &  odhat,
yarp::sig::Vector &  qdhat 
)

◆ attachTipFrame()

bool ClientCartesianController::attachTipFrame ( const yarp::sig::Vector &  x,
const yarp::sig::Vector &  o 
)

Definition at line 1132 of file ClientCartesianController.cpp.

◆ checkMotionDone()

bool ClientCartesianController::checkMotionDone ( bool *  f)

Definition at line 1216 of file ClientCartesianController.cpp.

◆ close()

bool ClientCartesianController::close ( void  )

Definition at line 180 of file ClientCartesianController.cpp.

◆ deleteContext()

bool ClientCartesianController::deleteContext ( const int  id)

Definition at line 1337 of file ClientCartesianController.cpp.

◆ deleteContexts()

bool ClientCartesianController::deleteContexts ( )
protected

Definition at line 1363 of file ClientCartesianController.cpp.

◆ eventHandling()

void ClientCartesianController::eventHandling ( yarp::os::Bottle &  event)
protected

Definition at line 1425 of file ClientCartesianController.cpp.

◆ getDesired()

bool ClientCartesianController::getDesired ( yarp::sig::Vector &  xdhat,
yarp::sig::Vector &  odhat,
yarp::sig::Vector &  qdhat 
)

Definition at line 551 of file ClientCartesianController.cpp.

◆ getDOF()

bool ClientCartesianController::getDOF ( yarp::sig::Vector &  curDof)

Definition at line 679 of file ClientCartesianController.cpp.

◆ getInfo()

bool ClientCartesianController::getInfo ( yarp::os::Bottle &  info)

Definition at line 1415 of file ClientCartesianController.cpp.

◆ getInfoHelper()

bool ClientCartesianController::getInfoHelper ( yarp::os::Bottle &  info)
protected

Definition at line 1387 of file ClientCartesianController.cpp.

◆ getInTargetTol()

bool ClientCartesianController::getInTargetTol ( double *  tol)

Definition at line 987 of file ClientCartesianController.cpp.

◆ getJointsVelocities()

bool ClientCartesianController::getJointsVelocities ( yarp::sig::Vector &  qdot)

Definition at line 1037 of file ClientCartesianController.cpp.

◆ getLimits()

bool ClientCartesianController::getLimits ( const int  axis,
double *  min,
double *  max 
)

Definition at line 881 of file ClientCartesianController.cpp.

◆ getPose() [1/2]

bool ClientCartesianController::getPose ( const int  axis,
yarp::sig::Vector &  x,
yarp::sig::Vector &  o,
yarp::os::Stamp *  stamp = NULL 
)

◆ getPose() [2/2]

bool ClientCartesianController::getPose ( yarp::sig::Vector &  x,
yarp::sig::Vector &  o,
yarp::os::Stamp *  stamp = NULL 
)

◆ getPosePriority()

bool ClientCartesianController::getPosePriority ( std::string &  p)

Definition at line 339 of file ClientCartesianController.cpp.

◆ getReferenceMode()

bool ClientCartesianController::getReferenceMode ( bool *  f)

Definition at line 284 of file ClientCartesianController.cpp.

◆ getRestPos()

bool ClientCartesianController::getRestPos ( yarp::sig::Vector &  curRestPos)

Definition at line 749 of file ClientCartesianController.cpp.

◆ getRestWeights()

bool ClientCartesianController::getRestWeights ( yarp::sig::Vector &  curRestWeights)

Definition at line 815 of file ClientCartesianController.cpp.

◆ getTaskVelocities()

bool ClientCartesianController::getTaskVelocities ( yarp::sig::Vector &  xdot,
yarp::sig::Vector &  odot 
)

Definition at line 1070 of file ClientCartesianController.cpp.

◆ getTipFrame()

bool ClientCartesianController::getTipFrame ( yarp::sig::Vector &  x,
yarp::sig::Vector &  o 
)

Definition at line 1172 of file ClientCartesianController.cpp.

◆ getTrackingMode()

bool ClientCartesianController::getTrackingMode ( bool *  f)

Definition at line 228 of file ClientCartesianController.cpp.

◆ getTrajTime()

bool ClientCartesianController::getTrajTime ( double *  t)

Definition at line 937 of file ClientCartesianController.cpp.

◆ goToPose()

bool ClientCartesianController::goToPose ( const yarp::sig::Vector &  xd,
const yarp::sig::Vector &  od,
const double  t = 0.0 
)

Definition at line 447 of file ClientCartesianController.cpp.

◆ goToPoseSync()

bool ClientCartesianController::goToPoseSync ( const yarp::sig::Vector &  xd,
const yarp::sig::Vector &  od,
const double  t = 0.0 
)

Definition at line 497 of file ClientCartesianController.cpp.

◆ goToPosition()

bool ClientCartesianController::goToPosition ( const yarp::sig::Vector &  xd,
const double  t = 0.0 
)

Definition at line 474 of file ClientCartesianController.cpp.

◆ goToPositionSync()

bool ClientCartesianController::goToPositionSync ( const yarp::sig::Vector &  xd,
const double  t = 0.0 
)

Definition at line 526 of file ClientCartesianController.cpp.

◆ init()

void ClientCartesianController::init ( )
protected

Definition at line 75 of file ClientCartesianController.cpp.

◆ open()

bool ClientCartesianController::open ( yarp::os::Searchable &  config)

Definition at line 90 of file ClientCartesianController.cpp.

◆ registerEvent()

bool ClientCartesianController::registerEvent ( yarp::dev::CartesianEvent &  event)

Definition at line 1477 of file ClientCartesianController.cpp.

◆ removeTipFrame()

bool ClientCartesianController::removeTipFrame ( )

Definition at line 1209 of file ClientCartesianController.cpp.

◆ restoreContext()

bool ClientCartesianController::restoreContext ( const int  id)

Definition at line 1317 of file ClientCartesianController.cpp.

◆ setDOF()

bool ClientCartesianController::setDOF ( const yarp::sig::Vector &  newDof,
yarp::sig::Vector &  curDof 
)

Definition at line 712 of file ClientCartesianController.cpp.

◆ setInTargetTol()

bool ClientCartesianController::setInTargetTol ( const double  tol)

Definition at line 1016 of file ClientCartesianController.cpp.

◆ setLimits()

bool ClientCartesianController::setLimits ( const int  axis,
const double  min,
const double  max 
)

Definition at line 913 of file ClientCartesianController.cpp.

◆ setPosePriority()

bool ClientCartesianController::setPosePriority ( const std::string &  p)

Definition at line 318 of file ClientCartesianController.cpp.

◆ setReferenceMode()

bool ClientCartesianController::setReferenceMode ( const bool  f)

Definition at line 262 of file ClientCartesianController.cpp.

◆ setRestPos()

bool ClientCartesianController::setRestPos ( const yarp::sig::Vector &  newRestPos,
yarp::sig::Vector &  curRestPos 
)

Definition at line 782 of file ClientCartesianController.cpp.

◆ setRestWeights()

bool ClientCartesianController::setRestWeights ( const yarp::sig::Vector &  newRestWeights,
yarp::sig::Vector &  curRestWeights 
)

Definition at line 848 of file ClientCartesianController.cpp.

◆ setTaskVelocities()

bool ClientCartesianController::setTaskVelocities ( const yarp::sig::Vector &  xdot,
const yarp::sig::Vector &  odot 
)

Definition at line 1107 of file ClientCartesianController.cpp.

◆ setTrackingMode()

bool ClientCartesianController::setTrackingMode ( const bool  f)

Definition at line 206 of file ClientCartesianController.cpp.

◆ setTrajTime()

bool ClientCartesianController::setTrajTime ( const double  t)

Definition at line 966 of file ClientCartesianController.cpp.

◆ stopControl()

bool ClientCartesianController::stopControl ( )

Definition at line 1270 of file ClientCartesianController.cpp.

◆ storeContext()

bool ClientCartesianController::storeContext ( int *  id)

Definition at line 1289 of file ClientCartesianController.cpp.

◆ tweakGet()

bool ClientCartesianController::tweakGet ( yarp::os::Bottle &  options)

Definition at line 1570 of file ClientCartesianController.cpp.

◆ tweakSet()

bool ClientCartesianController::tweakSet ( const yarp::os::Bottle &  options)

Definition at line 1549 of file ClientCartesianController.cpp.

◆ unregisterEvent()

bool ClientCartesianController::unregisterEvent ( yarp::dev::CartesianEvent &  event)

Definition at line 1513 of file ClientCartesianController.cpp.

◆ waitMotionDone()

bool ClientCartesianController::waitMotionDone ( const double  period = 0.1,
const double  timeout = 0.0 
)

Definition at line 1251 of file ClientCartesianController.cpp.

Friends And Related Function Documentation

◆ CartesianEventHandler

friend class CartesianEventHandler
friend

Definition at line 84 of file ClientCartesianController.h.

Member Data Documentation

◆ closed

bool ClientCartesianController::closed
protected

Definition at line 69 of file ClientCartesianController.h.

◆ connected

bool ClientCartesianController::connected
protected

Definition at line 68 of file ClientCartesianController.h.

◆ contextIdList

std::set<int> ClientCartesianController::contextIdList
protected

Definition at line 81 of file ClientCartesianController.h.

◆ eventsMap

std::map<std::string,yarp::dev::CartesianEvent*> ClientCartesianController::eventsMap
protected

Definition at line 82 of file ClientCartesianController.h.

◆ lastPoseMsgArrivalTime

double ClientCartesianController::lastPoseMsgArrivalTime
protected

Definition at line 72 of file ClientCartesianController.h.

◆ portCmd

yarp::os::BufferedPort<yarp::os::Bottle> ClientCartesianController::portCmd
protected

Definition at line 78 of file ClientCartesianController.h.

◆ portEvents

CartesianEventHandler ClientCartesianController::portEvents
protected

Definition at line 83 of file ClientCartesianController.h.

◆ portRpc

yarp::os::RpcClient ClientCartesianController::portRpc
protected

Definition at line 79 of file ClientCartesianController.h.

◆ portState

yarp::os::BufferedPort<yarp::sig::Vector> ClientCartesianController::portState
protected

Definition at line 77 of file ClientCartesianController.h.

◆ pose

yarp::sig::Vector ClientCartesianController::pose
protected

Definition at line 74 of file ClientCartesianController.h.

◆ poseStamp

yarp::os::Stamp ClientCartesianController::poseStamp
protected

Definition at line 75 of file ClientCartesianController.h.

◆ timeout

double ClientCartesianController::timeout
protected

Definition at line 71 of file ClientCartesianController.h.


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