yarp-devices
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
FakeJoint Class Reference

Implementation for a fake joint (instant movement) as a single CAN bus joint (control board raw interfaces).

#include <FakeJoint.hpp>

Inheritance diagram for FakeJoint:
FakeJoint_ParamsParser roboticslab::ICanBusSharer

Public Types

using return_t = bool
 

Public Member Functions

bool open (yarp::os::Searchable &config) override
 
bool close () override
 
unsigned int getId () override
 Retrieve CAN node ID.
 
bool notifyMessage (const roboticslab::can_message &message) override
 Notify observers that a new CAN message has arrived.
 
bool initialize () override
 Perform CAN node initialization.
 
bool finalize () override
 Finalize CAN node communications.
 
bool registerSender (roboticslab::ICanSenderDelegate *sender) override
 Pass a handle to a CAN sender delegate instance.
 
bool synchronize (double timestamp) override
 Perform synchronized action on CAN master's request.
 
return_t enableAmpRaw (int j) override
 
return_t disableAmpRaw (int j) override
 
return_t getAmpStatusRaw (int j, int *v) override
 
return_t getAmpStatusRaw (int *st) override
 
return_t getMaxCurrentRaw (int j, double *v) override
 
return_t setMaxCurrentRaw (int j, double v) override
 
return_t getNominalCurrentRaw (int m, double *val) override
 
return_t setNominalCurrentRaw (int m, double val) override
 
return_t getPeakCurrentRaw (int m, double *val) override
 
return_t setPeakCurrentRaw (int m, double val) override
 
return_t getPWMRaw (int j, double *val) override
 
return_t getPWMLimitRaw (int j, double *val) override
 
return_t setPWMLimitRaw (int j, double val) override
 
return_t getPowerSupplyVoltageRaw (int j, double *val) override
 
return_t getAxisNameRaw (int axis, std::string &name) override
 
return_t getJointTypeRaw (int axis, yarp::dev::JointTypeEnum &type) override
 
return_t calibrateAxisWithParamsRaw (int axis, unsigned int type, double p1, double p2, double p3) override
 
return_t setCalibrationParametersRaw (int axis, const yarp::dev::CalibrationParameters &params) override
 
return_t calibrationDoneRaw (int j) override
 
return_t setLimitsRaw (int axis, double min, double max) override
 
return_t getLimitsRaw (int axis, double *min, double *max) override
 
return_t setVelLimitsRaw (int axis, double min, double max) override
 
return_t getVelLimitsRaw (int axis, double *min, double *max) override
 
return_t getControlModeRaw (int j, int *mode) override
 
return_t getControlModesRaw (int *modes) override
 
return_t getControlModesRaw (int n_joint, const int *joints, int *modes) override
 
return_t setControlModeRaw (int j, int mode) override
 
return_t setControlModesRaw (int *modes) override
 
return_t setControlModesRaw (int n_joint, const int *joints, int *modes) override
 
return_t getCurrentRaw (int m, double *curr) override
 
return_t getCurrentsRaw (double *currs) override
 
return_t getCurrentRangeRaw (int m, double *min, double *max) override
 
return_t getCurrentRangesRaw (double *mins, double *maxs) override
 
return_t setRefCurrentRaw (int m, double curr) override
 
return_t setRefCurrentsRaw (const double *currs) override
 
return_t setRefCurrentsRaw (int n_motor, const int *motors, const double *currs) override
 
return_t getRefCurrentRaw (int m, double *curr) override
 
return_t getRefCurrentsRaw (double *currs) override
 
return_t getAxes (int *ax) override
 
return_t resetEncoderRaw (int j) override
 
return_t resetEncodersRaw () override
 
return_t setEncoderRaw (int j, double val) override
 
return_t setEncodersRaw (const double *vals) override
 
return_t getEncoderRaw (int j, double *v) override
 
return_t getEncodersRaw (double *encs) override
 
return_t getEncoderSpeedRaw (int j, double *spd) override
 
return_t getEncoderSpeedsRaw (double *spds) override
 
return_t getEncoderAccelerationRaw (int j, double *acc) override
 
return_t getEncoderAccelerationsRaw (double *accs) override
 
return_t getEncoderTimedRaw (int j, double *enc, double *time) override
 
return_t getEncodersTimedRaw (double *encs, double *times) override
 
return_t getImpedanceRaw (int j, double *stiffness, double *damping) override
 
return_t setImpedanceRaw (int j, double stiffness, double damping) override
 
return_t setImpedanceOffsetRaw (int j, double offset) override
 
return_t getImpedanceOffsetRaw (int j, double *offset) override
 
