YARP
Yet Another Robot Platform

fakebot: Documentation to be added More...

#include <fakebot/FakeBot.h>

+ Inheritance diagram for FakeBot:

Public Member Functions

 FakeBot ()
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
bool getImage (yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) override
 Get an rgb image from the frame grabber, if required demosaicking/color reconstruction is applied. More...
 
int height () const override
 Return the height of each frame. More...
 
int width () const override
 Return the width of each frame. More...
 
bool getAxes (int *ax) override
 Get the number of controlled axes. More...
 
bool positionMove (int j, double ref) override
 Set new reference point for a single axis. More...
 
bool positionMove (const double *refs) override
 Set new reference point for all axes. More...
 
bool relativeMove (int j, double delta) override
 Set relative position. More...
 
bool relativeMove (const double *deltas) override
 Set relative position, all joints. More...
 
bool checkMotionDone (int j, bool *flag) override
 Check if the current trajectory is terminated. More...
 
bool checkMotionDone (bool *flag) override
 Check if the current trajectory is terminated. More...
 
bool setRefSpeed (int j, double sp) override
 Set reference speed for a joint, this is the speed used during the interpolation of the trajectory. More...
 
bool setRefSpeeds (const double *spds) override
 Set reference speed on all joints. More...
 
bool setRefAcceleration (int j, double acc) override
 Set reference acceleration for a joint. More...
 
bool setRefAccelerations (const double *accs) override
 Set reference acceleration on all joints. More...
 
bool getRefSpeed (int j, double *ref) override
 Get reference speed for a joint. More...
 
bool getRefSpeeds (double *spds) override
 Get reference speed of all joints. More...
 
bool getRefAcceleration (int j, double *acc) override
 Get reference acceleration for a joint. More...
 
bool getRefAccelerations (double *accs) override
 Get reference acceleration of all joints. More...
 
bool stop (int j) override
 Stop motion, single joint. More...
 
bool stop () override
 Stop motion, multiple joints. More...
 
bool close () override
 Close the DeviceDriver. More...
 
bool resetEncoder (int j) override
 Reset encoder, single joint. More...
 
bool resetEncoders () override
 Reset encoders. More...
 
bool setEncoder (int j, double val) override
 Set the value of the encoder for a given joint. More...
 
bool setEncoders (const double *vals) override
 Set the value of all encoders. More...
 
bool getEncoder (int j, double *v) override
 Read the value of an encoder. More...
 
bool getEncoders (double *encs) override
 Read the position of all axes. More...
 
bool getEncoderSpeed (int j, double *sp) override
 Read the istantaneous speed of an axis. More...
 
bool getEncoderSpeeds (double *spds) override
 Read the instantaneous speed of all axes. More...
 
bool getEncoderAcceleration (int j, double *spds) override
 Read the instantaneous acceleration of an axis. More...
 
bool getEncoderAccelerations (double *accs) override
 Read the instantaneous acceleration of all axes. More...
 
bool positionMove (const int n_joint, const int *joints, const double *refs) override
 Set new reference point for a subset of joints. More...
 
bool relativeMove (const int n_joint, const int *joints, const double *deltas) override
 Set relative position for a subset of joints. More...
 
bool checkMotionDone (const int n_joint, const int *joints, bool *flags) override
 Check if the current trajectory is terminated. More...
 
bool setRefSpeeds (const int n_joint, const int *joints, const double *spds) override
 Set reference speed on all joints. More...
 
bool setRefAccelerations (const int n_joint, const int *joints, const double *accs) override
 Set reference acceleration on all joints. More...
 
bool getRefSpeeds (const int n_joint, const int *joints, double *spds) override
 Get reference speed of all joints. More...
 
bool getRefAccelerations (const int n_joint, const int *joints, double *accs) override
 Get reference acceleration for a joint. More...
 
bool stop (const int n_joint, const int *joints) override
 Stop motion for subset of joints. More...
 
bool getEncodersTimed (double *encs, double *time) override
 Read the instantaneous acceleration of all axes. More...
 
