YARP
Yet Another Robot Platform

fakebot deprecated: 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 image from the frame grabber. 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 ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (DeviceDriver &&other) noexcept=delete
 
 ~DeviceDriver () override
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
bool close () override
 Close the DeviceDriver. More...
 
virtual std::string id () const
 Return the id assigned to the PolyDriver. More...
 
virtual void setId (const std::string &id)
 Set the id for this device. 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 open (Searchable &config)
 Initialize the object. More...
 
virtual bool close ()
 Shut the object down. More...
 
virtual bool configure (Searchable &config)
 Change online parameters. More...
 
- Public Member Functions inherited from yarp::dev::IPositionControl
virtual ~IPositionControl ()
 Destructor. More...
 
virtual bool getAxes (int *ax)=0
 Get the number of controlled axes. More...
 
virtual bool positionMove (int j, double ref)=0
 Set new reference point for a single axis. More...
 
virtual bool positionMove (const double *refs)=0
 Set new reference point for all axes. More...
 
virtual bool relativeMove (int j, double delta)=0
 Set relative position. More...
 
virtual bool relativeMove (const double *deltas)=0
 Set relative position, all joints. More...
 
virtual bool checkMotionDone (int j, bool *flag)=0
 Check if the current trajectory is terminated. More...
 
virtual bool checkMotionDone (bool *flag)=0
 Check if the current trajectory is terminated. More...
 
virtual bool setRefSpeed (int j, double sp)=0
 Set reference speed for a joint, this is the speed used during the interpolation of the trajectory. More...
 
virtual bool setRefSpeeds (const double *spds)=0
 Set reference speed on all joints. More...
 
virtual bool setRefAcceleration (int j, double acc)=0
 Set reference acceleration for a joint. More...
 
virtual bool setRefAccelerations (const double *accs)=0
 Set reference acceleration on all joints. More...
 
virtual bool getRefSpeed (int j, double *ref)=0
 Get reference speed for a joint. More...
 
virtual bool getRefSpeeds (double *spds)=0
 Get reference speed of all joints. More...
 
virtual bool getRefAcceleration (int j, double *acc)=0
 Get reference acceleration for a joint. More...
 
virtual bool getRefAccelerations (double *accs)=0
 Get reference acceleration of all joints. More...
 
virtual bool stop (int j)=0
 Stop motion, single joint. More...
 
virtual bool stop ()=0
 Stop motion, multiple joints. More...
 
virtual bool positionMove (const int n_joint, const int *joints, const double *refs)=0
 Set new reference point for a subset of joints. More...
 
virtual bool relativeMove (const int n_joint, const int *joints, const double *deltas)=0
 Set relative position for a subset of joints. More...
 
virtual bool checkMotionDone (const int n_joint, const int *joints, bool *flag)=0
 Check if the current trajectory is terminated. More...
 
virtual bool setRefSpeeds (const int n_joint, const int *joints, const double *spds)=0
 Set reference speed on all joints. More...
 
virtual bool setRefAccelerations (const int n_joint, const int *joints, const double *accs)=0
 Set reference acceleration on all joints. More...
 
virtual bool getRefSpeeds (const int n_joint, const int *joints, double *spds)=0
 Get reference speed of all joints. More...
 
virtual bool getRefAccelerations (const int n_joint, const int *joints, double *accs)=0
 Get reference acceleration for a joint. More...
 
virtual bool stop (const int n_joint, const int *joints)=0
 Stop motion for subset of joints. 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 getAxes (int *axes)=0
 Get the number of controlled axes. More...
 
virtual bool velocityMove (int j, double sp)=0
 Start motion at a given speed, single joint. More...
 
virtual bool velocityMove (const double *sp)=0
 Start motion at a given speed, multiple joints. More...
 
virtual bool setRefAcceleration (int j, double acc)=0
 Set reference acceleration for a joint. More...
 
virtual bool setRefAccelerations (const double *accs)=0
 Set reference acceleration on all joints. More...
 
virtual bool getRefAcceleration (int j, double *acc)=0
 Get reference acceleration for a joint. More...
 
virtual bool getRefAccelerations (double *accs)=0
 Get reference acceleration of all joints. More...
 
virtual bool stop (int j)=0
 Stop motion, single joint. More...
 
virtual bool stop ()=0
 Stop motion, multiple joints. More...
 
virtual bool velocityMove (const int n_joint, const int *joints, const double *spds)=0
 Start motion at a given speed for a subset of joints. 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...
 
virtual bool setRefAccelerations (const int n_joint, const int *joints, const double *accs)=0
 Set reference acceleration for a subset of joints. More...
 
virtual bool getRefAccelerations (const int n_joint, const int *joints, double *accs)=0
 Get reference acceleration for a subset of joints. More...
 
virtual bool stop (const int n_joint, const int *joints)=0
 Stop motion for a subset of joints. More...
 
- Public Member Functions inherited from yarp::dev::IAmplifierControl
virtual ~IAmplifierControl ()
 Destructor. More...
 
virtual bool enableAmp (int j)=0
 Enable the amplifier on a specific joint. More...
 
virtual bool disableAmp (int j)=0
 Disable the amplifier on a specific joint. More...
 
virtual bool getAmpStatus (int *st)=0
 
virtual bool getAmpStatus (int j, int *v)=0
 
virtual bool getCurrents (double *vals)=0
 
virtual bool getCurrent (int j, double *val)=0
 
virtual bool getMaxCurrent (int j, double *v)=0
 Returns the maximum electric current allowed for a given motor. More...
 