return_t getCurrentImpedanceLimitRaw (int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override
 
return_t getInteractionModeRaw (int axis, yarp::dev::InteractionModeEnum *mode) override
 
return_t getInteractionModesRaw (yarp::dev::InteractionModeEnum *modes) override
 
return_t getInteractionModesRaw (int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes) override
 
return_t setInteractionModeRaw (int axis, yarp::dev::InteractionModeEnum mode) override
 
return_t setInteractionModesRaw (yarp::dev::InteractionModeEnum *modes) override
 
return_t setInteractionModesRaw (int n_joints, int *joints, yarp::dev::InteractionModeEnum *modes) override
 
return_t getNumberOfMotorsRaw (int *num) override
 
return_t getTemperatureRaw (int m, double *val) override
 
return_t getTemperaturesRaw (double *vals) override
 
return_t getTemperatureLimitRaw (int m, double *temp) override
 
return_t setTemperatureLimitRaw (int m, double temp) override
 
return_t getGearboxRatioRaw (int m, double *val) override
 
return_t setGearboxRatioRaw (int m, double val) override
 
return_t getNumberOfMotorEncodersRaw (int *num) override
 
return_t resetMotorEncoderRaw (int m) override
 
return_t resetMotorEncodersRaw () override
 
return_t setMotorEncoderCountsPerRevolutionRaw (int m, double cpr) override
 
return_t getMotorEncoderCountsPerRevolutionRaw (int m, double *cpr) override
 
return_t setMotorEncoderRaw (int m, double val) override
 
return_t setMotorEncodersRaw (const double *vals) override
 
return_t getMotorEncoderRaw (int m, double *v) override
 
return_t getMotorEncodersRaw (double *encs) override
 
return_t getMotorEncoderTimedRaw (int m, double *enc, double *stamp) override
 
return_t getMotorEncodersTimedRaw (double *encs, double *stamps) override
 
return_t getMotorEncoderSpeedRaw (int m, double *sp) override
 
return_t getMotorEncoderSpeedsRaw (double *spds) override
 
return_t getMotorEncoderAccelerationRaw (int m, double *acc) override
 
return_t getMotorEncoderAccelerationsRaw (double *accs) override
 
return_t setPidRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, const yarp::dev::Pid &pid) override
 
return_t setPidsRaw (const yarp::dev::PidControlTypeEnum &pidtype, const yarp::dev::Pid *pids) override
 
return_t setPidReferenceRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double ref) override
 
return_t setPidReferencesRaw (const yarp::dev::PidControlTypeEnum &pidtype, const double *refs) override
 
return_t setPidErrorLimitRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double limit) override
 
return_t setPidErrorLimitsRaw (const yarp::dev::PidControlTypeEnum &pidtype, const double *limits) override
 
return_t setPidOffsetRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double v) override
 
return_t getPidErrorRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double *err) override
 
return_t getPidErrorsRaw (const yarp::dev::PidControlTypeEnum &pidtype, double *errs) override
 
return_t getPidOutputRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double *out) override
 
return_t getPidOutputsRaw (const yarp::dev::PidControlTypeEnum &pidtype, double *outs) override
 
return_t getPidRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, yarp::dev::Pid *pid) override
 
return_t getPidsRaw (const yarp::dev::PidControlTypeEnum &pidtype, yarp::dev::Pid *pids) override
 
return_t getPidReferenceRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double *ref) override
 
return_t getPidReferencesRaw (const yarp::dev::PidControlTypeEnum &pidtype, double *refs) override
 
return_t getPidErrorLimitRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, double *limit) override
 
return_t getPidErrorLimitsRaw (const yarp::dev::PidControlTypeEnum &pidtype, double *limits) override
 
return_t resetPidRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j) override
 
return_t disablePidRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j) override
 
return_t enablePidRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j) override
 
return_t isPidEnabledRaw (const yarp::dev::PidControlTypeEnum &pidtype, int j, bool *enabled) override
 
return_t positionMoveRaw (int j, double ref) override
 
return_t positionMoveRaw (const double *refs) override
 
return_t positionMoveRaw (int n_joint, const int *joints, const double *refs) override
 
return_t relativeMoveRaw (int j, double delta) override
 
return_t relativeMoveRaw (const double *deltas) override
 
return_t relativeMoveRaw (int n_joint, const int *joints, const double *deltas) override
 
return_t checkMotionDoneRaw (int j, bool *flag) override
 
return_t checkMotionDoneRaw (bool *flag) override
 
return_t checkMotionDoneRaw (int n_joint, const int *joints, bool *flag) override
 
return_t setRefSpeedRaw (int j, double sp) override
 
return_t setRefSpeedsRaw (const double *spds) override
 
return_t setRefSpeedsRaw (int n_joint, const int *joints, const double *spds) override
 
return_t setRefAccelerationRaw (int j, double acc) override
 
return_t setRefAccelerationsRaw (const double *accs) override
 
return_t setRefAccelerationsRaw (int n_joint, const int *joints, const double *accs) override
 
return_t getRefSpeedRaw (int j, double *spd) override
 
return_t getRefSpeedsRaw (double *spds) override
 
return_t getRefSpeedsRaw (int n_joint, const int *joints, double *spds) override
 
return_t getRefAccelerationRaw (int j, double *acc) override
 