bool getEncoderTimed (int j, double *enc, double *time) override
 Read the instantaneous acceleration of all axes. More...
 
bool velocityMove (int j, double sp) override
 Start motion at a given speed, single joint. More...
 
bool velocityMove (const double *sp) override
 Start motion at a given speed, multiple joints. More...
 
bool velocityMove (const int n_joint, const int *joints, const double *spds) override
 Start motion at a given speed for a subset of joints. More...
 
bool enableAmp (int j) override
 Enable the amplifier on a specific joint. More...
 
bool disableAmp (int j) override
 Disable the amplifier on a specific joint. More...
 
bool getCurrent (int j, double *val) override
 
bool getCurrents (double *vals) override
 
bool getMaxCurrent (int j, double *v) override
 Returns the maximum electric current allowed for a given motor. More...
 
bool setMaxCurrent (int j, double v) override
 
bool getAmpStatus (int *st) override
 
bool getAmpStatus (int k, int *v) override
 
bool calibrateAxisWithParams (int j, unsigned int iv, double v1, double v2, double v3) override
 Start calibration, this method is very often platform specific. More...
 
bool calibrationDone (int j) override
 Check if the calibration is terminated, on a particular joint. More...
 
bool getLimits (int axis, double *min, double *max) override
 Get the software limits for a particular axis. More...
 
bool setLimits (int axis, double min, double max) override
 Set the software limits for a particular axis, the behavior of the control card when these limits are exceeded, depends on the implementation. More...
 
bool setVelLimits (int axis, double min, double max) override
 Set the software speed limits for a particular axis, the behavior of the control card when these limits are exceeded, depends on the implementation. More...
 
bool getVelLimits (int axis, double *min, double *max) override
 Get the software speed limits for a particular axis. More...
 
void run () override
 Main body of the new thread. More...
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 ~DeviceDriver () override=default
 Destructor. More...
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver. More...
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others. More...
 
- Public Member Functions inherited from yarp::os::IConfig
virtual ~IConfig ()
 Destructor. More...
 
virtual bool configure (Searchable &config)
 Change online parameters. More...
 
- Public Member Functions inherited from yarp::dev::IPositionControl
virtual ~IPositionControl ()
 Destructor. More...
 
virtual bool getTargetPosition (const int joint, double *ref)
 Get the last position reference for the specified axis. More...
 
virtual bool getTargetPositions (double *refs)
 Get the last position reference for all axes. More...
 
virtual bool getTargetPositions (const int n_joint, const int *joints, double *refs)
 Get the last position reference for the specified group of axes. More...
 
- Public Member Functions inherited from yarp::dev::IVelocityControl
virtual ~IVelocityControl ()
 Destructor. More...
 
virtual bool getRefVelocity (const int joint, double *vel)
 Get the last reference speed set by velocityMove for single joint. More...
 
virtual bool getRefVelocities (double *vels)
 Get the last reference speed set by velocityMove for all joints. More...
 
virtual bool getRefVelocities (const int n_joint, const int *joints, double *vels)
 Get the last reference speed set by velocityMove for a group of joints. More...
 
- Public Member Functions inherited from yarp::dev::IAmplifierControl
virtual ~IAmplifierControl ()
 Destructor. More...
 
virtual bool getNominalCurrent (int m, double *val)
 
virtual bool setNominalCurrent (int m, const double val)
 
virtual bool getPeakCurrent (int m, double *val)
 
virtual bool setPeakCurrent (int m, const double val)
 
virtual bool getPWM (int j, double *val)
 
virtual bool getPWMLimit (int j, double *val)
 
virtual bool setPWMLimit (int j, const double val)
 
virtual bool getPowerSupplyVoltage (int j, double *val)
 
- Public Member Functions inherited from yarp::dev::IEncodersTimed
virtual ~IEncodersTimed ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::IEncoders
virtual ~IEncoders ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::IFrameGrabberImage
virtual ~IFrameGrabberImage ()
 Destructor. More...
 
