icub-basic-demos
robot_interfaces.h
1 /*
2  * Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
3  * Author: Marco Randazzo
4  * email: marco.randazzo@iit.it
5  * Permission is granted to copy, distribute, and/or modify this program
6  * under the terms of the GNU General Public License, version 2 or any
7  * later version published by the Free Software Foundation.
8  *
9  * A copy of the license can be found at
10  * http://www.robotcub.org/icub/license/gpl.txt
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15  * Public License for more details
16 */
17 
18 #ifndef ROBOT_INTERFACES_H
19 #define ROBOT_INTERFACES_H
20 
21 #include <yarp/dev/all.h>
22 #include <yarp/dev/ControlBoardInterfaces.h>
23 #include <string>
24 
25 #define LEFT_ARM 0
26 #define RIGHT_ARM 1
27 #define LEFT_LEG 2
28 #define RIGHT_LEG 3
29 #define TORSO 4
30 
31 class robot_interfaces
32 {
33  public:
34 
35  yarp::dev::IPositionControl *ipos[5];
36  yarp::dev::ITorqueControl *itrq[5];
37  yarp::dev::IImpedanceControl *iimp[5];
38  yarp::dev::IControlMode *icmd[5];
39  yarp::dev::IInteractionMode *iint[5];
40  yarp::dev::IEncoders *ienc[5];
41  yarp::dev::IPidControl *ipid[5];
42  yarp::dev::IVelocityControl *ivel[5];
43  yarp::dev::IAmplifierControl *iamp[5];
44 
45  yarp::os::Property options[5];
46  yarp::dev::PolyDriver *dd[5];
47 
48  robot_interfaces();
49  ~robot_interfaces();
50  bool init(std::string robotName);
51 };
52 
53 #endif
54