ControlAspect.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 <boost/shared_ptr.hpp>
00032 
00033 namespace rci {
00034 
00035 class ControlAspect;
00036 typedef boost::shared_ptr<ControlAspect> ControlAspectPtr;
00037 
00044 class ControlAspect {
00045 
00046 public:
00047 
00054     ControlAspect(const std::string &name, const std::string &ID);
00055 
00059     virtual ~ControlAspect();
00060 
00065     std::string getID() const;
00066 
00071     std::string getName() const;
00072 
00078     bool equals(const ControlAspectPtr &mode) const;
00079 
00084     bool operator<(const ControlAspectPtr &compare);
00085 
00092     static ControlAspectPtr create(const std::string &name,
00093             const std::string &ID);
00094 
00095     std::string print() const;
00096 
00097 protected:
00101     std::string name;
00102 
00106     std::string ID;
00107 
00108 private:
00109 
00113     ControlAspect(const ControlAspect& ControlAspect);
00114 };
00115 
00120 //bool operator<(const ControlAspectPtr &source, const ControlAspectPtr &compare) {
00121 //return (source->getID() < compare->getID());
00122 //}
00123 
00127 static ControlAspectPtr noControl = ControlAspect::create(
00128         "Inactive / no Control", "NO_CONTROL");
00129 
00133 static ControlAspectPtr poseControl = ControlAspect::create(
00134         "Cartesian Pose Control", "POSE_CONTROL");
00135 
00140 static const ControlAspectPtr forceControl = ControlAspect::create(
00141         "Cartesian Force Control", "FORCE_CONTROL");
00142 
00147 static const ControlAspectPtr jointPositionControl = ControlAspect::create(
00148         "Joint Position Control", "POSITION_CONTROL");
00149 
00150 /* Compliance */
00151 
00156 static const ControlAspectPtr jointComplianceControl = ControlAspect::create(
00157         "Joint Compliance Control", "ACTIVE_JOINT_COMPLIANCE");
00158 
00163 static const ControlAspectPtr cartesianComplianceControl =
00164         ControlAspect::create("Cartesian Compliance Control",
00165                 "ACTIVE_CARTESIAN_COMPLIANCE");
00166 
00170 static const ControlAspectPtr jointVelocityControl = ControlAspect::create(
00171         "Joint Velocity Control", "VELOCITY_CONTROL");
00172 
00176 static const ControlAspectPtr jointTorqueControl = ControlAspect::create(
00177         "Joint Torque Control", "TORQUE_CONTROL");
00178 }
Generated on Thu Aug 2 14:02:47 2012 for RCI by  doxygen 1.6.3