virtual bool getImageCrop (cropType_id_t cropType, yarp::sig::VectorOf< std::pair< int, int > > vertices, yarp::sig::ImageOf< yarp::sig::PixelRgb > &image)
 Get a crop of the rgb image from the frame grabber, if required demosaicking/color reconstruction is applied. More...
 
- Public Member Functions inherited from yarp::dev::IControlCalibration
 IControlCalibration ()
 
virtual ~IControlCalibration ()
 Destructor. More...
 
virtual bool setCalibrationParameters (int axis, const CalibrationParameters &params)
 Start calibration, this method is very often platform specific. More...
 
virtual bool setCalibrator (ICalibrator *c)
 Set the calibrator object to be used to calibrate the robot. More...
 
virtual bool calibrateRobot ()
 Calibrate robot by using an external calibrator. More...
 
virtual bool park (bool wait=true)
 
virtual bool abortCalibration ()
 
virtual bool abortPark ()
 
- Public Member Functions inherited from yarp::dev::IControlLimits
virtual ~IControlLimits ()
 Destructor. More...
 
- Public Member Functions inherited from yarp::dev::DeviceResponder
 DeviceResponder ()
 Constructor. More...
 
void addUsage (const char *txt, const char *explain=nullptr)
 Add information about a message that the respond() method understands. More...
 
void addUsage (const yarp::os::Bottle &bot, const char *explain=nullptr)
 Add information about a message that the respond() method understands. More...
 
virtual bool respond (const yarp::os::Bottle &command, yarp::os::Bottle &reply)
 Respond to a message. More...
 
bool read (yarp::os::ConnectionReader &connection) override
 Handler for reading messages from the network, and passing them on to the respond() method. More...
 
void onRead (yarp::os::Bottle &v) override
 Alternative handler for reading messages from the network, and passing them on to the respond() method. More...
 
void makeUsage ()
 Regenerate usage information. More...
 
void attach (yarp::os::TypedReader< yarp::os::Bottle > &source)
 Attach this object to a source of messages. More...
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor. More...
 
virtual Type getReadType () const
 
- Public Member Functions inherited from yarp::os::TypedReaderCallback< yarp::os::Bottle >
virtual ~TypedReaderCallback ()
 Destructor. More...
 
virtual void onRead (yarp::os::Bottle &datum)
 Callback method. More...
 
virtual void onRead (yarp::os::Bottle &datum, const yarp::os::TypedReader< yarp::os::Bottle > &reader)
 Callback method. More...
 
- Public Member Functions inherited from yarp::os::Thread
 Thread ()
 Constructor. More...
 
virtual ~Thread ()
 Destructor. More...
 
virtual void onStop ()
 Call-back, called while halting the thread (before join). More...
 
bool start ()
 Start the new thread running. More...
 
bool stop ()
 Stop the thread. More...
 
virtual void beforeStart ()
 Called just before a new thread starts. More...
 
virtual void afterStart (bool success)
 Called just after a new thread starts (or fails to start), this is executed by the same thread that calls start(). More...
 
virtual bool threadInit ()
 Initialization method. More...
 
virtual void threadRelease ()
 Release method. More...
 
bool isStopping ()
 Returns true if the thread is stopping (Thread::stop has been called). More...
 
bool isRunning ()
 Returns true if the thread is running (Thread::start has been called successfully and the thread has not stopped). More...
 
long int getKey ()
 Get a unique identifier for the thread. More...
 
int setPriority (int priority, int policy=-1)
 Set the priority and scheduling policy of the thread, if the OS supports that. More...
 
int getPriority ()
 Query the current priority of the thread, if the OS supports that. More...
 
int getPolicy ()
 Query the current scheduling policy of the thread, if the OS supports that. More...
 
bool join (double seconds=-1)
 The function returns when the thread execution has completed. More...
 
void setOptions (int stackSize=0)
 Set the stack size for the new thread. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from yarp::os::Thread
