![]() |
Laelaps
2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
|
The Laelaps namespace encapsulates all Laelaps related constructs. More...
Classes | |
class | Dim |
Object width x height x length dimensions class. More... | |
struct | LaeAlarmInfo |
Alarm information state structure. More... | |
class | LaeAlarms |
Alarm class. More... | |
class | LaeAsyncJob |
Asynchronous job base class. More... | |
class | LaeAux5VOutEnable |
Laelaps top deck auxilliary regulated 5V power out enable class. More... | |
class | LaeAuxBattOutEnable |
Laelaps top deck auxilliary battery power out enable class. More... | |
class | LaeBattery |
Battery Management and System Energy Monitoring (BMSEM) Class. More... | |
struct | LaeDb |
Simple real-time database structure. More... | |
struct | LaeDbAlarms |
System and subsystem alarms and warnings data tree. More... | |
struct | LaeDbConfig |
Robot configuration parameters. More... | |
struct | LaeDbEnable |
Enabled subsytems. More... | |
struct | LaeDbEnergy |
Energy monitoring data. More... | |
struct | LaeDbImu |
IMU sensor data. More... | |
struct | LaeDbKin |
Kinodynamics data. More... | |
struct | LaeDbKinPowertrain |
Powertrain kinodynamics data. More... | |
struct | LaeDbKinRobot |
Robot platform kinodynamics data. More... | |
struct | LaeDbMotorCtlr |
Motor controller data. More... | |
struct | LaeDbProduct |
Product data. More... | |
struct | LaeDbRange |
Range sensor data. More... | |
struct | LaeDbRobotStatus |
Robot top-level status. More... | |
class | LaeDesc |
Laelaps robotic mobile platform full description class. More... | |
class | LaeDescBase |
Robotic base platform description. More... | |
class | LaeDescBattery |
Battery description. More... | |
class | LaeDescImu |
Robotic built-in IMU description. More... | |
class | LaeDescOptions |
Package options class. More... | |
class | LaeDescPowertrain |
Robotic powertrain description. More... | |
class | LaeDescRangeSensor |
Range sensor description. More... | |
class | LaeGpio |
Laelaps Odroid GPIO base class. More... | |
class | LaeI2C |
class | LaeI2CMux |
control register mask More... | |
class | LaeI2CMuxReset |
Laelaps I2C multiplexer reset class. More... | |
class | LaeKinAction |
Laelaps kinematics base action class. More... | |
class | LaeKinActionDutyCycle |
Laelaps kinematics duty cycle action class. More... | |
class | LaeKinActionTwist |
Laelaps kinematics velocity action class. More... | |
class | LaeKinActionVelocity |
Laelaps kinematics velocity action class. More... | |
class | LaeKinematics |
Laelaps kinematics class. More... | |
class | LaeMotorCtlrChipSelect |
RoboClaw motor controller chip select class. More... | |
class | LaeMotorCtlrEnable |
Laelaps motor controller power enable class. More... | |
class | LaeMotorCtlrState |
Robot base motor controller board state. More... | |
class | LaePath |
Robot path class. More... | |
class | LaePathFeedback |
Simple path feedback class. More... | |
class | LaePlatform |
Robot platform control and state data class. More... | |
class | LaePoint |
Laelaps 2D point class. More... | |
class | LaePose |
Laelaps 2D pose class. More... | |
class | LaePowertrain |
Powertrain data class. More... | |
class | LaePowertrainAttr |
Powertrain attributes class. More... | |
class | LaePowertrainState |
Powertrain state data class. More... | |
class | LaeRobot |
Laelaps robotic manipulator plus accesories class. More... | |
class | LaeRptDynamics |
Laelaps dynamics report. More... | |
class | LaeRptDynPowertrain |
Powertrain dynamics subreport. More... | |
class | LaeRptMotorCtlrHealth |
Robot motor health. More... | |
class | LaeRptMotorHealth |
Robot motor health. More... | |
class | LaeRptRobotStatus |
Robot global status report. More... | |
class | LaeSimplePath |
Robot simple path class. More... | |
class | LaeSimplePathFeedback |
Simple path feedback class. More... | |
class | LaeSimpleWaypoint |
Robot simple path waypoint. More... | |
class | LaeThread |
class | LaeThreadAsync |
class | LaeThreadImu |
class | LaeThreadKin |
class | LaeThreadRange |
class | LaeThreadWd |
class | LaeTunes |
Laelaps tuning data class. More... | |
class | LaeTunesBattery |
Laelaps battery tuning data class. More... | |
class | LaeTunesPowertrain |
Laelaps powertrain tuning data class. More... | |
class | LaeTunesVL6180 |
Laelaps powertrain tuning data class. More... | |
class | LaeWatchDogReset |
Laelaps watchdog sub-processor reset class. More... | |
class | LaeWaypoint |
Robot fully-defined waypoint. More... | |
class | LaeWd |
class | LaeXmlCfg |
LaeXmlCfg Laelaps XML configuration class. More... | |
class | LaeXmlTune |
LaeXmlTune Laelaps XML tuning class. More... | |
Functions | |
int | i2cTryOpen (LaeI2C &i2cBus, uint_t addr) |
Try to open a series of I2C devices to fine the required endpoint. More... | |
uint_t | strToVersion (const std::string &str) |
Convert version dotted string to integer equivalent. More... | |
const char * | getStrError (const int ecode) |
Get the error string describing the Laelaps error code. More... | |
const char * | boolstr (bool b) |
Boolean to string. More... | |
double | degToRad (double d) |
Convert degrees to radians. More... | |
double | radToDeg (double r) |
Convert radians to degrees. More... | |
int | iabs (int a) |
Integer absolute value. More... | |
double | fcap (double a, double min, double max) |
Cap value within limits [min, max]. More... | |
int | cap (int a, int min, int max) |
Cap value within limits [min, max]. More... | |
uint_t | cap (uint_t a, uint_t min, uint_t max) |
Cap value within limits [min, max]. More... | |
double | signof (double a) |
Sign of a. More... | |
int | signof (int a) |
Sign of a. More... | |
bool | operator< (const struct timeval &lhs, const struct timeval &rhs) |
Less than compare operator. More... | |
bool | operator== (const struct timeval &lhs, const struct timeval &rhs) |
Equality compare operator. More... | |
bool | operator> (const struct timeval &lhs, const struct timeval &rhs) |
Greater than compare operator. More... | |
bool | operator<= (const struct timeval &lhs, const struct timeval &rhs) |
Less than or equal to compare operator. More... | |
bool | operator>= (const struct timeval &lhs, const struct timeval &rhs) |
Greater than or equal to compare operator. More... | |
struct timeval | operator+ (const struct timeval &op1, const struct timeval &op2) |
Addition operator. More... | |
struct timeval | operator- (const struct timeval &op1, const struct timeval &op2) |
Subtraction operator. More... | |
long | dt_usec (struct timeval &t1, struct timeval &t0) |
Calculate delta time in microseconds. More... | |
double | dt (struct timeval &t1, struct timeval &t0) |
Calculate delta time. More... | |
bool | operator< (const struct timespec &lhs, const struct timespec &rhs) |
Less than compare operator. More... | |
bool | operator== (const struct timespec &lhs, const struct timespec &rhs) |
Equality compare operator. More... | |
bool | operator> (const struct timespec &lhs, const struct timespec &rhs) |
Greater than compare operator. More... | |
bool | operator<= (const struct timespec &lhs, const struct timespec &rhs) |
Less than or equal to compare operator. More... | |
bool | operator>= (const struct timespec &lhs, const struct timespec &rhs) |
Greater than or equal to compare operator. More... | |
struct timespec | operator+ (const struct timespec &op1, const struct timespec &op2) |
Addition operator. More... | |
struct timespec | operator- (const struct timespec &op1, const struct timespec &op2) |
Subtraction operator. More... | |
long long | dt_nsec (struct timespec &t1, struct timespec &t0) |
Calculate delta time in nanoseconds. More... | |
double | dt (struct timespec &t1, struct timespec &t0) |
Calculate delta time. More... | |
std::string | getRealDeviceName (const std::string &strDevName) |
Get real device name. More... | |
std::vector< std::string > & | split (const std::string &s, char delim, std::vector< std::string > &elems) |
Split string at the delimiter character. More... | |
std::vector< std::string > | split (const std::string &s, char delim) |
Split string at the delimiter character. More... | |
The Laelaps namespace encapsulates all Laelaps related constructs.
< use to delete old code
The Laelaps namespace encapsulates all Laelaps related constructs.
|
inline |
Boolean to string.
b | Boolean value. |
Definition at line 107 of file laeUtils.h.
|
inline |
Cap value within limits [min, max].
a | Value. |
min | Minimum. |
max | Maximum. |
Definition at line 176 of file laeUtils.h.
Referenced by motor::roboclaw::RoboClaw::cmdQDriveWithProfileToPos(), sensor::vl6180::LaeRangeMuxSubproc::cmdTuneAls(), sensor::vl6180::LaeRangeMuxSubproc::cmdTuneToFSensor(), laelaps::LaeThread::createThread(), and sensor::vl6180::LaeVL6180Mux::tune().
|
inline |
Cap value within limits [min, max].
a | Value. |
min | Minimum. |
max | Maximum. |
Definition at line 190 of file laeUtils.h.
|
inline |
Convert degrees to radians.
d | Degrees. |
Definition at line 124 of file laeUtils.h.
References M_TAU.
Referenced by sensor::imu::LaeImuCleanFlight::convertRawToSI(), sensor::vl6180::LaeVL6180Mux::getFoV(), sensor::vl6180::LaeVL6180SensorInfo::getProps(), laelaps::LaeTunes::LaeTunes(), and laelaps::LaeXmlTune::setGlobalTrajTunes().
double laelaps::dt | ( | struct timeval & | t1, |
struct timeval & | t0 | ||
) |
Calculate delta time.
t1 - t0
t1 | Time 1. |
t0 | Time 0. |
double laelaps::dt | ( | struct timespec & | t1, |
struct timespec & | t0 | ||
) |
Calculate delta time.
t1 - t0
t1 | Time 1. |
t0 | Time 0. |
long long laelaps::dt_nsec | ( | struct timespec & | t1, |
struct timespec & | t0 | ||
) |
Calculate delta time in nanoseconds.
t1 - t0, t1 ≥ t0
t1 | Later time. |
t0 | Earlier time. |
long laelaps::dt_usec | ( | struct timeval & | t1, |
struct timeval & | t0 | ||
) |
Calculate delta time in microseconds.
t1 - t0, t1 ≥ t0
t1 | Later time. |
t0 | Earlier time. |
|
inline |
Cap value within limits [min, max].
a | Value. |
min | Minimum. |
max | Maximum. |
Definition at line 162 of file laeUtils.h.
Referenced by motor::roboclaw::RoboClaw::cmdReadLogicCutoffs(), motor::roboclaw::RoboClaw::cmdReadMainBattCutoffs(), laelaps::LaeRobot::setGovernor(), laelaps::LaeThread::setHz(), and laelaps::LaePowertrain::updateStateDynamics().
std::string laelaps::getRealDeviceName | ( | const std::string & | strDevName | ) |
Get real device name.
If the given device name is a symbolic link, then the real device the link references is returned. Otherwise the given device name is returned.
strDevName | Given device name. |
Referenced by laelaps::LaeI2C::open(), laelaps::LaeKinematics::open(), and sensor::imu::LaeImu::open().
const char* laelaps::getStrError | ( | const int | ecode | ) |
Get the error string describing the Laelaps error code.
The absolute value of the error code is taken prior retrieving the string. An unknown or out-of-range error code will be mapped to LAE_ECODE_BADEC.
ecode | Instance of Laelaps Error Codes. |
int laelaps::i2cTryOpen | ( | LaeI2C & | i2cBus, |
uint_t | addr | ||
) |
Try to open a series of I2C devices to fine the required endpoint.
If the enpoint does not exist, the device is closed and the next device is tried.
On success, the device bus is left open.
i2cBus | The I2C bus. |
addr | Endpoint I2C device's 7/10-bit address. |
Definition at line 67 of file laeI2C.cxx.
References laelaps::LaeI2C::check(), laelaps::LaeI2C::close(), and laelaps::LaeI2C::open().
Referenced by laelaps::LaeRobot::connect(), and laelaps::LaeI2C::unlock().
|
inline |
Integer absolute value.
a | Integer value. |
Definition at line 148 of file laeUtils.h.
struct timeval laelaps::operator+ | ( | const struct timeval & | op1, |
const struct timeval & | op2 | ||
) |
Addition operator.
op1 + op2
op1 | Left hand side time. |
op2 | Right hand side time. |
struct timespec laelaps::operator+ | ( | const struct timespec & | op1, |
const struct timespec & | op2 | ||
) |
Addition operator.
op1 + op2
op1 | Left hand side time. |
op2 | Right hand side time. |
struct timeval laelaps::operator- | ( | const struct timeval & | op1, |
const struct timeval & | op2 | ||
) |
Subtraction operator.
op1 - op2, op1 ≥ op2.
op1 | Left hand side time. |
op2 | Right hand side time. |
struct timespec laelaps::operator- | ( | const struct timespec & | op1, |
const struct timespec & | op2 | ||
) |
Subtraction operator.
op1 - op2, op1 ≥ op2.
op1 | Left hand side time. |
op2 | Right hand side time. |
bool laelaps::operator< | ( | const struct timeval & | lhs, |
const struct timeval & | rhs | ||
) |
Less than compare operator.
Compare if the left hand side time is earlier than the right hand side time.
lhs < rhs
lhs | Left hand side time. |
rhs | Right hand side time. |
bool laelaps::operator< | ( | const struct timespec & | lhs, |
const struct timespec & | rhs | ||
) |
Less than compare operator.
Compare if the left hand side time is earlier than the right hand side time.
lhs < rhs
lhs | Left hand side time. |
rhs | Right hand side time. |
bool laelaps::operator<= | ( | const struct timeval & | lhs, |
const struct timeval & | rhs | ||
) |
Less than or equal to compare operator.
Compare if the left hand side time is equal or earlier than the right hand side time.
lhs ≤ rhs
lhs | Left hand side time. |
rhs | Right hand side time. |
bool laelaps::operator<= | ( | const struct timespec & | lhs, |
const struct timespec & | rhs | ||
) |
Less than or equal to compare operator.
Compare if the left hand side time is equal or earlier than the right hand side time.
lhs ≤ rhs
lhs | Left hand side time. |
rhs | Right hand side time. |
bool laelaps::operator== | ( | const struct timeval & | lhs, |
const struct timeval & | rhs | ||
) |
Equality compare operator.
Compare if the two times are equal.
lhs == rhs
lhs | Left hand side time. |
rhs | Right hand side time. |
bool laelaps::operator== | ( | const struct timespec & | lhs, |
const struct timespec & | rhs | ||
) |
Equality compare operator.
Compare if the two times are equal.
lhs == rhs
lhs | Left hand side time. |
rhs | Right hand side time. |
bool laelaps::operator> | ( | const struct timeval & | lhs, |
const struct timeval & | rhs | ||
) |
Greater than compare operator.
Compare if the left hand side time is later than the right hand side time.
lhs > rhs
lhs | Left hand side time. |
rhs | Right hand side time. |
bool laelaps::operator> | ( | const struct timespec & | lhs, |
const struct timespec & | rhs | ||
) |
Greater than compare operator.
Compare if the left hand side time is later than the right hand side time.
lhs > rhs
lhs | Left hand side time. |
rhs | Right hand side time. |
bool laelaps::operator>= | ( | const struct timeval & | lhs, |
const struct timeval & | rhs | ||
) |
Greater than or equal to compare operator.
Compare if the left hand side time is equal or later than the right hand side time.
lhs ≥ rhs
lhs | Left hand side time. |
rhs | Right hand side time. |
bool laelaps::operator>= | ( | const struct timespec & | lhs, |
const struct timespec & | rhs | ||
) |
Greater than or equal to compare operator.
Compare if the left hand side time is equal or later than the right hand side time.
lhs ≥ rhs
lhs | Left hand side time. |
rhs | Right hand side time. |
|
inline |
Convert radians to degrees.
r | Radians. |
Definition at line 136 of file laeUtils.h.
References M_TAU.
Referenced by sensor::vl6180::LaeRangeMuxSubproc::configure(), laelaps::LaeDescRangeSensor::makeDesc(), laelaps::LaeDescRangeSensor::print(), laelaps::LaeTunes::print(), and laelaps::LaeKinActionTwist::update().
|
inline |
|
inline |
std::vector<std::string>& laelaps::split | ( | const std::string & | s, |
char | delim, | ||
std::vector< std::string > & | elems | ||
) |
Split string at the delimiter character.
s | String to split. | |
delem | Delimiter character. | |
[out] | elems | Vector of split strings. |
Referenced by laelaps::LaeXmlCfg::load(), and laelaps::LaeXmlTune::load().
std::vector<std::string> laelaps::split | ( | const std::string & | s, |
char | delim | ||
) |
Split string at the delimiter character.
s | String to split. |
delem | Delimiter character. |
uint_t laelaps::strToVersion | ( | const std::string & | str | ) |
Convert version dotted string to integer equivalent.
str | Dotted version string "M[.m[.R]]". |
Referenced by laelaps::LaeXmlCfg::setBaseDesc(), and laelaps::LaeDesc::setVersion().