YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
xHandControlBoard_ParamsParser Class Reference

This class is the parameters parser for class xHandControlBoard. More...

#include </home/runner/work/yarp-documentation/yarp-documentation/yarp/opt-modules/yarp-device-xhand/src/devices/xHandControlBoard/xHandControlBoard_ParamsParser.h>

+ Inheritance diagram for xHandControlBoard_ParamsParser:

Classes

struct  parser_version_type
 

Public Member Functions

 xHandControlBoard_ParamsParser ()
 
 ~xHandControlBoard_ParamsParser () override=default
 
bool parseParams (const yarp::os::Searchable &config) override
 Parse the DeviceDriver parameters.
 
std::string getDeviceClassName () const override
 Get the name of the DeviceDriver class.
 
std::string getDeviceName () const override
 Get the name of the device (i.e.
 
std::string getDocumentationOfDeviceParams () const override
 Get the documentation of the DeviceDriver's parameters.
 
std::vector< std::string > getListOfParams () const override
 Return a list of all params used by the device.
 
bool getParamValue (const std::string &paramName, std::string &paramValue) const override
 Return the value (represented as a string) of the requested parameter.
 
std::string getConfiguration () const override
 Return the configuration of the device.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 

Public Attributes

const std::string m_device_classname = {"xHandControlBoard"}
 
const std::string m_device_name = {"xHandControlBoard"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
std::string m_provided_configuration
 
const std::string m_connection_type_defaultValue = {"EtherCAT"}
 
const std::string m_RS485_port_defaultValue = {"/dev/ttyUSB0"}
 
const std::string m_RS485_baudrate_defaultValue = {"3000000"}
 
const std::string m_ETHERCAT_eth_ifname_defaultValue = {""}
 
const std::string m_PID_kp_defaultValue = {"225"}
 
const std::string m_PID_ki_defaultValue = {"0"}
 
const std::string m_PID_kd_defaultValue = {"12000"}
 
const std::string m_TORQUE_tor_max_defaultValue = {"350"}
 
const std::string m_MODE_mode_defaultValue = {"3"}
 
const std::string m_LIMITS_jntPosMin_defaultValue = {"(0.0 -60.0 -0.0 -5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0)"}
 
const std::string m_LIMITS_jntPosMax_defaultValue = {"(90.0 90.0 90.0 17.0 110.0 110.0 110.0 110.0 110.0 110.0 110.0 110.0)"}
 
const std::string m_LIMITS_jntVelMin_defaultValue = {"(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0)"}
 
const std::string m_LIMITS_jntVelMax_defaultValue = {"(100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0)"}
 
const std::string m_GENERAL_AxisName_defaultValue = {"(a a a a a a a a a a a a)"}
 
const std::string m_GENERAL_AxisType_defaultValue = {"(a a a a a a a a a a a a)"}
 
const std::string m_GENERAL_AxisMap_defaultValue = {"(0 0 0 0 0 0 0 0 0 0 0 0)"}
 
std::string m_connection_type = {"EtherCAT"}
 
std::string m_RS485_port = {"/dev/ttyUSB0"}
 
int m_RS485_baudrate = {3000000}
 
std::string m_ETHERCAT_eth_ifname = {}
 
int m_PID_kp = {225}
 
int m_PID_ki = {0}
 
int m_PID_kd = {12000}
 
int m_TORQUE_tor_max = {350}
 
int m_MODE_mode = {3}
 
std::vector< double > m_LIMITS_jntPosMin = { }
 
std::vector< double > m_LIMITS_jntPosMax = { }
 
std::vector< double > m_LIMITS_jntVelMin = { }
 
std::vector< double > m_LIMITS_jntVelMax = { }
 
std::vector< std::string > m_GENERAL_AxisName = { }
 
std::vector< std::string > m_GENERAL_AxisType = { }
 
std::vector< int > m_GENERAL_AxisMap = { }
 

Detailed Description

This class is the parameters parser for class xHandControlBoard.

These are the used parameters:

Group name Parameter name Type Units Default Value Required Description Notes
- connection_type string - EtherCAT 1 Specify the connection type Can be either "RS485" (USB) or "EtherCAT" (ethernet)
RS485 port string - /dev/ttyUSB0 0 Specify the port to use for the serial connection Necessary only if using "RS485"
RS485 baudrate int - 3000000 0 Specify the baudrate for the serial connection Necessary only if using "RS485"
ETHERCAT eth_ifname string - - 0 Specify the interface name for the ethercat connection Necessary only if using "EtherCAT"
PID kp int - 225 0 Finger motors P gain -
PID ki int - 0 0 Finger motors I gain -
PID kd int - 12000 0 Finger motors D gain -
TORQUE tor_max int - 350 0 Note: 350 is the value from their ethercat_test -
MODE mode int - 3 0 Powerless = 0; Powerfull = 3; Check the manual for others -
LIMITS jntPosMin vector<double> deg (0.0 -60.0 -0.0 -5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0) 0 - -
LIMITS jntPosMax vector<double> deg (90.0 90.0 90.0 17.0 110.0 110.0 110.0 110.0 110.0 110.0 110.0 110.0) 0 - -
LIMITS jntVelMin vector<double> deg/s (0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0) 0 - -
LIMITS jntVelMax vector<double> deg/s (100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0) 0 - -
GENERAL AxisName vector<string> - (a a a a a a a a a a a a) 0 - -
GENERAL AxisType vector<string> - (a a a a a a a a a a a a) 0 - -
GENERAL AxisMap vector<int> - (0 0 0 0 0 0 0 0 0 0 0 0) 0 - -

The device can be launched by yarpdev using one of the following examples (with and without all optional parameters):

yarpdev --device xHandControlBoard --connection_type EtherCAT --RS485::port /dev/ttyUSB0 --RS485::baudrate 3000000 --ETHERCAT::eth_ifname <optional_value> --PID::kp 225 --PID::ki 0 --PID::kd 12000 --TORQUE::tor_max 350 --MODE::mode 3 --LIMITS::jntPosMin \" (0.0 -60.0 -0.0 -5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0) \" --LIMITS::jntPosMax \" (90.0 90.0 90.0 17.0 110.0 110.0 110.0 110.0 110.0 110.0 110.0 110.0) \" --LIMITS::jntVelMin \" (0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0) \" --LIMITS::jntVelMax \" (100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0) \" --GENERAL::AxisName \" (a a a a a a a a a a a a) \" --GENERAL::AxisType \" (a a a a a a a a a a a a) \" --GENERAL::AxisMap \" (0 0 0 0 0 0 0 0 0 0 0 0) \"
yarpdev --device xHandControlBoard --connection_type EtherCAT

Definition at line 56 of file xHandControlBoard_ParamsParser.h.

Constructor & Destructor Documentation

◆ xHandControlBoard_ParamsParser()

xHandControlBoard_ParamsParser::xHandControlBoard_ParamsParser ( )

Definition at line 23 of file xHandControlBoard_ParamsParser.cpp.

◆ ~xHandControlBoard_ParamsParser()

xHandControlBoard_ParamsParser::~xHandControlBoard_ParamsParser ( )
overridedefault

Member Function Documentation

◆ getConfiguration()

std::string xHandControlBoard_ParamsParser::getConfiguration ( ) const
overridevirtual

Return the configuration of the device.

Returns
The configuration of the device, represented in a string format.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 266 of file xHandControlBoard_ParamsParser.cpp.

◆ getDeviceClassName()

std::string xHandControlBoard_ParamsParser::getDeviceClassName ( ) const
inlineoverridevirtual

Get the name of the DeviceDriver class.

Returns
A string containing the name of the class.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 110 of file xHandControlBoard_ParamsParser.h.

◆ getDeviceName()

std::string xHandControlBoard_ParamsParser::getDeviceName ( ) const
inlineoverridevirtual

Get the name of the device (i.e.

the plugin name).

Returns
A string containing the name of the device.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 111 of file xHandControlBoard_ParamsParser.h.

◆ getDocumentationOfDeviceParams()

std::string xHandControlBoard_ParamsParser::getDocumentationOfDeviceParams ( ) const
overridevirtual

Get the documentation of the DeviceDriver's parameters.

Returns
A string containing the documentation.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 676 of file xHandControlBoard_ParamsParser.cpp.

◆ getListOfParams()

std::vector< std::string > xHandControlBoard_ParamsParser::getListOfParams ( ) const
overridevirtual

Return a list of all params used by the device.

Returns
A vector containing the names of parameters used by the device.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 161 of file xHandControlBoard_ParamsParser.cpp.

◆ getParamValue()

bool xHandControlBoard_ParamsParser::getParamValue ( const std::string &  paramName,
std::string &  paramValue 
) const
overridevirtual

Return the value (represented as a string) of the requested parameter.

Returns
True if the requested parameter was succesfully retrieved.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 184 of file xHandControlBoard_ParamsParser.cpp.

◆ parseParams()

bool xHandControlBoard_ParamsParser::parseParams ( const yarp::os::Searchable &  config)
overridevirtual

Parse the DeviceDriver parameters.

Returns
true if the parsing is successful, false otherwise

Implements yarp::dev::IDeviceDriverParams.

Definition at line 276 of file xHandControlBoard_ParamsParser.cpp.

Member Data Documentation

◆ m_connection_type

std::string xHandControlBoard_ParamsParser::m_connection_type = {"EtherCAT"}

Definition at line 92 of file xHandControlBoard_ParamsParser.h.

◆ m_connection_type_defaultValue

const std::string xHandControlBoard_ParamsParser::m_connection_type_defaultValue = {"EtherCAT"}

Definition at line 75 of file xHandControlBoard_ParamsParser.h.

◆ m_device_classname

const std::string xHandControlBoard_ParamsParser::m_device_classname = {"xHandControlBoard"}

Definition at line 63 of file xHandControlBoard_ParamsParser.h.

◆ m_device_name

const std::string xHandControlBoard_ParamsParser::m_device_name = {"xHandControlBoard"}

Definition at line 64 of file xHandControlBoard_ParamsParser.h.

◆ m_ETHERCAT_eth_ifname

std::string xHandControlBoard_ParamsParser::m_ETHERCAT_eth_ifname = {}

Definition at line 95 of file xHandControlBoard_ParamsParser.h.

◆ m_ETHERCAT_eth_ifname_defaultValue

const std::string xHandControlBoard_ParamsParser::m_ETHERCAT_eth_ifname_defaultValue = {""}

Definition at line 78 of file xHandControlBoard_ParamsParser.h.

◆ m_GENERAL_AxisMap

std::vector<int> xHandControlBoard_ParamsParser::m_GENERAL_AxisMap = { }

Definition at line 107 of file xHandControlBoard_ParamsParser.h.

◆ m_GENERAL_AxisMap_defaultValue

const std::string xHandControlBoard_ParamsParser::m_GENERAL_AxisMap_defaultValue = {"(0 0 0 0 0 0 0 0 0 0 0 0)"}

Definition at line 90 of file xHandControlBoard_ParamsParser.h.

◆ m_GENERAL_AxisName

std::vector<std::string> xHandControlBoard_ParamsParser::m_GENERAL_AxisName = { }

Definition at line 105 of file xHandControlBoard_ParamsParser.h.

◆ m_GENERAL_AxisName_defaultValue

const std::string xHandControlBoard_ParamsParser::m_GENERAL_AxisName_defaultValue = {"(a a a a a a a a a a a a)"}

Definition at line 88 of file xHandControlBoard_ParamsParser.h.

◆ m_GENERAL_AxisType

std::vector<std::string> xHandControlBoard_ParamsParser::m_GENERAL_AxisType = { }

Definition at line 106 of file xHandControlBoard_ParamsParser.h.

◆ m_GENERAL_AxisType_defaultValue

const std::string xHandControlBoard_ParamsParser::m_GENERAL_AxisType_defaultValue = {"(a a a a a a a a a a a a)"}

Definition at line 89 of file xHandControlBoard_ParamsParser.h.

◆ m_LIMITS_jntPosMax

std::vector<double> xHandControlBoard_ParamsParser::m_LIMITS_jntPosMax = { }

Definition at line 102 of file xHandControlBoard_ParamsParser.h.

◆ m_LIMITS_jntPosMax_defaultValue

const std::string xHandControlBoard_ParamsParser::m_LIMITS_jntPosMax_defaultValue = {"(90.0 90.0 90.0 17.0 110.0 110.0 110.0 110.0 110.0 110.0 110.0 110.0)"}

Definition at line 85 of file xHandControlBoard_ParamsParser.h.

◆ m_LIMITS_jntPosMin

std::vector<double> xHandControlBoard_ParamsParser::m_LIMITS_jntPosMin = { }

Definition at line 101 of file xHandControlBoard_ParamsParser.h.

◆ m_LIMITS_jntPosMin_defaultValue

const std::string xHandControlBoard_ParamsParser::m_LIMITS_jntPosMin_defaultValue = {"(0.0 -60.0 -0.0 -5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0)"}

Definition at line 84 of file xHandControlBoard_ParamsParser.h.

◆ m_LIMITS_jntVelMax

std::vector<double> xHandControlBoard_ParamsParser::m_LIMITS_jntVelMax = { }

Definition at line 104 of file xHandControlBoard_ParamsParser.h.

◆ m_LIMITS_jntVelMax_defaultValue

const std::string xHandControlBoard_ParamsParser::m_LIMITS_jntVelMax_defaultValue = {"(100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0)"}

Definition at line 87 of file xHandControlBoard_ParamsParser.h.

◆ m_LIMITS_jntVelMin

std::vector<double> xHandControlBoard_ParamsParser::m_LIMITS_jntVelMin = { }

Definition at line 103 of file xHandControlBoard_ParamsParser.h.

◆ m_LIMITS_jntVelMin_defaultValue

const std::string xHandControlBoard_ParamsParser::m_LIMITS_jntVelMin_defaultValue = {"(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0)"}

Definition at line 86 of file xHandControlBoard_ParamsParser.h.

◆ m_MODE_mode

int xHandControlBoard_ParamsParser::m_MODE_mode = {3}

Definition at line 100 of file xHandControlBoard_ParamsParser.h.

◆ m_MODE_mode_defaultValue

const std::string xHandControlBoard_ParamsParser::m_MODE_mode_defaultValue = {"3"}

Definition at line 83 of file xHandControlBoard_ParamsParser.h.

◆ m_parser_is_strict

bool xHandControlBoard_ParamsParser::m_parser_is_strict = false

Definition at line 65 of file xHandControlBoard_ParamsParser.h.

◆ m_parser_version

const parser_version_type xHandControlBoard_ParamsParser::m_parser_version = {}

Definition at line 71 of file xHandControlBoard_ParamsParser.h.

◆ m_PID_kd

int xHandControlBoard_ParamsParser::m_PID_kd = {12000}

Definition at line 98 of file xHandControlBoard_ParamsParser.h.

◆ m_PID_kd_defaultValue

const std::string xHandControlBoard_ParamsParser::m_PID_kd_defaultValue = {"12000"}

Definition at line 81 of file xHandControlBoard_ParamsParser.h.

◆ m_PID_ki

int xHandControlBoard_ParamsParser::m_PID_ki = {0}

Definition at line 97 of file xHandControlBoard_ParamsParser.h.

◆ m_PID_ki_defaultValue

const std::string xHandControlBoard_ParamsParser::m_PID_ki_defaultValue = {"0"}

Definition at line 80 of file xHandControlBoard_ParamsParser.h.

◆ m_PID_kp

int xHandControlBoard_ParamsParser::m_PID_kp = {225}

Definition at line 96 of file xHandControlBoard_ParamsParser.h.

◆ m_PID_kp_defaultValue

const std::string xHandControlBoard_ParamsParser::m_PID_kp_defaultValue = {"225"}

Definition at line 79 of file xHandControlBoard_ParamsParser.h.

◆ m_provided_configuration

std::string xHandControlBoard_ParamsParser::m_provided_configuration

Definition at line 73 of file xHandControlBoard_ParamsParser.h.

◆ m_RS485_baudrate

int xHandControlBoard_ParamsParser::m_RS485_baudrate = {3000000}

Definition at line 94 of file xHandControlBoard_ParamsParser.h.

◆ m_RS485_baudrate_defaultValue

const std::string xHandControlBoard_ParamsParser::m_RS485_baudrate_defaultValue = {"3000000"}

Definition at line 77 of file xHandControlBoard_ParamsParser.h.

◆ m_RS485_port

std::string xHandControlBoard_ParamsParser::m_RS485_port = {"/dev/ttyUSB0"}

Definition at line 93 of file xHandControlBoard_ParamsParser.h.

◆ m_RS485_port_defaultValue

const std::string xHandControlBoard_ParamsParser::m_RS485_port_defaultValue = {"/dev/ttyUSB0"}

Definition at line 76 of file xHandControlBoard_ParamsParser.h.

◆ m_TORQUE_tor_max

int xHandControlBoard_ParamsParser::m_TORQUE_tor_max = {350}

Definition at line 99 of file xHandControlBoard_ParamsParser.h.

◆ m_TORQUE_tor_max_defaultValue

const std::string xHandControlBoard_ParamsParser::m_TORQUE_tor_max_defaultValue = {"350"}

Definition at line 82 of file xHandControlBoard_ParamsParser.h.


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