static int getCount ()
 Check how many threads are running. More...
 
static long int getKeyOfCaller ()
 Get a unique identifier for the calling thread. More...
 
static void yield ()
 Reschedule the execution of current thread, allowing other threads to run. More...
 
static void setDefaultStackSize (int stackSize)
 Set the default stack size for all threads created after this point. More...
 

Detailed Description

fakebot: Documentation to be added

Definition at line 26 of file FakeBot.h.

Constructor & Destructor Documentation

◆ FakeBot()

FakeBot::FakeBot ( )
inline

Definition at line 53 of file FakeBot.h.

Member Function Documentation

◆ calibrateAxisWithParams()

bool FakeBot::calibrateAxisWithParams ( int  axis,
unsigned int  type,
double  p1,
double  p2,
double  p3 
)
inlineoverridevirtual

Start calibration, this method is very often platform specific.

Returns
true/false on success failure

Implements yarp::dev::IControlCalibration.

Definition at line 398 of file FakeBot.h.

◆ calibrationDone()

bool FakeBot::calibrationDone ( int  j)
inlineoverridevirtual

Check if the calibration is terminated, on a particular joint.

Non blocking.

Returns
true/false

Implements yarp::dev::IControlCalibration.

Definition at line 404 of file FakeBot.h.

◆ checkMotionDone() [1/3]

bool FakeBot::checkMotionDone ( bool *  flag)
inlineoverridevirtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
flagis a pointer to return value ("and" of all joints)
Returns
true/false on network communication (value you actually want is stored in *flag)

Implements yarp::dev::IPositionControl.

Definition at line 140 of file FakeBot.h.

◆ checkMotionDone() [2/3]

bool FakeBot::checkMotionDone ( const int  n_joint,
const int *  joints,
bool *  flag 
)
inlineoverridevirtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
jointspointer to the array of joint numbers
flagpointer to return value (logical "and" of all set of joints)
Returns
true/false if network communication went well.

Implements yarp::dev::IPositionControl.

Definition at line 299 of file FakeBot.h.

◆ checkMotionDone() [3/3]

bool FakeBot::checkMotionDone ( int  j,
bool *  flag 
)
inlineoverridevirtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
jis the axis number
flagis a pointer to return value
Returns
true/false on network communication (value you actually want is stored in *flag)

Implements yarp::dev::IPositionControl.

Definition at line 135 of file FakeBot.h.

◆ close()

bool FakeBot::close ( )
inlineoverridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 219 of file FakeBot.h.

◆ disableAmp()

bool FakeBot::disableAmp ( int  j)
inlineoverridevirtual

Disable the amplifier on a specific joint.

All computations within the board will be carried out normally, but the output will be disabled.

Returns
true/false on success/failure

Implements yarp::dev::IAmplifierControl.

Definition at line 357 of file FakeBot.h.

◆ enableAmp()

bool FakeBot::enableAmp ( int  j)
inlineoverridevirtual

Enable the amplifier on a specific joint.

Be careful, check that the output of the controller is appropriate (usually zero), to avoid generating abrupt movements.

Returns
true/false on success/failure

Implements yarp::dev::IAmplifierControl.

Definition at line 350 of file FakeBot.h.

◆ getAmpStatus() [1/2]

bool FakeBot::getAmpStatus ( int *  st)
inlineoverridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 387 of file FakeBot.h.

◆ getAmpStatus() [2/2]

bool FakeBot::getAmpStatus ( int  k,
int *  v 
)
inlineoverridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 392 of file FakeBot.h.

◆ getAxes()

bool FakeBot::getAxes ( int *  ax)
inlineoverridevirtual

Get the number of controlled axes.

This command asks the number of controlled axes for the current physical interface.

Parameters
axpointer to storage
Returns
true/false.

Implements yarp::dev::IPositionControl.

Definition at line 98 of file FakeBot.h.

◆ getCurrent()

bool FakeBot::getCurrent ( int  j,
double *  val 
)
inlineoverridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 364 of file FakeBot.h.

