INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydrolibs/hydroogmap/ogmap.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp, George Mathews
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 #ifndef HYDROOGMAP_OGMAP_H
00011 #define HYDROOGMAP_OGMAP_H
00012 
00013 #include <hydroogmap/genericmap.h>
00014 #include <hydroportability/sharedlib.h>
00015 
00016 namespace hydroogmap {
00017 
00021     typedef GenericMap<unsigned char> OgMap;
00022 
00025     SOEXPORT const unsigned char CELL_EMPTY = 0;
00026 
00029     SOEXPORT const unsigned char CELL_UNKNOWN = 127;
00030 
00034     SOEXPORT const unsigned char CELL_OCCUPIED = 254;
00035 
00036     inline SOEXPORT bool isTraversable( unsigned char cellVal,
00037                                         int occupiedLowerBound=CELL_UNKNOWN )
00038     { return (cellVal < occupiedLowerBound); }
00039 
00040     inline SOEXPORT bool isWorldCellTraversable( const OgMap &ogMap,
00041                                                  double worldX,
00042                                                  double worldY,
00043                                                  int occupiedLowerBound=CELL_UNKNOWN )
00044     {
00045         unsigned char cellVal;
00046         if ( !ogMap.tryWorldCell( worldX, worldY, cellVal ) ) return false;
00047         return isTraversable( cellVal, occupiedLowerBound );
00048     }
00049 
00058     SOEXPORT void fuse( OgMap &master, const OgMap &update, unsigned char newCells=127 ); 
00059     
00063     SOEXPORT void overlay( OgMap &master, const OgMap &slave ); 
00064 
00066     SOEXPORT std::string toText( const OgMap &map );
00067 
00069     SOEXPORT char displayOgmapCell(unsigned char cell);
00070 
00071 }    
00072 
00073 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5