ControlledIF.h
Go to the documentation of this file.00001 /* ============================================================ 00002 * 00003 * This file is a part of RCI project 00004 * 00005 * Copyright (C) 2011 by Arne Nordmann <anordman at cor-lab dot uni-bielefeld dot de> 00006 * 00007 * This file may be licensed under the terms of the 00008 * GNU Lesser General Public License Version 3 (the ``LGPL''), 00009 * or (at your option) any later version. 00010 * 00011 * Software distributed under the License is distributed 00012 * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either 00013 * express or implied. See the LGPL for the specific language 00014 * governing rights and limitations. 00015 * 00016 * You should have received a copy of the LGPL along with this 00017 * program. If not, go to http://www.gnu.org/licenses/lgpl.html 00018 * or write to the Free Software Foundation, Inc., 00019 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00020 * 00021 * The development of this software was supported by: 00022 * CoR-Lab, Research Institute for Cognition and Robotics 00023 * Bielefeld University 00024 * 00025 * ============================================================ */ 00026 00027 #pragma once 00028 00029 #include <iostream> 00030 00031 #include "rci/ControlMode.h" 00032 #include "rci/dto/JointAngles.h" 00033 #include "rci/dto/JointTorques.h" 00034 #include "rci/dto/JointImpedance.h" 00035 #include "rci/dto/JointVelocities.h" 00036 #include "rci/dto/Pressure.h" 00037 #include "rci/dto/Length.h" 00038 #include "rci/dto/CartesianPose.h" 00039 00040 namespace rci { 00041 00042 class ControlledIF { 00043 00044 public: 00050 virtual bool isConverged() const = 0; 00051 00057 virtual ControlModePtr getControlMode() =0; 00058 00064 virtual void setControlMode(ControlModePtr controlMode) =0; 00065 00066 protected: 00067 ~ControlledIF() { 00068 } 00069 }; 00070 00076 class PositionControlledIF { 00077 00078 public: 00084 virtual bool setJointPosition(JointAnglesPtr position) = 0; 00085 00091 virtual JointAnglesPtr getLastPositionCommand() const =0; 00092 00093 protected: 00094 ~PositionControlledIF() { 00095 } 00096 }; 00097 00103 class VelocityControlledIF { 00104 00105 public: 00111 virtual bool setJointVelocity(JointVelocitiesPtr velocity) = 0; 00112 00118 virtual JointVelocitiesPtr getLastVelocityCommand() const =0; 00119 00120 protected: 00121 ~VelocityControlledIF() { 00122 } 00123 00124 }; 00125 00131 class TorqueControlledIF { 00132 00133 public: 00139 virtual bool setJointTorque(JointTorquesPtr position) = 0; 00140 00146 virtual JointTorquesPtr getLastTorqueCommand() const =0; 00147 00148 protected: 00149 ~TorqueControlledIF() { 00150 } 00151 }; 00152 00158 class ImpedanceControlledIF { 00159 00160 public: 00166 virtual bool setJointImpedance(JointImpedancePtr impedance) = 0; 00167 00173 virtual JointImpedancePtr getLastImpedanceCommand() const =0; 00174 00175 protected: 00176 ~ImpedanceControlledIF() { 00177 } 00178 }; 00179 00185 class PressureControlledIF { 00186 00187 public: 00193 virtual bool setPressure(PressurePtr pressure) = 0; 00194 00200 virtual PressurePtr getLastPressureCommand() const =0; 00201 00202 protected: 00203 ~PressureControlledIF() { 00204 } 00205 }; 00206 00212 class LengthControlledIF { 00213 00214 public: 00220 virtual bool setLength(LengthPtr Length) = 0; 00221 00227 virtual LengthPtr getLastLengthCommand() const =0; 00228 00229 protected: 00230 ~LengthControlledIF() { 00231 } 00232 }; 00233 00239 class PoseControlledIF { 00240 00241 public: 00247 virtual bool setPose(PosePtr pose) = 0; 00248 00254 virtual PosePtr getLastPoseCommand() const =0; 00255 00256 protected: 00257 ~PoseControlledIF() { 00258 } 00259 }; 00260 00261 }
Generated on Thu Aug 2 14:02:47 2012 for RCI by 1.6.3