◆ getCurrents()

bool FakeBot::getCurrents ( double *  vals)
inlineoverridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 371 of file FakeBot.h.

◆ getEncoder()

bool FakeBot::getEncoder ( int  j,
double *  v 
)
inlineoverridevirtual

Read the value of an encoder.

Parameters
jencoder number
vpointer to storage for the return value
Returns
true/false, upon success/failure (you knew it, uh?)

Implements yarp::dev::IEncoders.

Definition at line 252 of file FakeBot.h.

◆ getEncoderAcceleration()

bool FakeBot::getEncoderAcceleration ( int  j,
double *  spds 
)
inlineoverridevirtual

Read the instantaneous acceleration of an axis.

Parameters
jaxis number
spdspointer to the array that will contain the output

Implements yarp::dev::IEncoders.

Definition at line 281 of file FakeBot.h.

◆ getEncoderAccelerations()

bool FakeBot::getEncoderAccelerations ( double *  accs)
inlineoverridevirtual

Read the instantaneous acceleration of all axes.

Parameters
accspointer to the array that will contain the output
Returns
true if all goes well, false if anything bad happens.

Implements yarp::dev::IEncoders.

Definition at line 288 of file FakeBot.h.

◆ getEncoders()

bool FakeBot::getEncoders ( double *  encs)
inlineoverridevirtual

Read the position of all axes.

Parameters
encspointer to the array that will contain the output
Returns
true/false on success/failure

Implements yarp::dev::IEncoders.

Definition at line 260 of file FakeBot.h.

◆ getEncoderSpeed()

bool FakeBot::getEncoderSpeed ( int  j,
double *  sp 
)
inlineoverridevirtual

Read the istantaneous speed of an axis.

Parameters
jaxis number
sppointer to storage for the output
Returns
true if successful, false ... otherwise.

Implements yarp::dev::IEncoders.

Definition at line 267 of file FakeBot.h.

◆ getEncoderSpeeds()

bool FakeBot::getEncoderSpeeds ( double *  spds)
inlineoverridevirtual

Read the instantaneous speed of all axes.

Parameters
spdspointer to storage for the output values
Returns
guess what? (true/false on success or failure).

Implements yarp::dev::IEncoders.

Definition at line 274 of file FakeBot.h.

◆ getEncodersTimed()

bool FakeBot::getEncodersTimed ( double *  encs,
double *  time 
)
inlineoverridevirtual

Read the instantaneous acceleration of all axes.

Parameters
encspointer to the array that will contain the output
timepointer to the array that will contain individual timestamps
Returns
true if all goes well, false if anything bad happens.

Implements yarp::dev::IEncodersTimed.

Definition at line 313 of file FakeBot.h.

◆ getEncoderTimed()

bool FakeBot::getEncoderTimed ( int  j,
double *  encs,
double *  time 
)
inlineoverridevirtual

Read the instantaneous acceleration of all axes.

Parameters
jaxis index
encsencoder value (pointer to)
timecorresponding timestamp (pointer to)
Returns
true if all goes well, false if anything bad happens.

Implements yarp::dev::IEncodersTimed.

Definition at line 325 of file FakeBot.h.

◆ getImage()

bool FakeBot::getImage ( yarp::sig::ImageOf< yarp::sig::PixelRgb > &  image)
overridevirtual

Get an rgb image from the frame grabber, if required demosaicking/color reconstruction is applied.

Parameters
imagethe image to be filled
Returns
true/false upon success/failure

Implements yarp::dev::IFrameGrabberImage.

Definition at line 117 of file FakeBot.cpp.

◆ getLimits()

bool FakeBot::getLimits ( int  axis,
double *  min,
double *  max 
)
inlineoverridevirtual

Get the software limits for a particular axis.

Parameters
axisjoint number
pointerto store the value of the lower limit
pointerto store the value of the upper limit
Returns
true if everything goes fine, false otherwise.

Implements yarp::dev::IControlLimits.

