XBotInterface  2.4.1
XBotInterface provides a generic API to model and control a robot.
TypedefAndEnums.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 IIT-ADVR
3  * Author: Arturo Laurenzi, Luca Muratore
4  * email: arturo.laurenzi@iit.it, luca.muratore@iit.it
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>
18 */
19 
20 #ifndef __XBOT_ENUM__
21 #define __XBOT_ENUM__
22 
23 #include <map>
24 #include <unordered_map>
25 #include <string>
26 #include <memory>
27 #include <boost/any.hpp>
28 #include <eigen3/Eigen/Dense>
29 
30 namespace XBot{
31 
32  class ImuSensor;
34 
35 
37  // TYPEDEF //
39 
45  typedef std::unordered_map<int, double> JointIdMap;
46 
51  typedef std::unordered_map<std::string, double> JointNameMap;
52 
58  typedef std::map<std::string, std::shared_ptr<const ForceTorqueSensor> > ForceTorqueMap;
59 
65  typedef std::map<std::string, std::shared_ptr<const ImuSensor> > ImuMap;
66 
72  typedef std::map<std::string, boost::any> AnyMap;
73 
78  typedef std::shared_ptr<AnyMap> AnyMapPtr;
79 
84  typedef std::shared_ptr<const AnyMap> AnyMapConstPtr;
85 
87  // ENUM //
89 
107  enum class Sync {
108 
109  Position ,
110  Velocity,
111  Effort,
112  Acceleration,
113  Impedance,
114  Stiffness,
115  Damping,
116  All ,
117  Sensors,
118  Imu,
119  ForceTorque,
120  MotorSide
121 
122  };
123 
124 }
125 
126 namespace Eigen {
127 
132  typedef Eigen::Matrix<double, 6, 1> Vector6d;
133 
138  typedef Eigen::Matrix<double, 6, 6> Matrix6d;
139 }
140 
141 #endif
XBot::Sync::Effort
@ Effort
XBot::Sync::ForceTorque
@ ForceTorque
Eigen
Definition: TypedefAndEnums.h:126
XBot::Sync::MotorSide
@ MotorSide
XBot::JointIdMap
std::unordered_map< int, double > JointIdMap
std::map with key representing the joint ID (i.e.
Definition: TypedefAndEnums.h:33
XBot::Sync::Imu
@ Imu
XBot::ForceTorqueMap
std::map< std::string, std::shared_ptr< const ForceTorqueSensor > > ForceTorqueMap
std::map with key representing the FT sensor human-readable name and value representing a const share...
Definition: TypedefAndEnums.h:58
Eigen::Matrix6d
Eigen::Matrix< double, 6, 6 > Matrix6d
Typedef for a 6-by-6 matrix of double.
Definition: TypedefAndEnums.h:138
XBot::JointNameMap
std::unordered_map< std::string, double > JointNameMap
std::map with key representing the joint human-readable name and value representing a joint state (e....
Definition: TypedefAndEnums.h:51
XBot::AnyMapPtr
std::shared_ptr< AnyMap > AnyMapPtr
Shared pointer to AnyMap.
Definition: TypedefAndEnums.h:78
Eigen::Vector6d
Eigen::Matrix< double, 6, 1 > Vector6d
Typedef for a 6 element column vector of double.
Definition: TypedefAndEnums.h:132
XBot::Sync::Damping
@ Damping
XBot::ImuMap
std::map< std::string, std::shared_ptr< const ImuSensor > > ImuMap
std::map with key representing the IMU sensor human-readable name and value representing a const shar...
Definition: TypedefAndEnums.h:65
XBot::AnyMap
std::map< std::string, boost::any > AnyMap
std::map map with key representing a parameter name and value representing the parameter value.
Definition: TypedefAndEnums.h:72
XBot::Sync::Stiffness
@ Stiffness
XBot::Sync
Sync
enum class that represents a set of flags to specify what part of the robot/model state needs to be s...
Definition: TypedefAndEnums.h:107
XBot::Sync::Acceleration
@ Acceleration
XBot::ForceTorqueSensor
Force - Torque sensor abstraction:
Definition: ForceTorqueSensor.h:40
XBot::Sync::Sensors
@ Sensors
XBot::AnyMapConstPtr
std::shared_ptr< const AnyMap > AnyMapConstPtr
Shared pointer to AnyMap.
Definition: TypedefAndEnums.h:84
XBot::Sync::Velocity
@ Velocity
XBot::Sync::All
@ All
XBot::Sync::Position
@ Position
XBot
Definition: IXBotModel.h:20
XBot::Sync::Impedance
@ Impedance