|
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
|
setpoint.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 #ifndef SEGWAYRMP_SETPOINT_H 00011 #define SEGWAYRMP_SETPOINT_H 00012 00013 #include <gbxsickacfr/gbxiceutilacfr/timer.h> 00014 00015 namespace segwayrmp { 00016 00017 // 00018 // @brief Represents a speed set-point, for managin acceleration limits 00019 // 00020 // @author Alex Brooks 00021 // 00022 class SetPoint 00023 { 00024 00025 public: 00026 00027 SetPoint( double maxForwardAcceleration, 00028 double maxReverseAcceleration ); 00029 00030 // This needs to be called every time around the driving loop, 00031 // So we know the call frequency. 00032 void evaluateDt(); 00033 00034 // Set the set-point 00035 void set( double speed ); 00036 00037 // Returns: the speed we should send to the robot right now. 00038 // Sets setPointReached to true if future calls (in the absence of a new set() call) will 00039 // return the same currentSpeed. 00040 double currentCmdSpeed( bool &setPointReached ); 00041 00042 private: 00043 00044 double dt_; 00045 00046 double maxForwardAcceleration_; 00047 double maxReverseAcceleration_; 00048 00049 double setPoint_; 00050 double currentCmdSpeed_; 00051 00052 gbxiceutilacfr::Timer timer_; 00053 }; 00054 00055 } 00056 00057 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5