Controlled.cpp
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 #include "rci/Controlled.h" 00028 00029 namespace rci { 00030 00031 ControlModePtr Controlled::getControlMode() { 00032 return this->_controlMode; 00033 } 00034 00035 void Controlled::setControlMode(ControlModePtr controlMode) { 00036 this->_controlMode = controlMode; 00037 } 00038 00039 Controlled::Controlled() : 00040 _controlMode() { 00041 } 00042 00043 Controlled::~Controlled() { 00044 } 00045 00046 bool PositionControlled::setJointPosition(JointAnglesPtr position) { 00047 _lastCommandedPosition = position; 00048 return true; 00049 } 00050 00051 JointAnglesPtr PositionControlled::getLastPositionCommand() const { 00052 return this->_lastCommandedPosition; 00053 } 00054 00055 PositionControlled::PositionControlled() : 00056 _lastCommandedPosition() { 00057 } 00058 00059 PositionControlled::~PositionControlled() { 00060 } 00061 00062 bool VelocityControlled::setJointVelocity(JointVelocitiesPtr velocity) { 00063 _lastCommandedVelocity = velocity; 00064 return true; 00065 } 00066 00067 JointVelocitiesPtr VelocityControlled::getLastVelocityCommand() const { 00068 return this->_lastCommandedVelocity; 00069 } 00070 00071 VelocityControlled::VelocityControlled() : 00072 _lastCommandedVelocity() { 00073 } 00074 00075 VelocityControlled::~VelocityControlled() { 00076 } 00077 00078 bool TorqueControlled::setJointTorque(JointTorquesPtr torque) { 00079 _lastCommandedTorque = torque; 00080 return true; 00081 } 00082 00083 JointTorquesPtr TorqueControlled::getLastTorqueCommand() const { 00084 return this->_lastCommandedTorque; 00085 } 00086 00087 TorqueControlled::TorqueControlled() : 00088 _lastCommandedTorque() { 00089 } 00090 00091 TorqueControlled::~TorqueControlled() { 00092 } 00093 00094 bool ImpedanceControlled::setJointImpedance(JointImpedancePtr impedance) { 00095 _lastCommandedImpedance = impedance; 00096 return true; 00097 } 00098 00099 JointImpedancePtr ImpedanceControlled::getLastImpedanceCommand() const { 00100 return this->_lastCommandedImpedance; 00101 } 00102 00103 ImpedanceControlled::ImpedanceControlled() : 00104 _lastCommandedImpedance() { 00105 } 00106 00107 ImpedanceControlled::~ImpedanceControlled() { 00108 } 00109 00110 bool PressureControlled::setPressure(PressurePtr pressure) { 00111 _lastCommandedPressure = pressure; 00112 return true; 00113 } 00114 00115 PressurePtr PressureControlled::getLastPressureCommand() const { 00116 return this->_lastCommandedPressure; 00117 } 00118 00119 PressureControlled::PressureControlled() : 00120 _lastCommandedPressure() { 00121 } 00122 00123 PressureControlled::~PressureControlled() { 00124 } 00125 00126 bool LengthControlled::setLength(LengthPtr length) { 00127 _lastCommandedLength = length; 00128 return true; 00129 } 00130 00131 LengthPtr LengthControlled::getLastLengthCommand() const { 00132 return this->_lastCommandedLength; 00133 } 00134 00135 LengthControlled::LengthControlled() : 00136 _lastCommandedLength() { 00137 } 00138 00139 LengthControlled::~LengthControlled() { 00140 } 00141 00142 bool PoseControlled::setPose(PosePtr pose) { 00143 _lastCommandedPose = pose; 00144 return true; 00145 } 00146 00147 PosePtr PoseControlled::getLastPoseCommand() const { 00148 return this->_lastCommandedPose; 00149 } 00150 00151 PoseControlled::PoseControlled() : 00152 _lastCommandedPose() { 00153 } 00154 00155 PoseControlled::~PoseControlled() { 00156 } 00157 00158 }
Generated on Thu Aug 2 14:02:49 2012 for RCI by 1.6.3