return_t getRefAccelerationsRaw (double *accs) override
 
return_t getRefAccelerationsRaw (int n_joint, const int *joints, double *accs) override
 
return_t stopRaw (int j) override
 
return_t stopRaw () override
 
return_t stopRaw (int n_joint, const int *joints) override
 
return_t getTargetPositionRaw (int joint, double *ref) override
 
return_t getTargetPositionsRaw (double *refs) override
 
return_t getTargetPositionsRaw (int n_joint, const int *joints, double *refs) override
 
return_t setPositionRaw (int j, double ref) override
 
return_t setPositionsRaw (const double *refs) override
 
return_t setPositionsRaw (int n_joint, const int *joints, const double *refs) override
 
return_t getRefPositionRaw (int joint, double *ref) override
 
return_t getRefPositionsRaw (double *refs) override
 
return_t getRefPositionsRaw (int n_joint, const int *joints, double *refs) override
 
return_t setRefDutyCycleRaw (int m, double ref) override
 
return_t setRefDutyCyclesRaw (const double *refs) override
 
return_t getRefDutyCycleRaw (int m, double *ref) override
 
return_t getRefDutyCyclesRaw (double *refs) override
 
return_t getDutyCycleRaw (int m, double *val) override
 
return_t getDutyCyclesRaw (double *vals) override
 
return_t getRemoteVariableRaw (std::string key, yarp::os::Bottle &val) override
 
return_t setRemoteVariableRaw (std::string key, const yarp::os::Bottle &val) override
 
return_t getRemoteVariablesListRaw (yarp::os::Bottle *listOfKeys) override
 
return_t getRefTorqueRaw (int j, double *t) override
 
return_t getRefTorquesRaw (double *t) override
 
return_t setRefTorqueRaw (int j, double t) override
 
return_t setRefTorquesRaw (const double *t) override
 
return_t setRefTorquesRaw (int n_joint, const int *joints, const double *t) override
 
return_t getMotorTorqueParamsRaw (int j, yarp::dev::MotorTorqueParameters *params) override
 
return_t setMotorTorqueParamsRaw (int j, const yarp::dev::MotorTorqueParameters params) override
 
return_t getTorqueRaw (int j, double *t) override
 
return_t getTorquesRaw (double *t) override
 
return_t getTorqueRangeRaw (int j, double *min, double *max) override
 
return_t getTorqueRangesRaw (double *mins, double *maxs) override
 
return_t velocityMoveRaw (int j, double spd) override
 
return_t velocityMoveRaw (const double *spds) override
 
return_t velocityMoveRaw (int n_joint, const int *joints, const double *spds) override
 
return_t getRefVelocityRaw (int joint, double *vel) override
 
return_t getRefVelocitiesRaw (double *vels) override
 
return_t getRefVelocitiesRaw (int n_joint, const int *joints, double *vels) override
 
- Public Member Functions inherited from roboticslab::ICanBusSharer
virtual ~ICanBusSharer ()=default
 Destructor.
 
virtual std::vector< unsigned int > getAdditionalIds ()
 Retrieve more associated CAN node IDs, if any.
 
- Public Member Functions inherited from roboticslab::ICanMessageNotifier
virtual ~ICanMessageNotifier ()=default
 Virtual destructor.
 
- Public Member Functions inherited from FakeJoint_ParamsParser
bool parseParams (const yarp::os::Searchable &config) override
 
std::string getDeviceClassName () const override
 
std::string getDeviceName () const override
 
std::string getDocumentationOfDeviceParams () const override
 
std::vector< std::string > getListOfParams () const override
 
bool getParamValue (const std::string &paramName, std::string &paramValue) const override
 
std::string getConfiguration () const override
 

Static Public Attributes

static constexpr auto ret_ok = true
 

Private Attributes

int controlMode {VOCAB_CM_CONFIGURED}
 
yarp::dev::InteractionModeEnum interactionMode {yarp::dev::VOCAB_IM_UNKNOWN}
 

Additional Inherited Members

- Public Attributes inherited from FakeJoint_ParamsParser
const std::string m_device_classname = {"FakeJoint"}
 
const std::string m_device_name = {"FakeJoint"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
std::string m_provided_configuration
 
const std::string m_jointName_defaultValue = {""}
 
std::string m_jointName = {}
 

Member Function Documentation

◆ finalize()

bool FakeJoint::finalize ( )
inlineoverridevirtual

◆ getId()

unsigned int FakeJoint::getId ( )
inlineoverridevirtual

◆ initialize()

bool FakeJoint::initialize ( )
inlineoverridevirtual

◆ notifyMessage()

bool FakeJoint::notifyMessage ( const roboticslab::can_message &  msg)
inlineoverridevirtual

◆ registerSender()

bool FakeJoint::registerSender ( roboticslab::ICanSenderDelegate *  sender)
inlineoverridevirtual

◆ synchronize()

bool FakeJoint::synchronize ( double  timestamp)
inlineoverridevirtual

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