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
|
odometrybaseddriver.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 Alex Brooks 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 ODOMETRY_BASED_DRIVER_H 00011 #define ODOMETRY_BASED_DRIVER_H 00012 00013 #include "driver.h" 00014 #include <orcaice/context.h> 00015 #include "simpledriver.h" 00016 #include <orcaifaceimpl/storingconsumers.h> 00017 #include <hydronavutil/offset.h> 00018 #include <hydronavutil/odometrydifferentiator.h> 00019 00020 namespace gps2localise2d { 00021 00022 // 00023 // @brief Assumes that the GPS unit works out heading by differentiating. 00024 // 00025 // Works out heading uncertainty based on this assumption, plus the odometric velocity 00026 // of the platform. 00027 // 00028 // @author Alex Brooks 00029 // 00030 class OdometryBasedDriver : public Driver 00031 { 00032 00033 public: 00034 00035 OdometryBasedDriver( const orca::GpsDescription &descr, const orcaice::Context &context ); 00036 ~OdometryBasedDriver(); 00037 00038 // Converts the GPS info into localise2d format. 00039 // Returns 'false' if the conversion can't be done (eg because GPS doesn't have a fix). 00040 bool compute( const orca::GpsData &gpsData, orca::Localise2dData &localiseData ); 00041 00042 private: 00043 00044 bool setup(); 00045 double calcHeadingUncertainty( hydronavutil::Pose &delta, 00046 double dt ); 00047 00048 SimpleDriver simpleDriver_; 00049 orcaifaceimpl::StoringOdometry2dConsumerImplPtr odomConsumer_; 00050 bool isSetup_; 00051 00052 hydronavutil::OdometryDifferentiator odometryDifferentiator_; 00053 00054 orca::Time prevTime_; 00055 00056 double minHeadingUncertainty_; 00057 double linSpeedThreshold_; 00058 double rotFactor_; 00059 double linFactor_; 00060 00061 orcaice::Context context_; 00062 00063 }; 00064 00065 } 00066 00067 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)