iCub-main
LogicalJoint.h
Go to the documentation of this file.
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2 
3 #ifndef ICUBSIMULATION_LOGICALJOINT_INC
4 #define ICUBSIMULATION_LOGICALJOINT_INC
5 
6 /*
7 * Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
8 * Author: Paul Fitzpatrick
9 * email: paulfitz@alum.mit.edu
10 * website: www.robotcub.org
11 * Permission is granted to copy, distribute, and/or modify this program
12 * under the terms of the GNU General Public License, version 2 or any
13 * later version published by the Free Software Foundation.
14 *
15 * A copy of the license can be found at
16 * http://www.robotcub.org/icub/license/gpl.txt
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
21 * Public License for more details
22 */
23 
25 // establish a mapping from the model to the external axes of control
26 
33 class LogicalJoint {
34 public:
38  virtual ~LogicalJoint() {}
39 
43  virtual double getAngle() = 0;
44 
48  virtual double getVelocity() = 0;
49 
53  virtual void setControlParameters(double vel, double acc) = 0;
54 
58  virtual void setPosition(double target) = 0;
59 
63  virtual void setVelocity(double target) = 0;
64 
65  virtual bool isValid() = 0;
66 
67 
71  virtual double getTorque() = 0;
72 
76  virtual void setTorque(double target) = 0;
77 
78  virtual void controlModeChanged(int cm) = 0;
79 };
80 
81 
82 #endif
Abstract class for mapping from "physical" (simulated) joints in the model to control joints in the I...
Definition: LogicalJoint.h:33
virtual double getTorque()=0
this is just a fake torque interface for now
virtual void controlModeChanged(int cm)=0
virtual double getAngle()=0
Get the angle of an associated joint, in ICUB units and sign.
virtual void setVelocity(double target)=0
Set velocity of joint (in ICUB units/sign).
virtual ~LogicalJoint()
Destructor.
Definition: LogicalJoint.h:38
virtual double getVelocity()=0
Get the angular velocity of an associated joint, in ICUB units and sign.
virtual void setTorque(double target)=0
Set the reference torque.
virtual void setControlParameters(double vel, double acc)=0
Set velocity and acceleration control parameters.
virtual void setPosition(double target)=0
Drive towards an angle setpoint (in ICUB units/sign).
virtual bool isValid()=0
_3f_vect_t acc
Definition: dataTypes.h:1