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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

components/segwayrmp/mainthread.h

00001 /*
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 <orcaifaceimpl/odometry2d.h>
00016 #include <orcaifaceimpl/odometry3d.h>
00017 #include <orcaifaceimpl/power.h>
00018 #include <orcaifaceimpl/velocitycontrol2d.h>
00019 #include <orcaifaceimpl/estop.h>
00020 #include <orcaestoputil/estopmonitor.h>
00021 #include <hydrormputil/powerbasemanager.h>
00022 #include "publisherthread.h"
00023 #include <hydrodll/dynamicload.h>
00024 
00025 namespace segwayrmp
00026 {
00027 
00028 class MainThread : public orcaice::SubsystemThread,
00029                    public hydrormputil::AggregatorCallback,
00030                    public orcaifaceimpl::AbstractVelocityControl2dCallback,
00031                    public gbxiceutilacfr::NotifyHandler<orca::EStopData>
00032 {
00033 public:
00034 
00035     MainThread( const orcaice::Context &context );
00036     ~MainThread();
00037 
00038 private:
00039 
00040     // from SubsystemThread
00041     virtual void initialise();
00042     // this subsystem maintain a work thread after initialisation!
00043     virtual void finalise();
00044 
00045     // from orcaifaceimpl::AbstractVelocityControl2dCallback
00046     // this call originates in orcaifaceimpl::VelocityControl2dImpl
00047     virtual void setCommand( const orca::VelocityControl2dData &incomingCommand );
00048 
00049     // from NotifyHandler<orca::EStopData>
00050     virtual void handleData( const orca::EStopData &incomingEStopData );
00051 
00052     // from hydrormputil::AggregatorCallback
00053     void hardwareInitialised( int powerbaseID );
00054     void receiveData( int                                     powerbaseID,
00055                       const hydrointerfaces::SegwayRmp::Data &data );
00056 
00057     void instantiateHydroDriver( const std::string &driverLibName );
00058 
00059     // external interfaces
00060     orcaifaceimpl::Odometry2dImplPtr           odometry2dI_;
00061     orcaifaceimpl::Odometry3dImplPtr           odometry3dI_;
00062     orcaifaceimpl::PowerImplPtr                powerI_;
00063     orcaifaceimpl::VelocityControl2dImplPtr    velocityControl2dI_;
00064 
00065     // required interfaces
00066     orcaifaceimpl::NotifyingEStopConsumerImplPtr eStopConsumerI_;
00067 
00068     std::auto_ptr<orcaestoputil::EStopMonitor> eStopMonitor_;
00069 
00070     hydrointerfaces::SegwayRmp::Capabilities capabilities_;
00071 
00072     PublisherThread *publisherThread_;
00073     gbxiceutilacfr::ThreadPtr publisherThreadPtr_;
00074     
00075     std::auto_ptr<hydrodll::DynamicallyLoadedLibrary> hydroDriverLib_;
00076 
00077     std::vector<hydrormputil::PowerbaseManagerPtr> powerbaseManagers_;
00078 
00079     orcaice::Context context_;
00080 };
00081 
00082 } // namespace
00083 
00084 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5