iCub-main
|
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). | |
~CanBusMotionControlParameters () | |
Destructor, with memory deallocation. | |
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 | |
int | _njoints |
network name | |
unsigned char * | _destinations |
number of joints/axes/controlled motors | |
unsigned char | _my_address |
destination addresses | |
int | _polling_interval |
my address | |
int | _timeout |
thread polling interval [ms] | |
std::string * | _axisName |
number of cycles before timing out | |
std::string * | _axisType |
axis name | |
int * | _axisMap |
axis type | |
double * | _angleToEncoder |
axis remapping lookup-table | |
double * | _rotToEncoder |
angle to encoder conversion factors | |
double * | _zeros |
angle to rotor conversion factors | |
Pid * | _pids |
encoder zeros | |
Pid * | _tpids |
initial gains | |
bool | _pwmIsLimited |
initial torque gains | |
SpeedEstimationParameters * | _estim_params |
set to true if pwm is limited | |
DebugParameters * | _debug_params |
parameters for speed/acceleration estimation | |
ImpedanceParameters * | _impedance_params |
debug parameters | |
ImpedanceLimits * | _impedance_limits |
impedance parameters | |
double * | _bemfGain |
impedancel imits | |
double * | _ktau |
bemf compensation gain | |
int * | _filterType |
motor torque constant | |
double * | _limitsMin |
double * | _limitsMax |
joint limits, max | |
double * | _currentLimits |
joint limits, min | |
double * | _motorPwmLimits |
current limits | |
int * | _velocityShifts |
pwm limits | |
int * | _velocityTimeout |
velocity shifts | |
double * | _maxStep |
velocity shifts | |
double * | _maxJntCmdVelocity |
max size of a positionDirect step | |
double * | _optical_factor |
max velocity command for a joint | |
int * | _torqueSensorId |
reduction ratio of the optical encoder on motor axis | |
int * | _torqueSensorChan |
Id of associated Joint Torque Sensor. | |
double * | _maxTorque |
Channel of associated Joint Torque Sensor. | |
double * | _newtonsToSensor |
Max torque of a joint. | |
double * | _ampsToSensor |
Newtons to force sensor units conversion factors. | |
double * | _dutycycleToPwm |
torqueControlUnitsType | _torqueControlUnits |
bool | _torqueControlEnabled |
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.
Enumerator | |
---|---|
MACHINE_UNITS | |
METRIC_UNITS |
Definition at line 190 of file CanBusMotionControl.h.
CanBusMotionControlParameters::CanBusMotionControlParameters | ( | ) |
Constructor (please make sure you use the constructor to allocate memory).
nj | is 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 | ( | ) |
Destructor, with memory deallocation.
Definition at line 1986 of file CanBusMotionControl.cpp.
bool CanBusMotionControlParameters::alloc | ( | int | nj | ) |
max len of the buffer for the esd driver
20ms timeout
Definition at line 1921 of file CanBusMotionControl.cpp.
bool CanBusMotionControlParameters::fromConfig | ( | yarp::os::Searchable & | config | ) |
Definition at line 1151 of file CanBusMotionControl.cpp.
bool CanBusMotionControlParameters::parseDebugGroup_NewFormat | ( | yarp::os::Bottle & | pidsGroup, |
DebugParameters | vals[] | ||
) |
Definition at line 1135 of file CanBusMotionControl.cpp.
bool CanBusMotionControlParameters::parseImpedanceGroup_NewFormat | ( | yarp::os::Bottle & | pidsGroup, |
ImpedanceParameters | vals[] | ||
) |
Definition at line 1126 of file CanBusMotionControl.cpp.
bool CanBusMotionControlParameters::parsePidsGroup_NewFormat | ( | yarp::os::Bottle & | pidsGroup, |
Pid | myPid[] | ||
) |
Definition at line 1097 of file CanBusMotionControl.cpp.
bool CanBusMotionControlParameters::parsePosPidsGroup_OldFormat | ( | yarp::os::Bottle & | pidsGroup, |
int | nj, | ||
Pid | myPid[] | ||
) |
Definition at line 1042 of file CanBusMotionControl.cpp.
bool CanBusMotionControlParameters::parseTrqPidsGroup_OldFormat | ( | yarp::os::Bottle & | pidsGroup, |
int | nj, | ||
Pid | myPid[] | ||
) |
Definition at line 1070 of file CanBusMotionControl.cpp.
bool CanBusMotionControlParameters::setBroadCastMask | ( | yarp::os::Bottle & | list, |
int | MASK | ||
) |
Definition at line 1014 of file CanBusMotionControl.cpp.
double* yarp::dev::CanBusMotionControlParameters::_ampsToSensor |
Newtons to force sensor units conversion factors.
Definition at line 188 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_angleToEncoder |
axis remapping lookup-table
Definition at line 162 of file CanBusMotionControl.h.
int* yarp::dev::CanBusMotionControlParameters::_axisMap |
axis type
Definition at line 161 of file CanBusMotionControl.h.
std::string* yarp::dev::CanBusMotionControlParameters::_axisName |
number of cycles before timing out
Definition at line 159 of file CanBusMotionControl.h.
std::string* yarp::dev::CanBusMotionControlParameters::_axisType |
axis name
Definition at line 160 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_bemfGain |
impedancel imits
Definition at line 172 of file CanBusMotionControl.h.
int* yarp::dev::CanBusMotionControlParameters::_broadcast_mask |
Definition at line 149 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_currentLimits |
joint limits, min
Definition at line 177 of file CanBusMotionControl.h.
DebugParameters* yarp::dev::CanBusMotionControlParameters::_debug_params |
parameters for speed/acceleration estimation
Definition at line 169 of file CanBusMotionControl.h.
unsigned char* yarp::dev::CanBusMotionControlParameters::_destinations |
number of joints/axes/controlled motors
Definition at line 154 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_dutycycleToPwm |
Definition at line 189 of file CanBusMotionControl.h.
SpeedEstimationParameters* yarp::dev::CanBusMotionControlParameters::_estim_params |
set to true if pwm is limited
Definition at line 168 of file CanBusMotionControl.h.
int* yarp::dev::CanBusMotionControlParameters::_filterType |
motor torque constant
Definition at line 174 of file CanBusMotionControl.h.
ImpedanceLimits* yarp::dev::CanBusMotionControlParameters::_impedance_limits |
impedance parameters
Definition at line 171 of file CanBusMotionControl.h.
ImpedanceParameters* yarp::dev::CanBusMotionControlParameters::_impedance_params |
debug parameters
Definition at line 170 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_ktau |
bemf compensation gain
Definition at line 173 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_limitsMax |
joint limits, max
Definition at line 176 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_limitsMin |
Definition at line 175 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_maxJntCmdVelocity |
max size of a positionDirect step
Definition at line 182 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_maxStep |
velocity shifts
Definition at line 181 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_maxTorque |
Channel of associated Joint Torque Sensor.
Definition at line 186 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_motorPwmLimits |
current limits
Definition at line 178 of file CanBusMotionControl.h.
unsigned char yarp::dev::CanBusMotionControlParameters::_my_address |
destination addresses
Definition at line 155 of file CanBusMotionControl.h.
int yarp::dev::CanBusMotionControlParameters::_networkN |
Definition at line 151 of file CanBusMotionControl.h.
std::string yarp::dev::CanBusMotionControlParameters::_networkName |
network number
Definition at line 152 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_newtonsToSensor |
Max torque of a joint.
Definition at line 187 of file CanBusMotionControl.h.
int yarp::dev::CanBusMotionControlParameters::_njoints |
network name
Definition at line 153 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_optical_factor |
max velocity command for a joint
Definition at line 183 of file CanBusMotionControl.h.
Pid* yarp::dev::CanBusMotionControlParameters::_pids |
encoder zeros
Definition at line 165 of file CanBusMotionControl.h.
int yarp::dev::CanBusMotionControlParameters::_polling_interval |
my address
Definition at line 156 of file CanBusMotionControl.h.
bool yarp::dev::CanBusMotionControlParameters::_pwmIsLimited |
initial torque gains
Definition at line 167 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_rotToEncoder |
angle to encoder conversion factors
Definition at line 163 of file CanBusMotionControl.h.
int yarp::dev::CanBusMotionControlParameters::_rxQueueSize |
Definition at line 146 of file CanBusMotionControl.h.
int yarp::dev::CanBusMotionControlParameters::_rxTimeout |
Definition at line 148 of file CanBusMotionControl.h.
int yarp::dev::CanBusMotionControlParameters::_timeout |
thread polling interval [ms]
Definition at line 157 of file CanBusMotionControl.h.
bool yarp::dev::CanBusMotionControlParameters::_torqueControlEnabled |
Definition at line 192 of file CanBusMotionControl.h.
torqueControlUnitsType yarp::dev::CanBusMotionControlParameters::_torqueControlUnits |
Definition at line 191 of file CanBusMotionControl.h.
int* yarp::dev::CanBusMotionControlParameters::_torqueSensorChan |
Id of associated Joint Torque Sensor.
Definition at line 185 of file CanBusMotionControl.h.
int* yarp::dev::CanBusMotionControlParameters::_torqueSensorId |
reduction ratio of the optical encoder on motor axis
Definition at line 184 of file CanBusMotionControl.h.
Pid* yarp::dev::CanBusMotionControlParameters::_tpids |
initial gains
Definition at line 166 of file CanBusMotionControl.h.
int yarp::dev::CanBusMotionControlParameters::_txQueueSize |
Definition at line 145 of file CanBusMotionControl.h.
int yarp::dev::CanBusMotionControlParameters::_txTimeout |
Definition at line 147 of file CanBusMotionControl.h.
int* yarp::dev::CanBusMotionControlParameters::_velocityShifts |
pwm limits
Definition at line 179 of file CanBusMotionControl.h.
int* yarp::dev::CanBusMotionControlParameters::_velocityTimeout |
velocity shifts
Definition at line 180 of file CanBusMotionControl.h.
double* yarp::dev::CanBusMotionControlParameters::_zeros |
angle to rotor conversion factors
Definition at line 164 of file CanBusMotionControl.h.