|
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
|
segwayrmp/netthread.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 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 NETWORK_HANDLER_H 00012 #define NETWORK_HANDLER_H 00013 00014 #include <orcaice/subsystemthread.h> 00015 #include <orcaice/context.h> 00016 00017 #include <orcaifaceimpl/odometry2d.h> 00018 #include <orcaifaceimpl/odometry3d.h> 00019 #include <orcaifaceimpl/power.h> 00020 #include <orcaifaceimpl/velocitycontrol2d.h> 00021 #include <orcaifaceimpl/estop.h> 00022 #include "hwthread.h" 00023 00024 namespace segwayrmp 00025 { 00026 00027 class NetThread : public orcaice::SubsystemThread, 00028 public gbxiceutilacfr::NotifyHandler<orca::VelocityControl2dData> 00029 { 00030 public: 00031 00032 NetThread( HwThread &hwMainThread, 00033 const orca::VehicleDescription &descr, 00034 const orcaice::Context &context ); 00035 00036 private: 00037 00038 // from SubsystemThread 00039 virtual void initialise(); 00040 virtual void work(); 00041 00042 // from NotifyHandler 00043 // this call originates in orcaifaceimpl::VelocityControl2dImpl 00044 virtual void handleData(const orca::VelocityControl2dData &incomingCommand); 00045 00046 void initEStopCallback(); 00047 00048 // external interfaces 00049 orcaifaceimpl::Odometry2dImplPtr odometry2dI_; 00050 orcaifaceimpl::Odometry3dImplPtr odometry3dI_; 00051 orcaifaceimpl::PowerImplPtr powerI_; 00052 orcaifaceimpl::VelocityControl2dImplPtr velocityControl2dI_; 00053 00054 // we need this reference to call a couple of get/set functions 00055 HwThread &hwThread_; 00056 00057 orca::VehicleDescription descr_; 00058 bool isEStopEnabled_; 00059 00060 double maxForwardSpeed_; 00061 double maxReverseSpeed_; 00062 double maxTurnrate_; 00063 double maxLateralAcceleration_; 00064 00065 // component context 00066 orcaice::Context context_; 00067 }; 00068 00069 } // namespace 00070 00071 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5