![]() |
peripherals
1.4.2
RoadNarrows Robotics Hardware Peripherals Package
|
Public Member Functions | |
| MotRoboteqSmall (float maxSpeed, float minSpeed, float speedStepSize, float maxBrake, float minBrake, float brakeStepSize) | |
| int | open (const std::string &devName, int baudRate) |
| Function opens serial communication with motor controller device. More... | |
| int | close () |
| Function closes serial communication with motor controller device. More... | |
| int | sendCommand (int fd, byte_t *buf, int nBytes, int timeout) |
| int | recvResponse (int fd, byte_t *buf, int timeout) |
| bool | motIDIsValid (int motID) |
| Function sends commands to the motor controller and receives responses from the motor controller. More... | |
| int | setSpeed (int motID, float speed, units_t units=units_norm) |
| Description. More... | |
| int | setSpeed (VecSpeedTupples vecSpeedTupple, units_t units=units_norm) |
| Function updates the speed of all motors simultaneously but individually. More... | |
| int | setSpeedRaw (int motID, int speed) |
| int | setSpeedRaw (VecSpeedRawTupples vecSpeedRawTupple) |
| int | stop (int motID) |
| Function stops motor specified. More... | |
| int | stop () |
| int | eStop () |
| Function simultaneously halts motor rotation for all motors by setting speeds to zero. More... | |
| int | eStopRelease () |
| Function releases emergency stop condition and allows normal ops. More... | |
| int | getCurrent (int motID, units_t units=units_amp) |
| Function retrieves value for current load on a single motor. More... | |
| int | getCurrentLimits () |
| Function determines if a motor controller can monitor current. More... | |
| int | setCurrentLimits (int motID, int current, units_t units=units_amp) |
| Function sets minimum and maximum limits for current. More... | |
| int | getVoltageLimits () |
| Function retrieves value for current load on a single motor. More... | |
| int | setVoltageLimits (int lowVoltage, int overVoltage) |
| Function sets the minimum and maximum limits for applied voltage for all motors. More... | |
| int | getVoltage () |
| Function retrieves value for voltage applied to a single motor. More... | |
| int | setSpeedProfile (int motID, int accel, int decel=DEF_DEC) |
| Function retrieves value for voltage applied to a single motor. More... | |
Public Member Functions inherited from rnr::Mot | |
| Mot (float maxSpeed, float minSpeed, float speedStepSize, float maxBrake, float minBrake, float brakeStepSize) | |
Protected Attributes | |
| int | m_fd |
| int | m_ntimeout |
| int | m_nbaudRate |
Protected Attributes inherited from rnr::Mot | |
| float | m_fMaxSpeed |
| Function sets the acce1 leration rate for motors. More... | |
| float | m_fMinSpeed |
| float | m_fSpeedStepSize |
| float | m_fMaxBrake |
| float | m_fMinBrake |
| float | m_fBrakeStepSize |
Additional Inherited Members | |
Public Types inherited from rnr::Mot | |
| typedef std::vector< IDFloatTupple > | VecSpeedTupples |
| typedef std::vector< IDIntTupple > | VecSpeedRawTupples |
| typedef std::vector< int > | VecMotID |
Definition at line 64 of file MotRoboteqSmall.h.
|
virtual |
Function closes serial communication with motor controller device.
Uses SerDevClose to close serial connection. Returns: 0 on success, -1 on fail.
Implements rnr::Mot.
Definition at line 99 of file MotRoboteqSmall.cxx.
Referenced by testRoboteqSmallSanity().
|
virtual |
Function simultaneously halts motor rotation for all motors by setting speeds to zero.
Needs to be passed:
Function simultaneously halts motor rotation for all motors and locks the motor controller. No further commands can be given until EStop Release function has been passed.
Implements rnr::Mot.
Definition at line 243 of file MotRoboteqSmall.cxx.
|
virtual |
Function releases emergency stop condition and allows normal ops.
Implements rnr::Mot.
Definition at line 265 of file MotRoboteqSmall.cxx.
|
virtual |
Function retrieves value for current load on a single motor.
Implements rnr::Mot.
Definition at line 287 of file MotRoboteqSmall.cxx.
|
virtual |
Function determines if a motor controller can monitor current.
If feature is not defined by the user, the controller will not monitor current.
Function obtains current limit vaules from motor controller.
Implements rnr::Mot.
Definition at line 307 of file MotRoboteqSmall.cxx.
Referenced by testRoboteqSmallSanity().
|
virtual |
Function retrieves value for voltage applied to a single motor.
Implements rnr::Mot.
Definition at line 362 of file MotRoboteqSmall.cxx.
Referenced by testRoboteqSmallSanity().
|
virtual |
Function retrieves value for current load on a single motor.
Function sets value for current supplied to a single motor.
Function sets value for current supplied to a single motor.
Function determines is a motor controller can monitor voltage.
If feature is not defined by the user, the controller will not monitor voltage.
Function retrieves voltage limits from motor controller.
Implements rnr::Mot.
Definition at line 346 of file MotRoboteqSmall.cxx.
Referenced by testRoboteqSmallSanity().
|
virtual |
Function sends commands to the motor controller and receives responses from the motor controller.
Function uses SerDevWrite (libserial) to send commands over serial to the motor controllers, and uses recvResponse to receive echoed command responses as well as acknowledgements and query responses.
Returns:
Function is responsible for retrieving responses from motor controllers after a command has been sent.
Returns: nBytes (number of bytes sent in response) on success
Function checks for valid motor ID inputs.
Returns: 0 on success, -1 on fail.
Implements rnr::Mot.
Definition at line 131 of file MotRoboteqSmall.cxx.
|
virtual |
Function opens serial communication with motor controller device.
Uses SerDevOpen to open serial connection with device (devName) Returns: File descriptor >=0 on success, -1 on fail.
Implements rnr::Mot.
Definition at line 87 of file MotRoboteqSmall.cxx.
Referenced by testRoboteqSmallSanity().
|
virtual |
Function sets minimum and maximum limits for current.
alim
Implements rnr::Mot.
Definition at line 322 of file MotRoboteqSmall.cxx.
Referenced by testRoboteqSmallSanity().
|
virtual |
Description.
| id | des | |
| [out] | minSpeed | des |
Description
| id | des | |
| [out] | minSpeed | desmotSpeeds |
motSpeeds
Function retrieves the speed of a specific motor.
Raw speed will be given.
Needs to be passed: Motor ID (1 or 2)
Returns: 0 on success, -1 upon failure.
Function updates the speed of a single motor.
Needs to be passed: A speed (-1 <= speed <= 1), and a motor id (0 = left, 1 = right) Returns: 0 on Success, -1 on incorrect speed, -2 on serial write fail.
Implements rnr::Mot.
Definition at line 141 of file MotRoboteqSmall.cxx.
Referenced by testRoboteqSmallSanity().
|
virtual |
Function updates the speed of all motors simultaneously but individually.
Function uses a vector to consturct a string of commands which will then be sent to multiple motors.
Needs to be passed: motSpeeds vetor which includes a Motor ID (1 or 2) and a value between or equal to -1 and 1 for speed.
Implements rnr::Mot.
Definition at line 162 of file MotRoboteqSmall.cxx.
|
virtual |
Function retrieves value for voltage applied to a single motor.
Function sets voltage value for an indivifual motor.
Function sets voltage value for an individual motor.
Function determines if a motor controller can monitor torque.
If feature is not defined by the user, the controller will not monitor torque.
Function retrieves value for torque output for a single motor.
Function sets minimum and maximum limits for motor torque.
\ brief Function retrives tourque values from an individual motor.
\ brief Function retrives tourque values from an individual motor.
Function sets the torque value for an individual motor.
Higher torque values give the motor more turning strength.
Function sets the torque value for an individual motor.
Higher torque values give the motor more turning strength.
Function sets the acceleration rate for motors.
Values represent 'slope' of the velocity profile when motor speeds are changed. In the case of deceleration, this is analogous to the difference between coasting to a stop (high argument values) and stopping abruptly (low argument values).
Function sets the acceleration rate for motors.
Values represent 'slope' of the velocity profile when motor speeds are changed. In the case of deceleration, this is analogous to the difference between coasting to a stop (high argument values) and stopping abruptly (low argument values).
Implements rnr::Mot.
Definition at line 414 of file MotRoboteqSmall.cxx.
Referenced by testRoboteqSmallSanity().
|
virtual |
Function sets the minimum and maximum limits for applied voltage for all motors.
Needs to be passed: Low Voltage limit (>=5) and a Over Voltage limit (>=29).
Implements rnr::Mot.
Definition at line 376 of file MotRoboteqSmall.cxx.
Referenced by testRoboteqSmallSanity().
|
virtual |
Function stops motor specified.
Needs to be passed: Motor ID (1 or 2).
Implements rnr::Mot.
Definition at line 232 of file MotRoboteqSmall.cxx.
Referenced by testRoboteqSmallSanity().