virtual bool setMaxCurrent (int j, double v)=0
 
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...
 
virtual bool getEncodersTimed (double *encs, double *time)=0
 Read the instantaneous acceleration of all axes. More...
 
virtual bool getEncoderTimed (int j, double *encs, double *time)=0
 Read the instantaneous acceleration of all axes. More...
 
- Public Member Functions inherited from yarp::dev::IEncoders
virtual ~IEncoders ()
 Destructor. More...
 
virtual bool getAxes (int *ax)=0
 Get the number of controlled axes. More...
 
virtual bool resetEncoder (int j)=0
 Reset encoder, single joint. More...
 
virtual bool resetEncoders ()=0
 Reset encoders. More...
 
virtual bool setEncoder (int j, double val)=0
 Set the value of the encoder for a given joint. More...
 
virtual bool setEncoders (const double *vals)=0
 Set the value of all encoders. More...
 
virtual bool getEncoder (int j, double *v)=0
 Read the value of an encoder. More...
 
virtual bool getEncoders (double *encs)=0
 Read the position of all axes. More...
 
virtual bool getEncoderSpeed (int j, double *sp)=0
 Read the istantaneous speed of an axis. More...
 
virtual bool getEncoderSpeeds (double *spds)=0
 Read the instantaneous speed of all axes. More...
 
virtual bool getEncoderAcceleration (int j, double *spds)=0
 Read the instantaneous acceleration of an axis. More...
 
virtual bool getEncoderAccelerations (double *accs)=0
 Read the instantaneous acceleration of all axes. More...
 
- Public Member Functions inherited from yarp::dev::IFrameGrabberOf< yarp::sig::ImageOf< yarp::sig::PixelRgb > >
virtual bool getImage (yarp::sig::ImageOf< yarp::sig::PixelRgb > &image)=0
 Get an image from the frame grabber. 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 image from the frame grabber. More...
 
- Public Member Functions inherited from yarp::dev::IFrameGrabberImageBase
virtual ~IFrameGrabberImageBase ()
 Destructor. More...
 
virtual int height () const =0
 Return the height of each frame. More...
 
virtual int width () const =0
 Return the width of each frame. More...
 
- Public Member Functions inherited from yarp::dev::IControlCalibration
 IControlCalibration ()
 
virtual ~IControlCalibration ()
 Destructor. More...
 
virtual bool calibrateAxisWithParams (int axis, unsigned int type, double p1, double p2, double p3)=0
 Start calibration, this method is very often platform specific. More...
 
virtual bool setCalibrationParameters (int axis, const CalibrationParameters &params)
 Start calibration, this method is very often platform specific. More...
 
virtual bool calibrationDone (int j)=0
 Check if the calibration is terminated, on a particular joint. 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...
 
virtual bool setLimits (int axis, double min, double max)=0
 Set the software limits for a particular axis, the behavior of the control card when these limits are exceeded, depends on the implementation. More...
 
virtual bool getLimits (int axis, double *min, double *max)=0
 Get the software limits for a particular axis. More...
 
virtual bool setVelLimits (int axis, double min, double max)=0
 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...
 
virtual bool getVelLimits (int axis, double *min, double *max)=0
 Get the software speed limits for a particular axis. 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 bool read (ConnectionReader &reader)=0
 Read this object from a network connection. 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 run ()=0
 Main body of the new thread. 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 deprecated: Documentation to be added

Definition at line 23 of file FakeBot.h.

Constructor & Destructor Documentation

◆ FakeBot()

FakeBot::FakeBot ( )
inline

Definition at line 50 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 395 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 401 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 137 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 296 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 132 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 216 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 354 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 347 of file FakeBot.h.

◆ getAmpStatus() [1/2]

bool FakeBot::getAmpStatus ( int *  st)
inlineoverridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 384 of file FakeBot.h.

◆ getAmpStatus() [2/2]

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

Implements yarp::dev::IAmplifierControl.

Definition at line 389 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 95 of file FakeBot.h.

◆ getCurrent()

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

Implements yarp::dev::IAmplifierControl.

Definition at line 361 of file FakeBot.h.

◆ getCurrents()

bool FakeBot::getCurrents ( double *  vals)
inlineoverridevirtual

Implements yarp::dev::IAmplifierControl.

Definition at line 368 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 249 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 278 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 285 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 257 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 264 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 271 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 310 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 322 of file FakeBot.h.

◆ getImage()

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

Get an image from the frame grabber.

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

Implements yarp::dev::IFrameGrabberOf< yarp::sig::ImageOf< yarp::sig::PixelRgb > >.

Definition at line 118 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 407 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 375 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 190 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 304 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 198 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 174 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 302 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 182 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 423 of file FakeBot.h.

◆ height()

int FakeBot::height ( ) const
inlineoverridevirtual

Return the height of each frame.

Returns
image height

Implements yarp::dev::IFrameGrabberImageBase.

Definition at line 83 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 89 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 108 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 292 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 100 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 124 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 294 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 116 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 220 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 228 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 177 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 235 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 242 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 415 of file FakeBot.h.

◆ setMaxCurrent()

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

Implements yarp::dev::IAmplifierControl.

Definition at line 380 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 158 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 166 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 300 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 142 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 150 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 298 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 421 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 211 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 306 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 206 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 336 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 343 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 329 of file FakeBot.h.

◆ width()

int FakeBot::width ( ) const
inlineoverridevirtual

Return the width of each frame.

Returns
image width

Implements yarp::dev::IFrameGrabberImageBase.

Definition at line 87 of file FakeBot.h.


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