Definition at line 410 of file FakeBot.h.

◆ getMaxCurrent()

bool FakeBot::getMaxCurrent ( int  j,
double *  v 
)
inlineoverridevirtual

Returns the maximum electric current allowed for a given motor.

Exceeding this value will trigger instantaneous hardware fault.

Parameters
jmotor number
vthe return value
Returns
probably true, might return false in bad times

Implements yarp::dev::IAmplifierControl.

Definition at line 378 of file FakeBot.h.

◆ getRefAcceleration()

bool FakeBot::getRefAcceleration ( int  j,
double *  acc 
)
inlineoverridevirtual

Get reference acceleration for a joint.

Returns the acceleration used to generate the trajectory profile.

Parameters
jjoint number
accpointer to storage for the return value
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 193 of file FakeBot.h.

◆ getRefAccelerations() [1/2]

bool FakeBot::getRefAccelerations ( const int  n_joint,
const int *  joints,
double *  accs 
)
inlineoverridevirtual

Get reference acceleration for a joint.

Returns the acceleration used to generate the trajectory profile.

Parameters
jointspointer to the array of joint numbers
accspointer to the array that will store the acceleration values
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 307 of file FakeBot.h.

◆ getRefAccelerations() [2/2]

bool FakeBot::getRefAccelerations ( double *  accs)
inlineoverridevirtual

Get reference acceleration of all joints.

These are the values used during the interpolation of the trajectory.

Parameters
accspointer to the array that will store the acceleration values.
Returns
true/false on success or failure

Implements yarp::dev::IPositionControl.

Definition at line 201 of file FakeBot.h.

◆ getRefSpeed()

bool FakeBot::getRefSpeed ( int  j,
double *  ref 
)
inlineoverridevirtual

Get reference speed for a joint.

Returns the speed used to generate the trajectory profile.

Parameters
jjoint number
refpointer to storage for the return value
Returns
true/false on success or failure

Implements yarp::dev::IPositionControl.

Definition at line 177 of file FakeBot.h.

◆ getRefSpeeds() [1/2]

bool FakeBot::getRefSpeeds ( const int  n_joint,
const int *  joints,
double *  spds 
)
inlineoverridevirtual

Get reference speed of all joints.

These are the values used during the interpolation of the trajectory.

Parameters
jointspointer to the array of joint numbers
spdspointer to the array that will store the speed values.
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 305 of file FakeBot.h.

◆ getRefSpeeds() [2/2]

bool FakeBot::getRefSpeeds ( double *  spds)
inlineoverridevirtual

Get reference speed of all joints.

These are the values used during the interpolation of the trajectory.

Parameters
spdspointer to the array that will store the speed values.

Implements yarp::dev::IPositionControl.

Definition at line 185 of file FakeBot.h.

◆ getVelLimits()

bool FakeBot::getVelLimits ( int  axis,
double *  min,
double *  max 
)
inlineoverridevirtual

Get the software speed limits for a particular axis.

Parameters
axisjoint number
minpointer to store the value of the lower limit
maxpointer to store the value of the upper limit
Returns
true if everything goes fine, false otherwise.

Implements yarp::dev::IControlLimits.

Definition at line 426 of file FakeBot.h.

◆ height()

int FakeBot::height ( ) const
inlineoverridevirtual

Return the height of each frame.

Returns
image height

Implements yarp::dev::IFrameGrabberImage.

Definition at line 86 of file FakeBot.h.

◆ open()

