Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

universaljointaction.h

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
00002 
00003    this file is part of rcssserver3D
00004    Thu Jan 4 2006
00005    Copyright (C) 2006 RoboCup Soccer Server 3D Maintenance Group
00006 
00007    This program is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; version 2 of the License.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 */
00020 #ifndef UNIVERSALJOINTACTION_H
00021 #define UNIVERSALJOINTACTION_H
00022 
00023 #include <oxygen/gamecontrolserver/actionobject.h>
00024 
00025 class UniversalJointAction : public oxygen::ActionObject
00026 {
00027 public:
00028     UniversalJointAction(const std::string& predicate, float velocity1, float velocity2)
00029         : ActionObject(predicate), mVelocityAxis1(velocity1), mVelocityAxis2(velocity2) 
00030     {};
00031 
00032     virtual ~UniversalJointAction() {}
00033     
00034     float GetMotorVelocity(oxygen::Joint::EAxisIndex idx) 
00035     { 
00036         if (idx == oxygen::Joint::AI_FIRST) 
00037             return mVelocityAxis1; 
00038         else 
00039             return mVelocityAxis2;
00040     }
00041 
00042 protected:
00043     float mVelocityAxis1;
00044     float mVelocityAxis2;
00045 };
00046 
00047 #endif // UNIVERSALJOINTACTION_H

Generated on Thu Apr 6 15:25:40 2006 for rcssserver3d by  doxygen 1.4.4