orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca PEOPLE Contributors Users Project Download Mailing lists
|
miscutils.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 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 00011 #ifndef ORCAOBJ_MISC_UTILITIES_H 00012 #define ORCAOBJ_MISC_UTILITIES_H 00013 00014 #include <orca/featuremap2d.h> 00015 #include <orca/localise2d.h> 00016 #include <orca/localise3d.h> 00017 #include <orca/ogmap.h> 00018 #include <orca/pathfollower2d.h> 00019 00020 #include <stdio.h> // for FILE on QNX 00021 00022 namespace orcaobj 00023 { 00028 00032 void normalise( orca::Localise2dData& obj ); 00033 00036 inline double calcAngleIncrement( double fieldOfView, int numReturns ) 00037 { return fieldOfView / double(numReturns-1); } 00038 00040 const orca::Pose2dHypothesis& mlHypothesis( const orca::Localise2dData& obj ); 00041 const orca::Pose3dHypothesis& mlHypothesis( const orca::Localise3dData& obj ); 00042 bool localisationIsUncertain( const orca::Localise2dData &localiseData, 00043 double linearThreshold = 5 ); 00044 00050 bool isSane( const orca::PathFollower2dData& pathData, std::string& reason ); 00051 00055 char displayOgmapCell(unsigned char cell); 00056 00058 inline unsigned char& gridCell( orca::OgMapData& obj, int indX, int indY ) 00059 { 00060 return obj.data[ indY*obj.numCellsX + indX ]; 00061 } 00062 00064 inline int gridCellIndex( const orca::OgMapData& obj, int indX, int indY ) 00065 { 00066 return indY*obj.numCellsX + indX; 00067 } 00068 00070 void saveToFile( const orca::FeatureMap2dData &fmap, FILE *f ); 00071 00073 void loadFromFile( const std::string &filename, orca::FeatureMap2dData &fmap ); 00074 00075 bool 00076 isPathSketchy( const orca::Path2d& path, std::string &sketchyReason ); 00077 00079 00080 } // namespace 00081 00082 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)