LoRoombaCM.C File Reference

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

#include "Robots/LoBot/io/LoRoombaCM.H"
#include "Robots/LoBot/control/LoTurnArbiter.H"
#include "Robots/LoBot/config/LoConfigHelpers.H"
#include "Robots/LoBot/thread/LoShutdown.H"
#include "Robots/LoBot/thread/LoPause.H"
#include "Robots/LoBot/misc/LoExcept.H"
#include "Robots/LoBot/misc/singleton.hh"
#include "Robots/LoBot/util/LoMath.H"
#include "Robots/LoBot/util/LoBits.H"
#include "Robots/LoBot/util/LoTime.H"
#include "Robots/LoBot/irccm/LoOpenInterface.h"
#include "Util/log.H"
#include <algorithm>
#include <vector>
#include <utility>
#include <ctype.h>
Include dependency graph for LoRoombaCM.C:

Go to the source code of this file.

Classes

class  lobot::EatMap

Functions

static bool lobot::is_straight (int radius)
static void lobot::bogus_ack (char c)

Variables

static const unsigned int LOBOT_MAX_PENDING = 4

Detailed Description

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

Definition in file LoRoombaCM.C.


Variable Documentation

This setting specifies the serial port communication rate.

Definition at line 125 of file LoRoombaCM.C.

The robot's motors are controlled by sending commands over a serial port. This setting specifies the serial port device that should be used.

Definition at line 122 of file LoRoombaCM.C.

The Roomba platform is equipped with a pair of Sharp GP2D15 IR proximity detectors on its rear to help the robot avoid bumping into things as it backs up. However, these two sensors have to be explicitly turned on. This flag can be used to configure the rear bump sensors.

Definition at line 173 of file LoRoombaCM.C.

The iRobot Create/Roomba turns by using an appropriate turn radius. However, the higher layers of the Robolocust controller work in terms of a steering direction rather than a turn radius. Therefore, we have to somehow convert the high-level steering angles to corresponding low-level turn radii.

This conversion is rather ad hoc. We simply perform a linear interpolation on the magnitude of the turn angle, which would be in the range [0, T] (where T is the turn_max parameter specified in the turn_arbiter section), to get a number in the range [M, m], where m and M and are, respectively, the minimum and maximum turn radii we want.

The Create/Roomba supports turn radii of 0 to 2000mm. However, these min and max parameters should be smaller than the above range, i.e., min_turn_radius should be > zero and max_turn_radius should be < 2000.

Both parameters are specified in millimeters.

Definition at line 146 of file LoRoombaCM.C.

Users can configure Robolocust to print useful info such as current speed and heading every time the robot's sensorimotor system gets updated. By default, the Robolocust controller prints nothing. To enable this printing, switch on this flag.

Definition at line 194 of file LoRoombaCM.C.

When the Roomba platform's rear bump sensors are enabled, the robot will respond to rear bump events in one of two ways:

  • just stop the robot when either of the two rear bumpers is active
  • stop the robot, spin it in-place a small amount either clockwise or counterclockwise depending on which side the obstacle appears and then move it forward a little bit

By default, the low-level controller will respond to rear bump events by simply stopping the robot. However, this flag can be used to have the robot spin and move-up as well.

Definition at line 188 of file LoRoombaCM.C.

For the Roomba platform, we compute the robot's current speed by asking the Roomba how much distance it has covered since the previous update of the speed. We then divide this distance by the amount of time that elapsed since the previous update.

For the most part this computation works quite well, with the computed values being quite close to the actual/requested speed. However, there is enough jitteriness in these speed readings to warrant a simple low-pass filter to smooth out the kinks.

The above-mentioned low-pass filter is effected by using a weighted moving average. This setting specifies the number of previous readings that should be considered for computing this average.

NOTE: To turn the speed filter off, set this config value to one.

Definition at line 166 of file LoRoombaCM.C.

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