LoLGMDExtricateSimple.C File Reference

This file defines the non-inline member functions of the lobot::LGMDExtricateSimple class. More...

#include "Robots/LoBot/control/LoLGMDExtricateSimple.H"
#include "Robots/LoBot/control/LoMetrics.H"
#include "Robots/LoBot/control/LoTurnArbiter.H"
#include "Robots/LoBot/control/LoSpinArbiter.H"
#include "Robots/LoBot/control/LoSpeedArbiter.H"
#include "Robots/LoBot/LoApp.H"
#include "Robots/LoBot/slam/LoMap.H"
#include "Robots/LoBot/lgmd/LocustModel.H"
#include "Robots/LoBot/config/LoConfigHelpers.H"
#include "Robots/LoBot/thread/LoUpdateLock.H"
#include "Robots/LoBot/misc/LoRegistry.H"
#include "Robots/LoBot/util/LoGL.H"
#include "Robots/LoBot/misc/LoVector.H"
#include "Robots/LoBot/util/LoMath.H"
#include "Robots/LoBot/util/LoSTL.H"
#include "Robots/LoBot/misc/singleton.hh"
#include "Robots/LoBot/util/range.hh"
#include <GL/gl.h>
#include <boost/bind.hpp>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <vector>
#include <iterator>
#include <utility>
Include dependency graph for LoLGMDExtricateSimple.C:

Go to the source code of this file.

Functions

static std::pair< float, float > lobot::get_locust_data (const LocustModel *L)
static bool lobot::dir_cmp (const std::pair< float, float > &a, const std::pair< float, float > &b)
static bool lobot::lgmd_cmp (const std::pair< float, float > &a, const std::pair< float, float > &b)

Detailed Description

This file defines the non-inline member functions of the lobot::LGMDExtricateSimple class.

Definition in file LoLGMDExtricateSimple.C.


Variable Documentation

In case the RPM sensor is configured to be off, we will need to specify the extricate "speed" in terms of PWM values as well.

NOTE: All speed related behaviours should specify both a speed in m/s and a PWM value.

CAUTION: For the extricate behaviour, it would be unwise to make the extrication PWM too high.

Definition at line 145 of file LoLGMDExtricateSimple.C.

Users may specify what speed they would like the extrication to occur.

CAUTION: It would be unwise to make this speed too high.

Definition at line 135 of file LoLGMDExtricateSimple.C.

Usually, steering control is effected using the turn arbiter, which veers the robot in different directions while it moves, i.e., smooth car-like turns. However, the lgmd_extricate_tti behaviour also supports spin-style steering, i.e., momentarily stopping the robot and then turning it cw/ccw in-place. This flag turns on spin-style steering. By default, the behaviour uses the normal car-like steering mode.

Definition at line 154 of file LoLGMDExtricateSimple.C.

float m_threshold

If this extricate behaviour were to spin the robot in each and every iteration, it might make the robot zigzag about excessively. Therefore, we have the behaviour check the total range of LGMD spike rates, i.e., max - min, and act only when this range crosses a threshold, i.e., when the range of spiking activity has a significant differential in it. If the range is lower than the above-mentioned threshold, it means all the locusts are experiencing a similar level of spiking and so extrication would simply result in erratic, noisy behaviour.

This setting specifies the minimum range across all the LGMD readings that we expect to see before the simple, reactive LGMD-based extrication will kick in. It should be a positive floating point number. Its units are Hertz.

Definition at line 114 of file LoLGMDExtricateSimple.C.

The number of milliseconds between successive iterations of this behaviour.

WARNING: The ability to change a behaviour's update frequency is a very powerful feature whose misuse or abuse can wreak havoc! Be sure to use reasonable values for this setting.

Definition at line 162 of file LoLGMDExtricateSimple.C.

float m_window

Once the above range threshold has been crossed, the behaviour can simply spin the robot towards the direction corresponding to minimal activity. However, there might be several readings that are the same or reasonably close to the minimum. In this situation, we would like to spin the robot by the least amount.

The following setting specifies the maximum spike rate starting at the minimum that we consider "reasonably low." This extricate behaviour then looks at all the "reasonably low" LGMD readings and chooses the one that will result in the minimum amount of spin.

The value of this setting should be a floating point number expressed in Hertz.

Definition at line 129 of file LoLGMDExtricateSimple.C.

Referenced by lobot::MainWindow::push_back().

Generated on Sun May 8 08:42:49 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3