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 Project Download Mailing lists
|
components/pathplanner/mainthread.h00001 /* 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 00011 #ifndef MAIN_THREAD_H 00012 #define MAIN_THREAD_H 00013 00014 #include <orcaice/subsystemthread.h> 00015 #include <orcaice/context.h> 00016 #include <gbxsickacfr/gbxiceutilacfr/buffer.h> 00017 #include <hydrodll/dynamicload.h> 00018 00019 #include <hydropathplan/hydropathplan.h> 00020 #include <memory> 00021 #include "driver.h" 00022 #include "pathplanner2dI.h" 00023 00024 namespace pathplanner 00025 { 00026 00027 class MainThread : public orcaice::SubsystemThread 00028 { 00029 00030 public: 00031 00032 MainThread( const orcaice::Context & context ); 00033 00034 private: 00035 00036 // from SubsystemThread 00037 virtual void initialise(); 00038 virtual void work(); 00039 00040 void initRequiredInterfaces(); 00041 void initProvidedInterfaces(); 00042 void initDriver(); 00043 00044 // The library that contains the driver factory (must be declared first so it's destructed last!!!) 00045 std::auto_ptr<hydrodll::DynamicallyLoadedLibrary> driverLib_; 00046 // Generic hydro driver 00047 std::auto_ptr<hydrointerfaces::PathPlanner2d> hydroDriver_; 00048 00049 // Configuration for the hydro driver 00050 std::auto_ptr<hydrointerfaces::PathPlanner2d::Config> hydroDriverConfig_; 00051 // Storage for the graphics publisher 00052 std::auto_ptr<hydrointerfaces::PathPlanner2d::QGraphics2dPublisher> graphicsPublisher_; 00053 00054 // wraps the hydro driver 00055 std::auto_ptr<Driver> driver_; 00056 00057 // we have to keep the ogmap as member variable, 00058 // otherwise they get out of scope if we pass references around 00059 hydroogmap::OgMap ogMap_; 00060 00061 PathPlanner2dI* pathPlannerI_; 00062 gbxiceutilacfr::Buffer<orca::PathPlanner2dTask> pathPlannerTaskBuffer_; 00063 00064 orcaice::Context context_; 00065 00066 // cost of traversing cells (only used for skeleton variants) 00067 std::auto_ptr<hydropathplan::CostEvaluator> costEvaluator_; 00068 }; 00069 00070 } // namespace 00071 00072 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)