iCub-main
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
yarp::dev::CanBusMotionControlParameters Class Reference

The PlxCan motion controller device driver. More...

#include <CanBusMotionControl.h>

Classes

struct  DebugParameters
 
struct  ImpedanceParameters
 

Public Types

enum  torqueControlUnitsType {
  MACHINE_UNITS =0 ,
  METRIC_UNITS =1
}
 

Public Member Functions

 CanBusMotionControlParameters ()
 Constructor (please make sure you use the constructor to allocate memory). More...
 
 ~CanBusMotionControlParameters ()
 Destructor, with memory deallocation. More...
 
bool parsePosPidsGroup_OldFormat (yarp::os::Bottle &pidsGroup, int nj, Pid myPid[])
 
bool parseTrqPidsGroup_OldFormat (yarp::os::Bottle &pidsGroup, int nj, Pid myPid[])
 
bool parsePidsGroup_NewFormat (yarp::os::Bottle &pidsGroup, Pid myPid[])
 
bool parseImpedanceGroup_NewFormat (yarp::os::Bottle &pidsGroup, ImpedanceParameters vals[])
 
bool parseDebugGroup_NewFormat (yarp::os::Bottle &pidsGroup, DebugParameters vals[])
 
bool setBroadCastMask (yarp::os::Bottle &list, int MASK)
 
bool fromConfig (yarp::os::Searchable &config)
 
bool alloc (int nj)
 

Public Attributes

int _txQueueSize
 
int _rxQueueSize
 
int _txTimeout
 
int _rxTimeout
 
int * _broadcast_mask
 
int _networkN
 
std::string _networkName
 network number More...
 
int _njoints
 network name More...
 
unsigned char * _destinations
 number of joints/axes/controlled motors More...
 
unsigned char _my_address
 destination addresses More...
 
int _polling_interval
 my address More...
 
int _timeout
 thread polling interval [ms] More...
 
std::string * _axisName
 number of cycles before timing out More...
 
std::string * _axisType
 axis name More...
 
int * _axisMap
 axis type More...
 
double * _angleToEncoder
 axis remapping lookup-table More...
 
double * _rotToEncoder
 angle to encoder conversion factors More...
 
double * _zeros
 angle to rotor conversion factors More...
 
Pid * _pids
 encoder zeros More...
 
Pid * _tpids
 initial gains More...
 
bool _pwmIsLimited
 initial torque gains More...
 
SpeedEstimationParameters_estim_params
 set to true if pwm is limited More...
 
DebugParameters_debug_params
 parameters for speed/acceleration estimation More...
 
ImpedanceParameters_impedance_params
 debug parameters More...
 
ImpedanceLimits_impedance_limits
 impedance parameters More...
 
double * _bemfGain
 impedancel imits More...
 
double * _ktau
 bemf compensation gain More...
 
int * _filterType
 motor torque constant More...
 
double * _limitsMin
 
double * _limitsMax
 joint limits, max More...
 
double * _currentLimits
 joint limits, min More...
 
double * _motorPwmLimits
 current limits More...
 
int * _velocityShifts
 pwm limits More...
 
int * _velocityTimeout
 velocity shifts More...
 
double * _maxStep
 velocity shifts More...
 
double * _maxJntCmdVelocity
 max size of a positionDirect step More...
 
double * _optical_factor
 max velocity command for a joint More...
 
int * _torqueSensorId
 reduction ratio of the optical encoder on motor axis More...
 
int * _torqueSensorChan
 Id of associated Joint Torque Sensor. More...
 
double * _maxTorque
 Channel of associated Joint Torque Sensor. More...
 
double * _newtonsToSensor
 Max torque of a joint. More...
 
double * _ampsToSensor
 Newtons to force sensor units conversion factors. More...
 
double * _dutycycleToPwm
 
torqueControlUnitsType _torqueControlUnits
 
bool _torqueControlEnabled
 

Detailed Description

The PlxCan motion controller device driver.

Contains a thread that takes care of polling the can bus for incoming messages. The open parameter class containing the initialization values.

Definition at line 98 of file CanBusMotionControl.h.

Member Enumeration Documentation

◆ torqueControlUnitsType

Enumerator
MACHINE_UNITS 
METRIC_UNITS 

Definition at line 190 of file CanBusMotionControl.h.

Constructor & Destructor Documentation

◆ CanBusMotionControlParameters()

CanBusMotionControlParameters::CanBusMotionControlParameters ( )

Constructor (please make sure you use the constructor to allocate memory).

Parameters
njis the number of controlled joints/axes.

max len of the buffer for the esd driver

20ms timeout

Definition at line 1873 of file CanBusMotionControl.cpp.

◆ ~CanBusMotionControlParameters()

CanBusMotionControlParameters::~CanBusMotionControlParameters ( )

Destructor, with memory deallocation.

Definition at line 1986 of file CanBusMotionControl.cpp.

Member Function Documentation

◆ alloc()

bool CanBusMotionControlParameters::alloc ( int  nj)

