Encapsulation of Bayesian time-to-impact estimation using LGMD spike rates. More...
#include <Robots/LoBot/tti/LoTTIEstimator.H>
Public Member Functions | |
TTIEstimator (const LocustModel *) | |
void | copy_lgmd () |
void | update () |
void | compute_distance (const Vector &velocity) |
~TTIEstimator () | |
Clean-up. | |
float | lgmd () const |
Accessors. | |
float | actual_tti () const |
float | predicted_tti () const |
float | actual_distance () const |
float | predicted_distance () const |
float | distance () const |
float | confidence () const |
float | locust_direction () const |
Vector | direction () const |
range< int > | lrf_range () const |
Static Public Member Functions | |
static SensorModel & | looming_sensor_model () |
static SensorModel & | blanking_sensor_model () |
Encapsulation of Bayesian time-to-impact estimation using LGMD spike rates.
This class implements a time-to-impact (TTI) estimator for each (real or virtual) locust connected to the robot.
Since LGMD spikes are related to the TTI of approaching objects, we can use Bayesian state estimation to determine the TTI given the current spike rate. Combining this TTI with the motor system's velocity info allows us to compute the distance to obstacles for each locust direction, in effect, converting our array of visual collision detectors into a range sensor.
Definition at line 98 of file LoTTIEstimator.H.
lobot::TTIEstimator::TTIEstimator | ( | const LocustModel * | L | ) |
When instantiating a TTI estimator, client behaviours must specify the corresponding locust for which the estimator is to determine time-to-impact given LGMD spike rate.
Definition at line 288 of file LoTTIEstimator.C.
References lobot::SensorModel::column_size().
lobot::TTIEstimator::~TTIEstimator | ( | ) |
Clean-up.
Definition at line 723 of file LoTTIEstimator.C.
void lobot::TTIEstimator::compute_distance | ( | const Vector & | velocity | ) |
This method projects the supplied velocity vector (assumed to be the robot's current velocity) onto this TTI estimator's locust's direction vector and uses the latest estimate of the time-to-impact to compute a corresponding obstacle distance in that locust's direction.
Definition at line 458 of file LoTTIEstimator.C.
References magnitude(), and lobot::Drawable::viz_lock().
void lobot::TTIEstimator::copy_lgmd | ( | ) |
Before performing the TTI estimation, client behaviours must first copy the LGMD spike rates from the locusts into their corresponding estimators. This two-step approach is necessary to minimize the duration that client behaviours will hold on to the Robolocust update locks.
Definition at line 339 of file LoTTIEstimator.C.
References lobot::LocustModel::distance(), lobot::LocustModel::get_lgmd(), lobot::LocustModel::tti(), and lobot::Drawable::viz_lock().
float lobot::TTIEstimator::lgmd | ( | ) | const [inline] |
Accessors.
Definition at line 270 of file LoTTIEstimator.H.
SensorModel & lobot::TTIEstimator::looming_sensor_model | ( | ) | [static] |
In order for the whole Bayesian state estimation to work, we need a sensor model that supplies probability values for LGMD spike rates given times-to-impact, i.e., a table of P(lgmd|tti), the so-called causal data.
The LGMD spike rate is a function of an approaching object's time-to-impact. When the object is far away, the LGMD's spike rate will be fairly low. As it approaches, the LGMD starts firing very rapidly. Shortly before impact, the LGMD firing rate reaches a peak and then drops off sharply until impact.
The peak described above "partitions" the LGMD firing rate vs. time-to-impact curve into two distinct "phases." We refer to the first phase, wherein the curve rises to its peak, as LOOMING because the object is looming large in the LGMD's field of view. The second phase, we call BLANKING because feedforward inhibition kicks in after the peak to shutdown the LGMD right before impact.
To get the Bayesian time-to-impact estimation to work well, it would be best to use different causal likelihood profiles corresponding to each of these two "phases" described above. These two functions provide sensor models for the two different likelihood profiles.
Definition at line 273 of file LoTTIEstimator.C.
Referenced by update().
void lobot::TTIEstimator::update | ( | ) |
This method implements the recursive Bayesian state estimation update equations in order to determine the time-to-impact given an LGMD spike rate.
Definition at line 400 of file LoTTIEstimator.C.
References lobot::SensorModel::column_vector(), fill(), looming_sensor_model(), lobot::SensorModel::row_min(), transform(), and lobot::Drawable::viz_lock().