![]() |
Laelaps
2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
|
Range sensor group class. More...
#include <laeVL6180.h>
Public Member Functions | |
LaeRangeSensorGroup (laelaps::LaeI2C &i2cBus) | |
Default constructor. More... | |
~LaeRangeSensorGroup () | |
Destructor. | |
virtual void | blacklist () |
Black list range sensor group from robot sensors. | |
virtual void | whitelist () |
White list range sensor group from robot sensors. | |
virtual bool | isBlackListed () |
Test if range sensor group is black listed. More... | |
int | setInterface (uint_t uProdHwVer) |
Set the interface, given the Laelaps hardware version. More... | |
void | clearSensedData () |
Clear sensed data. | |
virtual int | getInterfaceVersion (uint_t &uVerMajor, uint_t &uVerMinor, uint_t &uFwVer) |
Get interface version. More... | |
virtual int | configure (const laelaps::LaeDesc &desc) |
Configure sensor group from product description. More... | |
virtual int | configure (const laelaps::LaeTunes &tunes) |
Configure sensor group from tuning parameters. More... | |
virtual int | reload (const laelaps::LaeTunes &tunes) |
Reload configuration tuning parameters. More... | |
virtual int | getSensorProps (const std::string &strKey, std::string &strRadiationType, double &fFoV, double &fBeamDir, double &fMin, double &fMax) |
Get range sensor properties. More... | |
virtual int | readSensorIdentity (const std::string &strKey, VL6180xIdentification &ident) |
Read sensor's identification. More... | |
virtual int | readSensorTunes (const std::string &strKey, uint_t &uRangeOffset, uint_t &uRangeCrossTalk, double &fAlsGain, uint_t &uAlsIntPeriod) |
Read sensor's current tuning parameters. More... | |
virtual int | getRange (const std::string &strKey, double &fRange) |
Get the shadowed range measurement. More... | |
virtual int | getRange (std::vector< std::string > &vecNames, std::vector< double > &vecRanges) |
Get all shadowed sensor range measurements. More... | |
virtual int | getAmbientLight (const std::string &strKey, double &fAmbient) |
Get the shadowed ambient light illuminance measurement. More... | |
virtual int | getAmbientLight (std::vector< std::string > &vecNames, std::vector< double > &vecAmbient) |
Get all shadowed sensor ambient light illuminance measurements. More... | |
virtual void | exec () |
Execute task in one cycle to take measurements. More... | |
Protected Attributes | |
laelaps::LaeI2C & | m_i2cBus |
bound I2C bus instance | |
LaeRangeInterface * | m_interface |
the interface | |
bool | m_bBlackListed |
sensor group [not] black listed. | |
Range sensor group class.
Laelaps sensor hardware had major changes between v2.0 and v2.1.
Definition at line 1535 of file laeVL6180.h.
LaeRangeSensorGroup::LaeRangeSensorGroup | ( | laelaps::LaeI2C & | i2cBus | ) |
Default constructor.
i2cBus | I2C interface. |
Definition at line 2340 of file laeVL6180.cxx.
References m_bBlackListed, and m_interface.
|
virtual |
Configure sensor group from product description.
desc | Product description. |
Definition at line 2401 of file laeVL6180.cxx.
References sensor::vl6180::LaeRangeInterface::configure(), isBlackListed(), and m_interface.
Referenced by laelaps::LaeRobot::configForOperation().
|
virtual |
Configure sensor group from tuning parameters.
tunes | Tuning parameters. |
Definition at line 2413 of file laeVL6180.cxx.
References sensor::vl6180::LaeRangeInterface::configure(), isBlackListed(), and m_interface.
|
virtual |
Execute task in one cycle to take measurements.
Definition at line 2513 of file laeVL6180.cxx.
References sensor::vl6180::LaeRangeInterface::exec(), isBlackListed(), and m_interface.
Referenced by laelaps::LaeThreadRange::exec().
|
virtual |
Get the shadowed ambient light illuminance measurement.
The exec() call pulls the measured sensed from the actual sensors.
strKey | Sensor's unique name (key). | |
[out] | fAmbient | Sensed ambient light (lux). |
Referenced by laelaps::LaeRobot::getRangeSensorProps(), and readSensorTunes().
|
virtual |
Get all shadowed sensor ambient light illuminance measurements.
The exec() call pulls the measured sensed from the actual sensors.
strKey | Sensor's unique name (key). | |
[out] | vecAmbient | Vector of associated sensor measured ambients (lux). |
|
virtual |
Get interface version.
[out] | uVerMajor | Interface version major number. |
[out] | uVerMinor | Interface version minor number. |
[out] | uFwVer | Firmware version. |
Definition at line 2393 of file laeVL6180.cxx.
References sensor::vl6180::LaeRangeInterface::getInterfaceVersion(), and m_interface.
Referenced by laelaps::LaeRobot::connSensors().
|
virtual |
Get the shadowed range measurement.
The exec() call pulls the measured sensed from the actual sensors.
strKey | Sensor's unique name (key). | |
[out] | fRange | Sensed object range (meters). |
Referenced by laelaps::LaeRobot::getRangeSensorProps(), and readSensorTunes().
|
virtual |
Get all shadowed sensor range measurements.
The exec() call pulls the measured sensed from the actual sensors.
[out] | vecNames | Vector of sensor unique names. |
[out] | vecRanges | Vector of associated sensor measured ranges (meters). |
|
virtual |
Get range sensor properties.
strKey | Sensor's unique name id (key). | |
[out] | strRadiationType | Radiation type. |
[out] | fFoV | Field of View (radians). |
[out] | fBeamdir | Center of beam direction (radians). |
[out] | fMin | Minimum range (meters). |
[out] | fMax | Maximum range (meters). |
Definition at line 2437 of file laeVL6180.cxx.
References sensor::vl6180::LaeRangeInterface::getSensorProps(), and m_interface.
Referenced by laelaps::LaeRobot::getRangeSensorProps().
|
inlinevirtual |
Test if range sensor group is black listed.
Definition at line 1565 of file laeVL6180.h.
Referenced by configure(), exec(), readSensorIdentity(), readSensorTunes(), and reload().
|
virtual |
Read sensor's identification.
strKey | Sensor's unique name id (key). | |
[out] | ident | Identification structure. |
Definition at line 2451 of file laeVL6180.cxx.
References isBlackListed(), m_interface, and sensor::vl6180::LaeRangeInterface::readSensorIdentity().
|
virtual |
Read sensor's current tuning parameters.
strKey | Sensor's unique name id (key). | |
[out] | uRangeOffset | ToF sensor part-to-part offset. |
[out] | uRangeCrossTalk | ToF sensor cross-talk compensation. |
[out] | fAlsGain | Ambient light sensor analog gain. |
[out] | uAlsIntPeriod | Ambient light sensor integration period (msec). |
Definition at line 2466 of file laeVL6180.cxx.
References sensor::vl6180::LaeRangeInterface::getAmbientLight(), getAmbientLight(), sensor::vl6180::LaeRangeInterface::getRange(), getRange(), isBlackListed(), m_interface, and sensor::vl6180::LaeRangeInterface::readSensorTunes().
|
virtual |
Reload configuration tuning parameters.
tunes | Tuning parameters. |
Definition at line 2425 of file laeVL6180.cxx.
References isBlackListed(), m_interface, and sensor::vl6180::LaeRangeInterface::reload().
Referenced by laelaps::LaeThreadRange::reload().
int LaeRangeSensorGroup::setInterface | ( | uint_t | uProdHwVer | ) |
Set the interface, given the Laelaps hardware version.
Definition at line 2368 of file laeVL6180.cxx.
References LAE_VERSION, m_i2cBus, and m_interface.
Referenced by laelaps::LaeRobot::connSensors().