max len of the buffer for the esd driver

20ms timeout

Definition at line 1921 of file CanBusMotionControl.cpp.

◆ fromConfig()

bool CanBusMotionControlParameters::fromConfig ( yarp::os::Searchable &  config)

Definition at line 1151 of file CanBusMotionControl.cpp.

◆ parseDebugGroup_NewFormat()

bool CanBusMotionControlParameters::parseDebugGroup_NewFormat ( yarp::os::Bottle &  pidsGroup,
DebugParameters  vals[] 
)

Definition at line 1135 of file CanBusMotionControl.cpp.

◆ parseImpedanceGroup_NewFormat()

bool CanBusMotionControlParameters::parseImpedanceGroup_NewFormat ( yarp::os::Bottle &  pidsGroup,
ImpedanceParameters  vals[] 
)

Definition at line 1126 of file CanBusMotionControl.cpp.

◆ parsePidsGroup_NewFormat()

bool CanBusMotionControlParameters::parsePidsGroup_NewFormat ( yarp::os::Bottle &  pidsGroup,
Pid  myPid[] 
)

Definition at line 1097 of file CanBusMotionControl.cpp.

◆ parsePosPidsGroup_OldFormat()

bool CanBusMotionControlParameters::parsePosPidsGroup_OldFormat ( yarp::os::Bottle &  pidsGroup,
int  nj,
Pid  myPid[] 
)

Definition at line 1042 of file CanBusMotionControl.cpp.

◆ parseTrqPidsGroup_OldFormat()

bool CanBusMotionControlParameters::parseTrqPidsGroup_OldFormat ( yarp::os::Bottle &  pidsGroup,
int  nj,
Pid  myPid[] 
)

Definition at line 1070 of file CanBusMotionControl.cpp.

◆ setBroadCastMask()

bool CanBusMotionControlParameters::setBroadCastMask ( yarp::os::Bottle &  list,
int  MASK 
)

Definition at line 1014 of file CanBusMotionControl.cpp.

Member Data Documentation

◆ _ampsToSensor

double* yarp::dev::CanBusMotionControlParameters::_ampsToSensor

Newtons to force sensor units conversion factors.

Definition at line 188 of file CanBusMotionControl.h.

◆ _angleToEncoder

double* yarp::dev::CanBusMotionControlParameters::_angleToEncoder

axis remapping lookup-table

Definition at line 162 of file CanBusMotionControl.h.

◆ _axisMap

int* yarp::dev::CanBusMotionControlParameters::_axisMap

axis type

Definition at line 161 of file CanBusMotionControl.h.

◆ _axisName

std::string* yarp::dev::CanBusMotionControlParameters::_axisName

number of cycles before timing out

Definition at line 159 of file CanBusMotionControl.h.

◆ _axisType

std::string* yarp::dev::CanBusMotionControlParameters::_axisType

axis name

Definition at line 160 of file CanBusMotionControl.h.

◆ _bemfGain

double* yarp::dev::CanBusMotionControlParameters::_bemfGain

impedancel imits

Definition at line 172 of file CanBusMotionControl.h.

◆ _broadcast_mask

int* yarp::dev::CanBusMotionControlParameters::_broadcast_mask

Definition at line 149 of file CanBusMotionControl.h.

◆ _currentLimits

double* yarp::dev::CanBusMotionControlParameters::_currentLimits

joint limits, min

Definition at line 177 of file CanBusMotionControl.h.

◆ _debug_params

DebugParameters* yarp::dev::CanBusMotionControlParameters::_debug_params

parameters for speed/acceleration estimation

Definition at line 169 of file CanBusMotionControl.h.

◆ _destinations

unsigned char* yarp::dev::CanBusMotionControlParameters::_destinations

number of joints/axes/controlled motors

Definition at line 154 of file CanBusMotionControl.h.

◆ _dutycycleToPwm

double* yarp::dev::CanBusMotionControlParameters::_dutycycleToPwm

Definition at line 189 of file CanBusMotionControl.h.

◆ _estim_params

SpeedEstimationParameters* yarp::dev::CanBusMotionControlParameters::_estim_params

set to true if pwm is limited

Definition at line 168 of file CanBusMotionControl.h.

◆ _filterType

int* yarp::dev::CanBusMotionControlParameters::_filterType

motor torque constant

Definition at line 174 of file CanBusMotionControl.h.

◆ _impedance_limits

ImpedanceLimits* yarp::dev::CanBusMotionControlParameters::_impedance_limits

impedance parameters

Definition at line 171 of file CanBusMotionControl.h.

◆ _impedance_params

ImpedanceParameters* yarp::dev::CanBusMotionControlParameters::_impedance_params

debug parameters

Definition at line 170 of file CanBusMotionControl.h.

◆ _ktau

double* yarp::dev::CanBusMotionControlParameters::_ktau

bemf compensation gain

Definition at line 173 of file CanBusMotionControl.h.

◆ _limitsMax

double* yarp::dev::CanBusMotionControlParameters::_limitsMax

