lobot::LaserRangeFinder Class Reference

Encapsulation of liburg API for interfacing with Hokuyo laser range finders. More...

#include <Robots/LoBot/io/LoLaserRangeFinder.H>

List of all members.

Public Member Functions

 LaserRangeFinder (const std::string &device="/dev/ttyACM0", int baud_rate=115200)
 Initialization.
void update ()
 Retrieve distance data from the laser range finder.
int get_distance (int angle) const
Image< int > get_distances () const
 Retrieve the entire set of distances.
 ~LaserRangeFinder ()
 Clean-up.

float average_distance (int min, int max) const
float average_distance (const range< int > &angles) const

int max_reading (int min, int max) const
int max_reading (const range< int > &angles) const
int max_reading () const

range< int > get_distance_range () const
 What is the device's distance measurement range?
int min_distance () const
int max_distance () const

range< int > get_angular_range () const
 Retrieve the device's angular range.
int min_angle () const
int max_angle () const

Detailed Description

Encapsulation of liburg API for interfacing with Hokuyo laser range finders.

This class provides a higher-level abstraction over liburg's plain C API for retrieving distance measurements from lobot's Hokuyo laser range finder. It takes care of the low-level details of correctly invoking the liburg API and allows clients to query for distance along a particular direction.

Definition at line 93 of file LoLaserRangeFinder.H.


Constructor & Destructor Documentation

lobot::LaserRangeFinder::LaserRangeFinder ( const std::string device = "/dev/ttyACM0",
int  baud_rate = 115200 
)

Initialization.

Definition at line 152 of file LoLaserRangeFinder.C.

lobot::LaserRangeFinder::~LaserRangeFinder (  ) 

Clean-up.

Definition at line 167 of file LoLaserRangeFinder.C.


Member Function Documentation

float lobot::LaserRangeFinder::average_distance ( int  min,
int  max 
) const

A convenience routine for returning the average distance for a range of angles.

Definition at line 163 of file LoLaserRangeFinder.C.

Referenced by lobot::InputSource::average_distance().

range<int> lobot::LaserRangeFinder::get_angular_range (  )  const [inline]

Retrieve the device's angular range.

Definition at line 157 of file LoLaserRangeFinder.H.

Referenced by lobot::InputSource::lrf_angular_range().

int lobot::LaserRangeFinder::get_distance ( int  angle  )  const

What is the distance measurement (in mm) along the specified direction (in degrees)? A negative value is returned if the angle is out of range. Zero degrees corresponds to the front of the device. Directions to the left are positive angles and those to the right are negative.

Definition at line 161 of file LoLaserRangeFinder.C.

Referenced by lobot::InputSource::get_distance().

range<int> lobot::LaserRangeFinder::get_distance_range (  )  const [inline]

What is the device's distance measurement range?

Definition at line 150 of file LoLaserRangeFinder.H.

Referenced by lobot::LaserViz::LaserViz().

Image< int > lobot::LaserRangeFinder::get_distances (  )  const

Retrieve the entire set of distances.

Definition at line 162 of file LoLaserRangeFinder.C.

Referenced by BeoLRF::evolve(), and lobot::LRFData::LRFData().

int lobot::LaserRangeFinder::max_reading ( int  min,
int  max 
) const

A convenience routine for returning the maximum distance reading for a given range of angles.

Definition at line 164 of file LoLaserRangeFinder.C.

void lobot::LaserRangeFinder::update (  ) 

Retrieve distance data from the laser range finder.

Definition at line 160 of file LoLaserRangeFinder.C.

Referenced by BeoLRF::evolve(), and lobot::App::run().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:30:38 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3