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

 

         

ipathplanner2d.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
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 IPATHPLANNER2D_H
00011 #define IPATHPLANNER2D_H
00012 
00013 #include <hydropathplan/util.h>
00014 #include <gbxutilacfr/exceptions.h>
00015 
00016 namespace hydropathplan {
00017 
00021 class Exception : public gbxutilacfr::Exception
00022 {
00023 public:
00024     
00025     Exception( const char *file, const char *line, const std::string &message )
00026         : gbxutilacfr::Exception( file, line, message ) {}    
00027     virtual ~Exception() throw() {}
00028 
00030     void prependMsg( const char *file, const char *line, const std::string &msg )
00031         { message_ = gbxutilacfr::Exception::toMessageString(file,line,msg) + message_; }
00032 protected:
00033     std::string  message_;
00034 };
00035 
00036 class PathStartNotValidException : public Exception
00037 {
00038 public:
00039     PathStartNotValidException( const char *file, const char *line, const std::string &message )
00040         : Exception( file, line, std::string("PathStartNotValid: ")+message ) {}
00041 };
00042 
00043 class PathDestinationNotValidException : public Exception
00044 {
00045 public:
00046     PathDestinationNotValidException( const char *file, const char *line, const std::string &message )
00047         : Exception( file, line, std::string("PathDestinationNotValid: ")+message ) {}
00048 };
00049 
00050 class PathDestinationUnreachableException : public Exception
00051 {
00052 public:
00053     PathDestinationUnreachableException( const char *file, const char *line, const std::string &message )
00054         : Exception( file, line, std::string("PathDestinationUnreachable: ")+message ) {}
00055 };
00056 
00062 class IPathPlanner2d
00063 {
00064 
00065 public: 
00066 
00067     virtual ~IPathPlanner2d() {};
00068 
00069     //
00070     // Compute the path from 'start' to 'end'.
00071     // NOTE: Everything is done in cells (not world-coordinates).
00072     //
00073     // The computed path is not necessarily a set of contiguous cells.
00074     //
00075     // Warning: may throw 'hydropathplan::Exception's
00076     //
00077     virtual void computePath( int           startX,
00078                               int           startY,
00079                               int           endX,
00080                               int           endY,
00081                               Cell2DVector &path ) const = 0;
00082 
00083 private: 
00084 
00085 };
00086 
00087 }
00088 
00089 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5