joint limits, max

Definition at line 176 of file CanBusMotionControl.h.

◆ _limitsMin

double* yarp::dev::CanBusMotionControlParameters::_limitsMin

Definition at line 175 of file CanBusMotionControl.h.

◆ _maxJntCmdVelocity

double* yarp::dev::CanBusMotionControlParameters::_maxJntCmdVelocity

max size of a positionDirect step

Definition at line 182 of file CanBusMotionControl.h.

◆ _maxStep

double* yarp::dev::CanBusMotionControlParameters::_maxStep

velocity shifts

Definition at line 181 of file CanBusMotionControl.h.

◆ _maxTorque

double* yarp::dev::CanBusMotionControlParameters::_maxTorque

Channel of associated Joint Torque Sensor.

Definition at line 186 of file CanBusMotionControl.h.

◆ _motorPwmLimits

double* yarp::dev::CanBusMotionControlParameters::_motorPwmLimits

current limits

Definition at line 178 of file CanBusMotionControl.h.

◆ _my_address

unsigned char yarp::dev::CanBusMotionControlParameters::_my_address

destination addresses

Definition at line 155 of file CanBusMotionControl.h.

◆ _networkN

int yarp::dev::CanBusMotionControlParameters::_networkN

Definition at line 151 of file CanBusMotionControl.h.

◆ _networkName

std::string yarp::dev::CanBusMotionControlParameters::_networkName

network number

Definition at line 152 of file CanBusMotionControl.h.

◆ _newtonsToSensor

double* yarp::dev::CanBusMotionControlParameters::_newtonsToSensor

Max torque of a joint.

Definition at line 187 of file CanBusMotionControl.h.

◆ _njoints

int yarp::dev::CanBusMotionControlParameters::_njoints

network name

Definition at line 153 of file CanBusMotionControl.h.

◆ _optical_factor

double* yarp::dev::CanBusMotionControlParameters::_optical_factor

max velocity command for a joint

Definition at line 183 of file CanBusMotionControl.h.

◆ _pids

Pid* yarp::dev::CanBusMotionControlParameters::_pids

encoder zeros

Definition at line 165 of file CanBusMotionControl.h.

◆ _polling_interval

int yarp::dev::CanBusMotionControlParameters::_polling_interval

my address

Definition at line 156 of file CanBusMotionControl.h.

◆ _pwmIsLimited

bool yarp::dev::CanBusMotionControlParameters::_pwmIsLimited

initial torque gains

Definition at line 167 of file CanBusMotionControl.h.

◆ _rotToEncoder

double* yarp::dev::CanBusMotionControlParameters::_rotToEncoder

angle to encoder conversion factors

Definition at line 163 of file CanBusMotionControl.h.

◆ _rxQueueSize

int yarp::dev::CanBusMotionControlParameters::_rxQueueSize

Definition at line 146 of file CanBusMotionControl.h.

◆ _rxTimeout

int yarp::dev::CanBusMotionControlParameters::_rxTimeout

Definition at line 148 of file CanBusMotionControl.h.

◆ _timeout

int yarp::dev::CanBusMotionControlParameters::_timeout

thread polling interval [ms]

Definition at line 157 of file CanBusMotionControl.h.

◆ _torqueControlEnabled

bool yarp::dev::CanBusMotionControlParameters::_torqueControlEnabled

Definition at line 192 of file CanBusMotionControl.h.

◆ _torqueControlUnits

torqueControlUnitsType yarp::dev::CanBusMotionControlParameters::_torqueControlUnits

Definition at line 191 of file CanBusMotionControl.h.

◆ _torqueSensorChan

int* yarp::dev::CanBusMotionControlParameters::_torqueSensorChan

Id of associated Joint Torque Sensor.

Definition at line 185 of file CanBusMotionControl.h.

◆ _torqueSensorId

int* yarp::dev::CanBusMotionControlParameters::_torqueSensorId

reduction ratio of the optical encoder on motor axis

Definition at line 184 of file CanBusMotionControl.h.

◆ _tpids

Pid* yarp::dev::CanBusMotionControlParameters::_tpids

initial gains

Definition at line 166 of file CanBusMotionControl.h.

◆ _txQueueSize

int yarp::dev::CanBusMotionControlParameters::_txQueueSize

Definition at line 145 of file CanBusMotionControl.h.

◆ _txTimeout

int yarp::dev::CanBusMotionControlParameters::_txTimeout

Definition at line 147 of file CanBusMotionControl.h.

◆ _velocityShifts

int* yarp::dev::CanBusMotionControlParameters::_velocityShifts

pwm limits

Definition at line 179 of file CanBusMotionControl.h.

◆ _velocityTimeout

int* yarp::dev::CanBusMotionControlParameters::_velocityTimeout

velocity shifts

Definition at line 180 of file CanBusMotionControl.h.

◆ _zeros

double* yarp::dev::CanBusMotionControlParameters::_zeros

angle to rotor conversion factors

Definition at line 164 of file CanBusMotionControl.h.


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