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

 

         

speedsetpoint.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 #ifndef HYDRORMPUTIL_SPEEDSETPOINT_H
00011 #define HYDRORMPUTIL_SPEEDSETPOINT_H
00012 
00013 #include <gbxsickacfr/gbxiceutilacfr/timer.h>
00014 
00015 namespace hydrormputil {
00016 
00017 //
00018 // @brief Represents a speed set-point, for managing acceleration limits
00019 //
00020 // @author Alex Brooks
00021 //
00022 class SpeedSetPoint
00023 {
00024 
00025 public: 
00026 
00027     SpeedSetPoint( 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 setPointAlreadyReached to true if we're already at the set point
00039     //   (i.e. in the absence of a new set() call, we're
00040     //     returning the same currentSpeed as last time).
00041     double currentCmdSpeed( bool &setPointAlreadyReached );
00042     
00043 private: 
00044 
00045     double dt_;
00046 
00047     double maxForwardAcceleration_;
00048     double maxReverseAcceleration_;
00049 
00050     double setPoint_;
00051     double currentCmdSpeed_;
00052 
00053     gbxiceutilacfr::Timer timer_;
00054 };
00055 
00056 }
00057 
00058 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5