lobot::Map Class Reference

An application-wide obstacle map. More...

#include <Robots/LoBot/slam/LoMap.H>

Inheritance diagram for lobot::Map:
Inheritance graph
[legend]
Collaboration diagram for lobot::Map:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Map ()
 Initialization: creates an empty map.
void add_pose_hook (const PoseHook &)
void update (const OccGrid &)
void update (const Pose &)
 This method updates the pose.
Pose current_pose () const
 This method returns the robot's current pose w.r.t. to the map.
std::vector< unsigned char > submap (int w) const



typedef void(* PoseCB )(const Pose &, unsigned long client_data)
typedef std::pair< PoseCB,
unsigned long > 
PoseHook

Detailed Description

An application-wide obstacle map.

This class implements an occupancy grid that is used to keep track of where obstacles are. The occupancy grid's cells hold probability values rather than simple 0/1 flags to indicate the absence or presence of an obstacle. The probabilities are bytes in the [0,255] range rather than floats in the [0,1] range. Furthermore, high values indicate free space while low ones denote the presence of obstacles.

In addition to holding the occupancy map, this class also keeps track of the robot's current pose, which is specified using an (x, y, theta) triple.

Definition at line 92 of file LoMap.H.


Member Typedef Documentation

typedef void(* lobot::Map::PoseCB)(const Pose &, unsigned long client_data)

Many behaviours/modules may be interested in hearing about pose updates. Therefore, the map maintains a list of callback functions to inform interested parties about pose updates.

NOTE: Clients should take care that the pose update hooks not perform lengthy operations so as to not hold up the thread that originated the pose update.

Definition at line 117 of file LoMap.H.


Constructor & Destructor Documentation

Map::Map (  ) 

Initialization: creates an empty map.

Definition at line 180 of file LoMap.C.

References lobot::Drawable::border_color(), lobot::Drawable::m_border, lobot::Drawable::m_border_color, and lobot::SlamParams::map_width().


Member Function Documentation

void Map::add_pose_hook ( const PoseHook &  H  ) 

This method allows clients to add pose update hooks so they can be informed when the robot's pose gets updated.

Definition at line 192 of file LoMap.C.

Pose Map::current_pose (  )  const

This method returns the robot's current pose w.r.t. to the map.

Definition at line 256 of file LoMap.C.

Referenced by submap().

std::vector< unsigned char > Map::submap ( int  w  )  const

This method returns a square subportion of the occupancy map centered at the robot's current position. The size of the submap will 2*w+1, where w is supplied by the client.

Definition at line 263 of file LoMap.C.

References current_pose(), lobot::SlamParams::map_width(), lobot::Pose::x(), and Y.

void Map::update ( const Pose p  ) 

This method updates the pose.

Definition at line 231 of file LoMap.C.

void Map::update ( const OccGrid g  ) 

This method updates this map object using the data from the supplied log-odds occupancy grid.

Definition at line 218 of file LoMap.C.

References lobot::OccGrid::begin(), and transform().


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