access.h
Go to the documentation of this file.
00001 #ifndef __CACCESS_H__
00002 #define __CACCESS_H__
00003 
00004 #include "porting.h"
00005 #include "v_repLib.h"
00006 
00007 static const char pluginName[] = "RosBridge";
00008 
00009 
00010 class CustomDataHeaders {
00011 public:
00012 
00016     typedef enum {
00017         DIRECT = 0, 
00018         INTERNAL = 1 
00019     } QuadrotorCtrlMode;
00020 
00024     typedef enum {
00025         TF_POSITION = 0, 
00026         TF_VELOCITY = 1, 
00027         TF_EFFORT = 2,
00028         MOT_VELOCITY = 3,
00029         PASSIVE_MODE = 4,
00030         PASSIVE_MODE_VELOCITY = 5,
00031         IGNORE_MODE = 20
00032 
00033     } ManipulatorCtrlMode;
00034 
00039     const static unsigned int DEVELOPER_DATA_HEADER = 769710397;
00040 
00044     const static unsigned int QUADROTOR_DATA_MAIN=10;
00046     const static unsigned int QUADROTOR_TK_DATA_MAIN=20;
00048     const static unsigned int QUADROTOR_DATA_MOTOR_0=0;
00050     const static unsigned int QUADROTOR_DATA_MOTOR_1=1;
00052     const static unsigned int QUADROTOR_DATA_MOTOR_2=2;
00054     const static unsigned int QUADROTOR_DATA_MOTOR_3=3;
00056     const static unsigned int QUADROTOR_DATA_COM=11;
00058     const static unsigned int QUADROTOR_DATA_TF_RATIO=12;
00060     const static unsigned int QUADROTOR_DATA_CTRL_MODE = 13;
00062 
00066     const static unsigned int IMU_DATA_MAIN=200;
00068     const static unsigned int IMU_DATA_MASS=201;
00070     const static unsigned int IMU_DATA_FORCE=202;
00072     const static unsigned int IMU_DATA_FREQ= 203;
00074     const static unsigned int IMU_DATA_CUTOFF=204;
00076 
00080     const static unsigned int FORCE_SENSOR_DATA_MAIN= 250;
00082 
00086     const static unsigned int CAMERA_DATA_MAIN = 300;
00088     const static unsigned int CAMERA_DATA_FREQ = 301;
00090     const static unsigned int CAMERA_DATA_RGB = 302;
00092     const static unsigned int CAMERA_DATA_HAS_DEPTH = 303;
00094     const static unsigned int CAMERA_DATA_USE_FLOAT = 304;
00096 
00100     const static unsigned int OBJ_POSE_DATA_MAIN=400;
00102 
00106     const static unsigned int OBJ_TWIST_DATA_MAIN=500;
00108 
00112     const static unsigned int MANIPULATOR_DATA_MAIN = 600;
00114     const static unsigned int MANIPULATOR_DATA_FREQ = 601;
00116     const static unsigned int MANIPULATOR_DATA_JOINT = 602;
00118     const static unsigned int MANIPULATOR_DATA_CTRL_MODE = 603;
00120 
00124     const static unsigned int CONTACT_DATA_MAIN= 650;
00126 
00127 
00128 
00133     static void registerCustomDataHeaders();
00134 };
00135 
00136 
00137 #include <vector>
00138 
00144 class CAccess  
00145 {
00146 public:
00147         CAccess();
00148         virtual ~CAccess();
00149 
00156         static void insertSerializationData(std::vector<unsigned char>& buffer,int dataName,const std::vector<unsigned char>& data);
00157 
00164         static bool extractSerializationData(std::vector<unsigned char>& buffer,int dataName,std::vector<unsigned char>& data);
00165 
00173         static int getDataLocationAndSize(const std::vector<unsigned char>& buffer,int dataName,int& theSize);
00174 
00180         static void push_int(std::vector<unsigned char>& buffer, const int data);
00181 
00187         static void push_float(std::vector<unsigned char>& buffer, const float data);
00188 
00194         static void push_float(std::vector<unsigned char>& buffer, const std::vector<float> data);
00195 
00202         static int pop_int(std::vector<unsigned char>& buffer);
00203 
00210         static float pop_float(std::vector<unsigned char>& buffer);
00211 
00219         static std::vector<float> pop_float(std::vector<unsigned char>& buffer, const unsigned int n);
00220 
00221 };
00222 
00223 #endif //ndef __CACCESS_H__


vrep_ros_plugin
Author(s): Riccardo Spica , Giovanni Claudio
autogenerated on Sat Jun 8 2019 20:22:41