Go to the documentation of this file.00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef OCRA_ICUB_UTILITIES_H
00027 #define OCRA_ICUB_UTILITIES_H
00028
00029
00030
00031
00032
00033
00034 #include <memory>
00035 #include <cmath>
00036 #include <iostream>
00037 #include <string>
00038 #include <vector>
00039 #include <sstream>
00040
00041
00042
00043 #include <yarp/os/BufferedPort.h>
00044 #include <yarp/os/Bottle.h>
00045 #include <yarp/os/RateThread.h>
00046 #include <yarp/os/ResourceFinder.h>
00047 #include <yarp/os/PortReader.h>
00048 #include <yarp/os/RpcClient.h>
00049 #include <yarp/os/RpcServer.h>
00050 #include <yarp/os/ConnectionReader.h>
00051 #include <yarp/os/Time.h>
00052 #include <yarp/os/Log.h>
00053 #include <yarp/os/LogStream.h>
00054 #include <yarp/os/Property.h>
00055 #include <yarp/sig/Vector.h>
00056 #include <yarp/sig/Matrix.h>
00057
00058
00059 #include <wbi/wbi.h>
00060
00061
00062 #include "ocra/control/Model.h"
00063 #include "ocra/util/StringUtilities.h"
00064
00065
00066 #include <Eigen/Dense>
00067 #include <Eigen/Lgsm>
00068
00069
00070 namespace ocra_icub
00071 {
00072
00076 #ifndef CLASS_POINTER_TYPEDEFS
00077 #define CLASS_POINTER_TYPEDEFS(Class) public:\
00078 using ptr = std::shared_ptr <Class>; \
00079 using shared_ptr = std::shared_ptr <Class>; \
00080 using unique_ptr = std::unique_ptr <Class>; \
00081 using weak_ptr = std::weak_ptr <Class>; \
00082 using const_ptr = const std::shared_ptr <Class>; \
00083 using const_shared_ptr = const std::shared_ptr <Class>; \
00084 using const_unique_ptr = const std::unique_ptr <Class>; \
00085 using const_weak_ptr = const std::weak_ptr <Class>;
00086 #endif
00087
00088
00089
00090 static constexpr double DEG_TO_RAD = M_PI/180.0;
00091
00092 enum OCRA_ICUB_MESSAGE
00093 {
00094 STRING_MESSAGE = -1,
00095 FAILURE = 0,
00096 SUCCESS,
00097
00098 GET_MODEL_CONFIG_INFO,
00099 GET_CONTROLLER_SERVER_STATUS,
00100
00101 CONTROLLER_SERVER_RUNNING,
00102 CONTROLLER_SERVER_STOPPED,
00103 CONTROLLER_SERVER_PAUSED,
00104
00105 GET_L_FOOT_POSE,
00106
00107 HELP
00108 };
00109
00110 void getNominalPosture(const ocra::Model &model, Eigen::VectorXd &q);
00111 void getHomePosture(const ocra::Model &model, Eigen::VectorXd &q);
00112
00113
00114 }
00115 #endif //OCRA_ICUB_UTILITIES_H