Sensing.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 "SensingIF.h" 00030 00031 namespace rci { 00032 00036 class Sensing: public SensingIF { 00037 00038 public: 00039 00045 virtual void update(); 00046 00053 virtual cca::DataTransferObjectPtr get() const; 00054 00055 protected: 00056 Sensing(); 00057 virtual ~Sensing(); 00058 }; 00059 00064 class PositionSensing: public PositionSensingIF { 00065 00066 public: 00070 virtual JointAnglesPtr getJointPosition() const; 00071 00075 virtual void updateJointPosition(JointAnglesPtr angle); 00076 00077 protected: 00078 PositionSensing(unsigned int dimension = 1); 00079 virtual ~PositionSensing(); 00080 00084 JointAnglesPtr _latestJointPosition; 00085 }; 00086 00091 class VelocitySensing: public VelocitySensingIF { 00092 00093 public: 00097 virtual JointVelocitiesPtr getVelocity() const; 00098 00102 virtual void updateJointVelocity(JointVelocitiesPtr vel); 00103 00104 protected: 00105 VelocitySensing(unsigned int dimension = 1); 00106 virtual ~VelocitySensing(); 00107 00111 JointVelocitiesPtr _latestJointVelocity; 00112 }; 00113 00118 class PressureSensing: public PressureSensingIF { 00119 00120 public: 00124 virtual PressurePtr getPressure() const; 00125 00126 protected: 00127 PressureSensing(unsigned int dimension = 1); 00128 virtual ~PressureSensing(); 00129 00133 PressurePtr _latestPressureValues; 00134 }; 00135 00140 class LengthSensing: public LengthSensingIF { 00141 00142 public: 00146 virtual LengthPtr getLength() const; 00147 00148 protected: 00149 LengthSensing(unsigned int dimension = 1); 00150 virtual ~LengthSensing(); 00151 00155 LengthPtr _latestLengthValues; 00156 }; 00157 00162 class ForceSensing: public ForceSensingIF { 00163 00164 public: 00170 virtual ForcesPtr getForces() const; 00171 00175 virtual void updateForces(ForcesPtr force); 00176 00177 protected: 00178 ForceSensing(); 00179 virtual ~ForceSensing(); 00180 00184 ForcesPtr forces; 00185 }; 00186 00191 class TorqueSensing: public TorqueSensingIF { 00192 00193 public: 00199 virtual JointTorquesPtr getTorque() const; 00200 00204 virtual void updateTorque(JointTorquesPtr torque); 00205 00206 protected: 00207 TorqueSensing(unsigned int dimension = 1); 00208 virtual ~TorqueSensing(); 00209 00213 JointTorquesPtr torques; 00214 }; 00215 00220 class PowerSensing: public PowerSensingIF { 00221 00222 public: 00228 virtual PowerPtr getPower() const; 00229 00230 protected: 00231 PowerSensing(unsigned int dimension = 1); 00232 virtual ~PowerSensing(); 00233 00237 PowerPtr power; 00238 }; 00239 00240 }
Generated on Thu Aug 2 14:02:49 2012 for RCI by 1.6.3