LoLGMDExtricateTTI.C File Reference

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

#include "Robots/LoBot/control/LoLGMDExtricateTTI.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/config/LoConfigHelpers.H"
#include "Robots/LoBot/thread/LoUpdateLock.H"
#include "Robots/LoBot/misc/LoExcept.H"
#include "Robots/LoBot/misc/LoRegistry.H"
#include "Robots/LoBot/misc/singleton.hh"
#include "Robots/LoBot/util/LoGL.H"
#include "Robots/LoBot/util/LoMath.H"
#include <GL/gl.h>
#include <iomanip>
#include <sstream>
#include <algorithm>
#include <limits>
Include dependency graph for LoLGMDExtricateTTI.C:

Go to the source code of this file.

Functions

static void lobot::log_tti_predictions (float speed, const TTIEstimator *E)
static std::string lobot::mag (char label, const Vector &v)

Detailed Description

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

Definition in file LoLGMDExtricateTTI.C.


Variable Documentation

float m_att_amp

In some situations, it can be useful to amplify the magnitudes of the attractive and repulsive force vectors. These two settings specify the values for the amplification factors. Numbers greater then one will amplify the vectors; numbers between 0 and 1 will reduce the magnitudes of the force vectors; negative numbers will negate the directions of the force vectors.

Definition at line 124 of file LoLGMDExtricateTTI.C.

int m_count

To prevent this behaviour from becoming overly sensitive, we require the distance estimates corresponding to some minimum number of locusts to fall below the above threshold before the behaviour engages its extrication algorithm.

This setting specifies the minimum number of distance estimates that must fall below the distance threshold before extrication will occur. It should be a reasonable number <= the number of locusts actually present.

Definition at line 115 of file LoLGMDExtricateTTI.C.

Referenced by xsens::List< T >::deleteAndRemove(), xsens::List< T >::freeAndRemove(), xsens::List< T >::get(), xsens::List< T >::operator[](), xsens::List< T >::remove(), xsens::List< T >::removeTail(), and xsens::List< T >::swap().

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 165 of file LoLGMDExtricateTTI.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 155 of file LoLGMDExtricateTTI.C.

When the robot is backing up due to an extrication command, the LGMD's fire a small amount. Often, the lgmd_extricate_tti behaviour construes this as further actionable input and issues yet more back-up commands, which can result in extended periods of reverse driving. These are entirely spurious extrications and should not occur. This setting helps with the above-mentioned problem by specifying a threshold speed (in m/s) that must be met before lgmd_extricate_tti will kick in (or interfere).

By setting this to a small positive quantity such as 0.05 or 0.1, we can ensure that lgmd_extricate_tti remains passive when the robot is backing up (wherein it will report a negative speed). To disable this threshold check, simply use a negative number with a magnitude larger than the robot's top speed (e.g., -10).

NOTE: Using a large positive number for this setting (e.g., 10) will result in effectively disabling the lgmd_extricate_tti behaviour. In fact, setting this configuration value to something greater than the robot's average cruising speed will pretty much disable the behaviour. An easier way to do that is to simply not include it in the config file's list of active behaviours. That way, it won't uselessly consume CPU and RAM. Therefore, it would be best to stick to a value such as 0.05 or 0.1m/s.

Definition at line 149 of file LoLGMDExtricateTTI.C.

Normally, this behaviour will only log an entry stating that it made a steering decision. However, with this flag, we can make it also log the states of each of its time-to-impact estimators.

Definition at line 179 of file LoLGMDExtricateTTI.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 174 of file LoLGMDExtricateTTI.C.

float m_threshold

In order to build a virtual force field made up of repulsive as well as attractive forces, we use the distance estimates plus a threshold. When a distance estimate is below this threshold it will result in a repulsive force along the direction in which that locust is looking. Conversely, when a distance estimate exceeds the same threshold, it will cause an attractive force in that locust's direction. The sum of all these force vectors will result in a vector that can be used to drive and steer the robot away from obstacles.

This setting specifies the value of the above-mentioned threshold in millimeters.

Definition at line 104 of file LoLGMDExtricateTTI.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 187 of file LoLGMDExtricateTTI.C.

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