#include <SerRelayBoard.h>
Driver class for communication with a Neobotix RelayBoard. Uses RS422 with 420 kBaud.
Definition at line 59 of file SerRelayBoard.h.
CAN node enumeration.
CANNODE_IOBOARD | |
CANNODE_MOTORRIGHT | |
CANNODE_MOTORLEFT | |
CANNODE_USBOARD | |
CANNODE_MOTORREARRIGHT | |
CANNODE_MOTORREARLEFT |
Definition at line 209 of file SerRelayBoard.h.
Motion types.
Definition at line 223 of file SerRelayBoard.h.
CMD_SET_CHARGE_RELAY | |
CMD_RESET_POS_CNT | |
CMD_QUICK_STOP | |
CMD_SET_RELAY1 | |
CMD_SET_RELAY2 | |
CMD_SET_RELAY3 | |
CMD_SET_RELAY4 | |
CMD_SET_RELAY5 | |
CMD_SET_RELAY6 | |
CMD_ZERO_GYRO |
Definition at line 180 of file SerRelayBoard.h.
CONFIG_HAS_IOBOARD | |
CONFIG_HAS_USBOARD | |
CONFIG_HAS_GYROBOARD | |
CONFIG_HAS_RADARBOARD1 | |
CONFIG_HAS_RADARBOARD2 | |
CONFIG_HAS_DRIVES | |
CONFIG_HAS_4_DRIVES |
Definition at line 194 of file SerRelayBoard.h.
NO_ERROR | |
NOT_INITIALIZED | |
GENERAL_SENDING_ERROR | |
TOO_LESS_BYTES_IN_QUEUE | |
NO_MESSAGES | |
CHECKSUM_ERROR | |
MSG_CONFIG | |
MSG_DATA |
Definition at line 168 of file SerRelayBoard.h.
Definition at line 229 of file SerRelayBoard.h.
Definition at line 67 of file SerRelayBoard.cpp.
Definition at line 257 of file SerRelayBoard.cpp.
SerRelayBoard::SerRelayBoard | ( | std::string | ComPort, |
int | ProtocolVersion = 1 |
||
) |
void SerRelayBoard::addGenericCANListeningId | ( | int | id | ) |
Definition at line 1372 of file SerRelayBoard.cpp.
void SerRelayBoard::convDataToSendMsg | ( | unsigned char | cMsg[] | ) | [protected] |
Type LCD = 20 char text: 1 byte command 16 byte data 20 byte LCD Text 11 bytes filled with zeros 2 bytes checksum -> 50 bytes
Type LCD = 60 char text: 1 byte command 16 byte data 60 byte LCD Text 2 bytes checksum -> 79 bytes
Definition at line 1448 of file SerRelayBoard.cpp.
void SerRelayBoard::convDataToSendMsgRelayBoard2 | ( | unsigned char | cMsg[] | ) | [protected] |
Definition at line 1846 of file SerRelayBoard.cpp.
bool SerRelayBoard::convRecMsgToData | ( | unsigned char | cMsg[] | ) | [protected] |
Definition at line 1549 of file SerRelayBoard.cpp.
bool SerRelayBoard::convRecMsgToDataRelayBoard2 | ( | unsigned char | cMsg[] | ) | [protected] |
Definition at line 1769 of file SerRelayBoard.cpp.
void SerRelayBoard::disable_logging | ( | ) |
Definition at line 1418 of file SerRelayBoard.cpp.
int SerRelayBoard::disableBrake | ( | int | iCanIdent, |
bool | bDisabled | ||
) |
Definition at line 715 of file SerRelayBoard.cpp.
void SerRelayBoard::enable_logging | ( | ) |
Definition at line 1413 of file SerRelayBoard.cpp.
int SerRelayBoard::evalRxBuffer | ( | ) |
Definition at line 269 of file SerRelayBoard.cpp.
int SerRelayBoard::evalRxBufferRelayBoard2 | ( | ) | [private] |
Definition at line 357 of file SerRelayBoard.cpp.
int SerRelayBoard::execHoming | ( | int | CanIdent | ) |
Definition at line 966 of file SerRelayBoard.cpp.
void SerRelayBoard::execMotion | ( | int | iGroupID | ) | [inline] |
Definition at line 95 of file SerRelayBoard.h.
void SerRelayBoard::getGenericCANMessages | ( | std::vector< CANTimedMessage > & | pMessages | ) |
Definition at line 1382 of file SerRelayBoard.cpp.
int SerRelayBoard::getGyroBoardAng | ( | double * | pdAngRad, |
double | dAcc[] | ||
) |
Definition at line 1294 of file SerRelayBoard.cpp.
int SerRelayBoard::getGyroBoardAngBoost | ( | double * | pdAngRad, |
boost::array< double, 3u > & | dAcc | ||
) |
Definition at line 1315 of file SerRelayBoard.cpp.
int SerRelayBoard::getGyroBoardDltAng | ( | double * | pdAng, |
double | dAcc[] | ||
) |
Definition at line 1339 of file SerRelayBoard.cpp.
int SerRelayBoard::getIOBoardAnalogIn | ( | int * | piAnalogIn | ) |
Definition at line 1137 of file SerRelayBoard.cpp.
Definition at line 1100 of file SerRelayBoard.cpp.
int SerRelayBoard::getIOBoardDigIn | ( | ) |
Definition at line 1106 of file SerRelayBoard.cpp.
int SerRelayBoard::getIOBoardDigOut | ( | ) |
Definition at line 1112 of file SerRelayBoard.cpp.
void SerRelayBoard::getIOBoardJoyValNorm | ( | double * | pdJoyXNorm, |
double * | pdJoyYNorm | ||
) |
Definition at line 1093 of file SerRelayBoard.cpp.
void SerRelayBoard::getIOBoardJoyValWheelMean | ( | double * | pdVelWheelLeftMean, |
double * | pdVelWheelRightMean | ||
) |
Definition at line 1086 of file SerRelayBoard.cpp.
int SerRelayBoard::getRadarBoardData | ( | double * | pdVelMMS | ) |
Definition at line 1352 of file SerRelayBoard.cpp.
int SerRelayBoard::getRelayBoardAnalogIn | ( | int * | piAnalogIn | ) |
Definition at line 1041 of file SerRelayBoard.cpp.
Definition at line 1056 of file SerRelayBoard.cpp.
Definition at line 976 of file SerRelayBoard.cpp.
void SerRelayBoard::getStatus | ( | int | iCanIdent, |
int * | piStatus, | ||
int * | piTempCel | ||
) |
Definition at line 941 of file SerRelayBoard.cpp.
void SerRelayBoard::getUSBoardAnalogIn | ( | int * | piAnalogIn | ) |
Definition at line 1259 of file SerRelayBoard.cpp.
int SerRelayBoard::getUSBoardData1To8 | ( | int * | piUSDistMM | ) |
Definition at line 1215 of file SerRelayBoard.cpp.
int SerRelayBoard::getUSBoardData9To16 | ( | int * | piUSDistMM | ) |
Definition at line 1237 of file SerRelayBoard.cpp.
int SerRelayBoard::getWheelDltPosVel | ( | int | iCanIdent, |
double * | pdDltAngWheelRad, | ||
double * | pdVelWheelRadS | ||
) |
Definition at line 889 of file SerRelayBoard.cpp.
int SerRelayBoard::getWheelPosVel | ( | int | iCanIdent, |
double * | pdAngWheelRad, | ||
double * | pdVelWheelRadS | ||
) |
Rotation directions are defined as follows: Positive wheel angle and velocity is set according to the right hand rule. The right hands thumb is aligned to the axis from motor to wheel.
Definition at line 856 of file SerRelayBoard.cpp.
bool SerRelayBoard::init | ( | ) |
Definition at line 488 of file SerRelayBoard.cpp.
bool SerRelayBoard::initPltf | ( | ) |
Definition at line 494 of file SerRelayBoard.cpp.
bool SerRelayBoard::initRelayBoard2 | ( | ) | [private] |
Definition at line 523 of file SerRelayBoard.cpp.
bool SerRelayBoard::isComError | ( | ) |
Definition at line 625 of file SerRelayBoard.cpp.
bool SerRelayBoard::isDriveError | ( | ) |
Definition at line 631 of file SerRelayBoard.cpp.
bool SerRelayBoard::isEMStop | ( | ) |
Definition at line 637 of file SerRelayBoard.cpp.
bool SerRelayBoard::isScannerStop | ( | ) |
Definition at line 650 of file SerRelayBoard.cpp.
void SerRelayBoard::log_to_file | ( | int | direction, |
unsigned char | cMsg[] | ||
) |
Definition at line 1423 of file SerRelayBoard.cpp.
void SerRelayBoard::readConfig | ( | int | iTypeLCD, |
std::string | pathToConf, | ||
std::string | sNumComPort, | ||
int | hasMotorRight, | ||
int | hasMotorLeft, | ||
int | hasMotorRearRight, | ||
int | hasMotorRearLeft, | ||
int | hasIOBoard, | ||
int | hasUSBoard, | ||
int | hasRadarBoard, | ||
int | hasGyroBoard, | ||
double | quickfix1, | ||
double | quickfix2, | ||
double | quickfix3, | ||
double | quickfix4, | ||
DriveParam | driveParamLeft, | ||
DriveParam | driveParamRight, | ||
DriveParam | driveParamRearLeft, | ||
DriveParam | driveParamRearRight | ||
) |
Definition at line 91 of file SerRelayBoard.cpp.
void SerRelayBoard::readConfiguration | ( | ) | [protected] |
Definition at line 263 of file SerRelayBoard.cpp.
void SerRelayBoard::removeGenericCANListeningId | ( | int | id | ) |
Definition at line 1377 of file SerRelayBoard.cpp.
void SerRelayBoard::requestDriveStatus | ( | ) |
Definition at line 850 of file SerRelayBoard.cpp.
void SerRelayBoard::requestGyroBoardData | ( | ) | [inline] |
Definition at line 148 of file SerRelayBoard.h.
Definition at line 1081 of file SerRelayBoard.cpp.
void SerRelayBoard::requestIOBoardData | ( | ) |
Definition at line 1076 of file SerRelayBoard.cpp.
void SerRelayBoard::requestIOBoardDigIn | ( | ) | [inline] |
Definition at line 128 of file SerRelayBoard.h.
int SerRelayBoard::requestMotPosVel | ( | int | iCanIdent | ) |
Definition at line 844 of file SerRelayBoard.cpp.
void SerRelayBoard::requestRadarBoardData | ( | ) |
Definition at line 1347 of file SerRelayBoard.cpp.
Definition at line 1254 of file SerRelayBoard.cpp.
Definition at line 1210 of file SerRelayBoard.cpp.
Definition at line 1232 of file SerRelayBoard.cpp.
bool SerRelayBoard::reset | ( | ) |
Definition at line 596 of file SerRelayBoard.cpp.
void SerRelayBoard::resetEMStop | ( | ) |
Definition at line 1407 of file SerRelayBoard.cpp.
bool SerRelayBoard::resetPltf | ( | ) |
Definition at line 601 of file SerRelayBoard.cpp.
void SerRelayBoard::rxCharArray | ( | ) | [protected] |
void SerRelayBoard::sendGenericCANMessage | ( | CanMsg & | message | ) |
Definition at line 1387 of file SerRelayBoard.cpp.
void SerRelayBoard::sendHeartbeat | ( | ) | [inline] |
Definition at line 97 of file SerRelayBoard.h.
void SerRelayBoard::sendNetStartCanOpen | ( | ) | [protected] |
Definition at line 663 of file SerRelayBoard.cpp.
int SerRelayBoard::sendRequest | ( | ) |
Definition at line 669 of file SerRelayBoard.cpp.
void SerRelayBoard::sendSynch | ( | ) | [inline] |
Definition at line 96 of file SerRelayBoard.h.
void SerRelayBoard::setEMStop | ( | ) |
Definition at line 1392 of file SerRelayBoard.cpp.
int SerRelayBoard::setIOBoardDigOut | ( | int | iChannel, |
bool | bVal | ||
) |
Definition at line 1118 of file SerRelayBoard.cpp.
int SerRelayBoard::setRelayBoardDigOut | ( | int | iChannel, |
bool | bOn | ||
) |
Definition at line 980 of file SerRelayBoard.cpp.
int SerRelayBoard::setWheelPosVel | ( | int | iCanIdent, |
double | dPos, | ||
double | dVel, | ||
bool | bQuickStop | ||
) |
Definition at line 838 of file SerRelayBoard.cpp.
int SerRelayBoard::setWheelVel | ( | int | iCanIdent, |
double | dVel, | ||
bool | bQuickStop | ||
) |
Definition at line 721 of file SerRelayBoard.cpp.
bool SerRelayBoard::shutdown | ( | ) |
Definition at line 611 of file SerRelayBoard.cpp.
bool SerRelayBoard::shutdownPltf | ( | ) |
Definition at line 617 of file SerRelayBoard.cpp.
int SerRelayBoard::startUS | ( | int | iChannelActive | ) |
Definition at line 1196 of file SerRelayBoard.cpp.
int SerRelayBoard::stopUS | ( | ) |
Definition at line 1203 of file SerRelayBoard.cpp.
void SerRelayBoard::txCharArray | ( | ) | [protected] |
void SerRelayBoard::writeIOBoardLCD | ( | int | iLine, |
int | iColumn, | ||
const std::string & | sText | ||
) |
Definition at line 1154 of file SerRelayBoard.cpp.
void SerRelayBoard::zeroGyro | ( | bool | bZeroActive | ) |
Definition at line 1281 of file SerRelayBoard.cpp.
bool SerRelayBoard::autoSendRequest [private] |
Definition at line 377 of file SerRelayBoard.h.
bool SerRelayBoard::logging [protected] |
Definition at line 255 of file SerRelayBoard.h.
bool SerRelayBoard::m_bComInit [protected] |
Definition at line 333 of file SerRelayBoard.h.
bool SerRelayBoard::m_bGyroBoardZeroGyro [protected] |
Definition at line 318 of file SerRelayBoard.h.
unsigned char SerRelayBoard::m_cDebugLeft[4] [protected] |
Definition at line 247 of file SerRelayBoard.h.
char SerRelayBoard::m_cDebugRearLeft[4] [protected] |
Definition at line 266 of file SerRelayBoard.h.
char SerRelayBoard::m_cDebugRearRight[4] [protected] |
Definition at line 262 of file SerRelayBoard.h.
unsigned char SerRelayBoard::m_cDebugRight[4] [protected] |
Definition at line 248 of file SerRelayBoard.h.
char SerRelayBoard::m_cSoftEMStop [protected] |
Definition at line 261 of file SerRelayBoard.h.
unsigned char SerRelayBoard::m_cTextDisplay[60] [protected] |
Definition at line 249 of file SerRelayBoard.h.
double SerRelayBoard::m_dLastPosLeft [protected] |
Definition at line 246 of file SerRelayBoard.h.
double SerRelayBoard::m_dLastPosRearLeft [protected] |
Definition at line 271 of file SerRelayBoard.h.
double SerRelayBoard::m_dLastPosRearRight [protected] |
Definition at line 270 of file SerRelayBoard.h.
double SerRelayBoard::m_dLastPosRight [protected] |
Definition at line 245 of file SerRelayBoard.h.
DriveParam SerRelayBoard::m_DriveParamLeft [protected] |
Definition at line 241 of file SerRelayBoard.h.
DriveParam SerRelayBoard::m_DriveParamRearLeft [protected] |
Definition at line 241 of file SerRelayBoard.h.
DriveParam SerRelayBoard::m_DriveParamRearRight [protected] |
Definition at line 241 of file SerRelayBoard.h.
DriveParam SerRelayBoard::m_DriveParamRight [protected] |
Definition at line 241 of file SerRelayBoard.h.
int SerRelayBoard::m_iChargeCurrent [protected] |
Definition at line 296 of file SerRelayBoard.h.
int SerRelayBoard::m_iChargeState [private] |
Definition at line 386 of file SerRelayBoard.h.
int SerRelayBoard::m_iCmdRelayBoard [protected] |
Definition at line 279 of file SerRelayBoard.h.
int SerRelayBoard::m_iConfigRelayBoard [protected] |
Definition at line 278 of file SerRelayBoard.h.
int SerRelayBoard::m_iConfigured [private] |
Definition at line 373 of file SerRelayBoard.h.
int SerRelayBoard::m_iFoundExtHardware [private] |
Definition at line 372 of file SerRelayBoard.h.
int SerRelayBoard::m_iFoundMotors [private] |
Definition at line 370 of file SerRelayBoard.h.
int SerRelayBoard::m_iGyroBoardAcc[3] [protected] |
Definition at line 320 of file SerRelayBoard.h.
int SerRelayBoard::m_iGyroBoardAng [protected] |
Definition at line 319 of file SerRelayBoard.h.
int SerRelayBoard::m_iGyroBoardStatus [protected] |
Definition at line 317 of file SerRelayBoard.h.
int SerRelayBoard::m_ihas_LCD_DATA [private] |
Definition at line 382 of file SerRelayBoard.h.
int SerRelayBoard::m_iHasIOBoard [private] |
Definition at line 383 of file SerRelayBoard.h.
int SerRelayBoard::m_ihasRelayData [private] |
Definition at line 381 of file SerRelayBoard.h.
int SerRelayBoard::m_iHasSpeakerData [private] |
Definition at line 385 of file SerRelayBoard.h.
int SerRelayBoard::m_iHasUSBoard [private] |
Definition at line 384 of file SerRelayBoard.h.
int SerRelayBoard::m_iHomedMotors [private] |
Definition at line 371 of file SerRelayBoard.h.
int SerRelayBoard::m_iIOBoardAnalogIn[8] [protected] |
Definition at line 306 of file SerRelayBoard.h.
int SerRelayBoard::m_iIOBoardBattVoltage [protected] |
Definition at line 303 of file SerRelayBoard.h.
int SerRelayBoard::m_iIOBoardDigIn [protected] |
Definition at line 305 of file SerRelayBoard.h.
int SerRelayBoard::m_iIOBoardDigOut [protected] |
Definition at line 282 of file SerRelayBoard.h.
int SerRelayBoard::m_iIOBoardStatus [protected] |
Definition at line 304 of file SerRelayBoard.h.
int SerRelayBoard::m_iMotLeftStatus [protected] |
Definition at line 310 of file SerRelayBoard.h.
int SerRelayBoard::m_iMotRearLeftStatus [protected] |
Definition at line 269 of file SerRelayBoard.h.
int SerRelayBoard::m_iMotRearRightStatus [protected] |
Definition at line 268 of file SerRelayBoard.h.
int SerRelayBoard::m_iMotRightStatus [protected] |
Definition at line 309 of file SerRelayBoard.h.
int SerRelayBoard::m_iNumBytesRec [private] |
Definition at line 374 of file SerRelayBoard.h.
int SerRelayBoard::m_iNumBytesSend [protected] |
Definition at line 251 of file SerRelayBoard.h.
int SerRelayBoard::m_iPosMeasMotLeftEnc [protected] |
Definition at line 313 of file SerRelayBoard.h.
int SerRelayBoard::m_iPosMeasMotRearLeftEnc [protected] |
Definition at line 265 of file SerRelayBoard.h.
int SerRelayBoard::m_iPosMeasMotRearRightEnc [protected] |
Definition at line 263 of file SerRelayBoard.h.
int SerRelayBoard::m_iPosMeasMotRightEnc [protected] |
Definition at line 311 of file SerRelayBoard.h.
int SerRelayBoard::m_iRadarBoardStatus [protected] |
Definition at line 323 of file SerRelayBoard.h.
int SerRelayBoard::m_iRadarBoardVel[4] [protected] |
Definition at line 324 of file SerRelayBoard.h.
int SerRelayBoard::m_iRelBoardBattVoltage [protected] |
Definition at line 297 of file SerRelayBoard.h.
int SerRelayBoard::m_iRelBoardIRSensor[4] [protected] |
Definition at line 299 of file SerRelayBoard.h.
int SerRelayBoard::m_iRelBoardKeyPad [protected] |
Definition at line 298 of file SerRelayBoard.h.
int SerRelayBoard::m_iRelBoardStatus [protected] |
Definition at line 295 of file SerRelayBoard.h.
int SerRelayBoard::m_iRelBoardTempSensor [protected] |
Definition at line 300 of file SerRelayBoard.h.
int SerRelayBoard::m_iTypeLCD [protected] |
Definition at line 252 of file SerRelayBoard.h.
int SerRelayBoard::m_iUSBoardAnalogData[4] [protected] |
Definition at line 329 of file SerRelayBoard.h.
int SerRelayBoard::m_iUSBoardSensorActive [protected] |
Definition at line 289 of file SerRelayBoard.h.
int SerRelayBoard::m_iUSBoardSensorData[16] [protected] |
Definition at line 328 of file SerRelayBoard.h.
int SerRelayBoard::m_iUSBoardStatus [protected] |
Definition at line 327 of file SerRelayBoard.h.
int SerRelayBoard::m_iVelCmdMotLeftEncS [protected] |
Definition at line 286 of file SerRelayBoard.h.
int SerRelayBoard::m_iVelCmdMotRearLeftEncS [protected] |
Definition at line 260 of file SerRelayBoard.h.
int SerRelayBoard::m_iVelCmdMotRearRightEncS [protected] |
Definition at line 259 of file SerRelayBoard.h.
int SerRelayBoard::m_iVelCmdMotRightEncS [protected] |
Definition at line 285 of file SerRelayBoard.h.
int SerRelayBoard::m_iVelMeasMotLeftEncS [protected] |
Definition at line 314 of file SerRelayBoard.h.
int SerRelayBoard::m_iVelMeasMotRearLeftEncS [protected] |
Definition at line 267 of file SerRelayBoard.h.
int SerRelayBoard::m_iVelMeasMotRearRightEncS [protected] |
Definition at line 264 of file SerRelayBoard.h.
int SerRelayBoard::m_iVelMeasMotRightEncS [protected] |
Definition at line 312 of file SerRelayBoard.h.
Mutex SerRelayBoard::m_Mutex [protected] |
Definition at line 243 of file SerRelayBoard.h.
SerialIO SerRelayBoard::m_SerIO [protected] |
Definition at line 331 of file SerRelayBoard.h.
std::string SerRelayBoard::m_sNumComPort [protected] |
Definition at line 239 of file SerRelayBoard.h.
int SerRelayBoard::protocol_version [protected] |
Definition at line 238 of file SerRelayBoard.h.
double SerRelayBoard::quickFix[4] [private] |
Definition at line 378 of file SerRelayBoard.h.