bool FakeBot::open ( yarp::os::Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 88 of file FakeBot.cpp.

◆ positionMove() [1/3]

bool FakeBot::positionMove ( const double *  refs)
inlineoverridevirtual

Set new reference point for all axes.

Parameters
refsarray, new reference points.
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 111 of file FakeBot.h.

◆ positionMove() [2/3]

bool FakeBot::positionMove ( const int  n_joint,
const int *  joints,
const double *  refs 
)
inlineoverridevirtual

Set new reference point for a subset of joints.

Parameters
jointspointer to the array of joint numbers
refspointer to the array specifying the new reference points
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 295 of file FakeBot.h.

◆ positionMove() [3/3]

bool FakeBot::positionMove ( int  j,
double  ref 
)
inlineoverridevirtual

Set new reference point for a single axis.

Parameters
jjoint number
refspecifies the new ref point
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 103 of file FakeBot.h.

◆ relativeMove() [1/3]

bool FakeBot::relativeMove ( const double *  deltas)
inlineoverridevirtual

Set relative position, all joints.

Parameters
deltaspointer to the relative commands
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 127 of file FakeBot.h.

◆ relativeMove() [2/3]

bool FakeBot::relativeMove ( const int  n_joint,
const int *  joints,
const double *  deltas 
)
inlineoverridevirtual

Set relative position for a subset of joints.

Parameters
jointspointer to the array of joint numbers
deltaspointer to the array of relative commands
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 297 of file FakeBot.h.

◆ relativeMove() [3/3]

bool FakeBot::relativeMove ( int  j,
double  delta 
)
inlineoverridevirtual

Set relative position.

The command is relative to the current position of the axis.

Parameters
jjoint axis number
deltarelative command
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 119 of file FakeBot.h.

◆ resetEncoder()

bool FakeBot::resetEncoder ( int  j)
inlineoverridevirtual

Reset encoder, single joint.

Set the encoder value to zero

Parameters
jencoder number
Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 223 of file FakeBot.h.

◆ resetEncoders()

bool FakeBot::resetEncoders ( )
inlineoverridevirtual

Reset encoders.

Set the encoders value to zero

Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 231 of file FakeBot.h.

◆ run()

void FakeBot::run ( )
overridevirtual

Main body of the new thread.

Override this method to do what you want. After Thread::start is called, this method will start running in a separate thread. It is important that this method either keeps checking Thread::isStopping to see if it should stop, or you override the Thread::onStop method to interact with it in some way to shut the new thread down. There is no really reliable, portable way to stop a thread cleanly unless that thread cooperates.

Implements yarp::os::Thread.

Definition at line 176 of file FakeBot.cpp.

◆ setEncoder()

bool FakeBot::setEncoder ( int  j,
double  val 
)
inlineoverridevirtual

Set the value of the encoder for a given joint.

Parameters
jencoder number
valnew value
Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 238 of file FakeBot.h.

◆ setEncoders()

bool FakeBot::setEncoders ( const double *  vals)
inlineoverridevirtual

Set the value of all encoders.

Parameters
valspointer to the new values
Returns
true/false

Implements yarp::dev::IEncoders.

Definition at line 245 of file FakeBot.h.

◆ setLimits()

bool FakeBot::setLimits ( int  axis,
double  min,
double  max 
)
inlineoverridevirtual

Set the software limits for a particular axis, the behavior of the control card when these limits are exceeded, depends on the implementation.

Parameters
axisjoint number (why am I telling you this)
minthe value of the lower limit
maxthe value of the upper limit
Returns
true or false on success or failure

Implements yarp::dev::IControlLimits.

Definition at line 418 of file FakeBot.h.

◆ setMaxCurrent()

bool FakeBot::setMaxCurrent ( int  j,
double  v 
)
inlineoverridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 383 of file FakeBot.h.

◆ setRefAcceleration()

bool FakeBot::setRefAcceleration ( int  j,
double  acc 
)
inlineoverridevirtual

Set reference acceleration for a joint.

This value is used during the trajectory generation.

Parameters
jjoint number
accacceleration value
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 161 of file FakeBot.h.

◆ setRefAccelerations() [1/2]

bool FakeBot::setRefAccelerations ( const double *  accs)
inlineoverridevirtual

Set reference acceleration on all joints.

This is the valure that is used during the generation of the trajectory.

Parameters
accspointer to the array of acceleration values
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 169 of file FakeBot.h.

◆ setRefAccelerations() [2/2]

bool FakeBot::setRefAccelerations ( const int  n_joint,
const int *  joints,
const double *  accs 
)
inlineoverridevirtual

Set reference acceleration on all joints.

This is the valure that is used during the generation of the trajectory.

Parameters
jointspointer to the array of joint numbers
accspointer to the array with acceleration values
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 303 of file FakeBot.h.

◆ setRefSpeed()

bool FakeBot::setRefSpeed ( int  j,
double  sp 
)
inlineoverridevirtual

Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.

Parameters
jjoint number
spspeed value
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 145 of file FakeBot.h.

◆ setRefSpeeds() [1/2]

bool FakeBot::setRefSpeeds ( const double *  spds)
inlineoverridevirtual

Set reference speed on all joints.

These values are used during the interpolation of the trajectory.

Parameters
spdspointer to the array of speed values.
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 153 of file FakeBot.h.

◆ setRefSpeeds() [2/2]

bool FakeBot::setRefSpeeds ( const int  n_joint,
const int *  joints,
const double *  spds 
)
inlineoverridevirtual

Set reference speed on all joints.

These values are used during the interpolation of the trajectory.

Parameters
jointspointer to the array of joint numbers
spdspointer to the array with speed values.
Returns
true/false upon success/failure

Implements yarp::dev::IPositionControl.

Definition at line 301 of file FakeBot.h.

◆ setVelLimits()

bool FakeBot::setVelLimits ( int  axis,
double  min,
double  max 
)
inlineoverridevirtual

Set the software speed limits for a particular axis, the behavior of the control card when these limits are exceeded, depends on the implementation.

Parameters
axisjoint number
minthe value of the lower limit
maxthe value of the upper limit
Returns
true or false on success or failure

Implements yarp::dev::IControlLimits.

Definition at line 424 of file FakeBot.h.

◆ stop() [1/3]

bool FakeBot::stop ( )
inlineoverridevirtual

Stop motion, multiple joints.

Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 214 of file FakeBot.h.

◆ stop() [2/3]

bool FakeBot::stop ( const int  n_joint,
const int *  joints 
)
inlineoverridevirtual

Stop motion for subset of joints.

Parameters
jointspointer to the array of joint numbers
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 309 of file FakeBot.h.

◆ stop() [3/3]

bool FakeBot::stop ( int  j)
inlineoverridevirtual

Stop motion, single joint.

Parameters
jjoint number
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 209 of file FakeBot.h.

◆ velocityMove() [1/3]

bool FakeBot::velocityMove ( const double *  sp)
inlineoverridevirtual

Start motion at a given speed, multiple joints.

Parameters
sppointer to the array containing the new speed values
Returns
true/false upon success/failure

Implements yarp::dev::IVelocityControl.

Definition at line 339 of file FakeBot.h.

◆ velocityMove() [2/3]

bool FakeBot::velocityMove ( const int  n_joint,
const int *  joints,
const double *  spds 
)
inlineoverridevirtual

Start motion at a given speed for a subset of joints.

Parameters
n_jointhow many joints this command is referring to
jointsof joints controlled. The size of this array is n_joints
spdspointer to the array containing the new speed values, one value for each joint, the size of the array is n_joints. The first value will be the new reference for the joint joints[0]. for example: n_joint 3 joints 0 2 4 spds 10 30 40
Returns
true/false on success/failure

Implements yarp::dev::IVelocityControl.

Definition at line 346 of file FakeBot.h.

◆ velocityMove() [3/3]

bool FakeBot::velocityMove ( int  j,
double  sp 
)
inlineoverridevirtual

Start motion at a given speed, single joint.

Parameters
jjoint number
spspeed value
Returns
bool/false upone success/failure

Implements yarp::dev::IVelocityControl.

Definition at line 332 of file FakeBot.h.

◆ width()

int FakeBot::width ( ) const
inlineoverridevirtual

Return the width of each frame.

Returns
image width

Implements yarp::dev::IFrameGrabberImage.

Definition at line 90 of file FakeBot.h.


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