|
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/odometry2d.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 &gpsDescr, 00036 const orca::VehicleDescription &vehicleDescr, 00037 const orcaice::Context &context ); 00038 00039 // Converts the GPS info into localise2d format. 00040 // Returns 'false' if the conversion can't be done (eg because GPS doesn't have a fix). 00041 bool compute( const orca::GpsData &gpsData, orca::Localise2dData &localiseData ); 00042 00043 private: 00044 00045 bool setup(); 00046 double calcHeadingUncertainty( hydronavutil::Pose &delta, 00047 double dt ); 00048 00049 SimpleDriver simpleDriver_; 00050 orcaifaceimpl::StoringOdometry2dConsumerImplPtr odomConsumer_; 00051 bool isSetup_; 00052 00053 hydronavutil::OdometryDifferentiator odometryDifferentiator_; 00054 00055 orca::Time prevTime_; 00056 00057 double minHeadingUncertainty_; 00058 double linSpeedThreshold_; 00059 double rotFactor_; 00060 double linFactor_; 00061 00062 orcaice::Context context_; 00063 00064 }; 00065 00066 } 00067 00068 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5