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
|
vfh_algorithmconfig.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2006 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 VFHALGORITHMCONFIG_H 00011 #define VFHALGORITHMCONFIG_H 00012 00013 #include <string> 00014 #include <orcaice/context.h> 00015 #include <orca/vehicledescription.h> 00016 00017 namespace vfh { 00018 00019 // 00020 // Convenience structure to hold all the vfh_algorithm parameters. 00021 // All units are S.I. 00022 // 00023 class VfhAlgorithmConfig 00024 { 00025 public: 00026 00027 VfhAlgorithmConfig(); 00028 00029 // VFH's world is square, with sides of length (cell_size * worldWidthInCells), 00030 double cellSize; 00031 int gridWidthInCells; 00032 // VFH's polar histogram is split up into sectors 00033 double sectorAngle; 00034 // Radius of the assumed-circular robot 00035 double robotRadius; 00036 // safety_dist depends linearly on speed 00037 double safetyDist0ms; 00038 double safetyDist1ms; 00039 // Absolute max speed 00040 double maxSpeed; 00041 // Max speed through a narrow opening 00042 double maxSpeedNarrowOpening; 00043 // Max speed through a wide opening 00044 double maxSpeedWideOpening; 00045 double maxAcceleration; 00046 // Max turnrate is linearly related to speed 00047 double maxTurnrate0ms; 00048 double maxTurnrate1ms; 00049 // For safety, this sets a hard maximum. 00050 double absoluteMaxTurnrate; 00051 // Increase min_turning_radius a bit to handle side-slip 00052 double minTurnRadiusSafetyFactor; 00053 // free_space_cutoff is 'Binary_Hist_Low', and 00054 // obs_cutoff is 'Binary_Hist_High'. 00055 // 00056 // These are the thresholds that determine whether sectors are free or empty. 00057 // There are two because hysteresis thresholding is used. 00058 // The units are unclear. 00059 // 00060 // These also depend linearly on speed. 00061 double freeSpaceCutoff0ms; 00062 double obsCutoff0ms; 00063 double freeSpaceCutoff1ms; 00064 double obsCutoff1ms; 00065 // VFH has a bit of hysteresis in its actions that forces it to commit 00066 double weightDesiredDir; 00067 double weightCurrentDir; 00068 00069 // returns 0 if everything looks good. 00070 int checkSanity( std::string &warnings, std::string &errors ); 00071 }; 00072 00073 std::ostream &operator<<( std::ostream &s, const VfhAlgorithmConfig &c ); 00074 00075 void readFromProperties( orcaice::Context context, VfhAlgorithmConfig &c ); 00076 00077 // Throws char*'s if something is wrong 00078 // (eg configured values exceed vehicle's capabilities) 00079 void setFromVehicleDescr( const orca::VehicleDescription &descr, 00080 VfhAlgorithmConfig &c ); 00081 } 00082 00083 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)