Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
MarkerMenu.h
00001 #ifndef _ROS_jsk_interactive_marker_MarkerMenu_h 00002 #define _ROS_jsk_interactive_marker_MarkerMenu_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 00009 namespace jsk_interactive_marker 00010 { 00011 00012 class MarkerMenu : public ros::Msg 00013 { 00014 public: 00015 typedef int8_t _menu_type; 00016 _menu_type menu; 00017 typedef int8_t _type_type; 00018 _type_type type; 00019 typedef const char* _marker_name_type; 00020 _marker_name_type marker_name; 00021 enum { MOVE = 0 }; 00022 enum { FORCE_MOVE = 1 }; 00023 enum { SET_ORIGIN = 2 }; 00024 enum { SET_ORIGIN_RHAND = 3 }; 00025 enum { SET_ORIGIN_LHAND = 4 }; 00026 enum { RESET_COORDS = 5 }; 00027 enum { DELETE_FORCE = 6 }; 00028 enum { PUBLISH_MARKER = 7 }; 00029 enum { JOINT_MOVE = 8 }; 00030 enum { RESET_JOINT = 9 }; 00031 enum { SET_MOVE_RARM = 10 }; 00032 enum { SET_MOVE_LARM = 11 }; 00033 enum { SET_MOVE_ARMS = 12 }; 00034 enum { MOVE_CONSTRAINT_T = 13 }; 00035 enum { MOVE_CONSTRAINT_NIL = 14 }; 00036 enum { IK_ROTATION_AXIS_T = 15 }; 00037 enum { IK_ROTATION_AXIS_NIL = 16 }; 00038 enum { USE_TORSO_T = 17 }; 00039 enum { USE_TORSO_NIL = 18 }; 00040 enum { USE_FULLBODY = 19 }; 00041 enum { START_GRASP = 20 }; 00042 enum { HARF_GRASP = 21 }; 00043 enum { STOP_GRASP = 22 }; 00044 enum { HEAD_TARGET_POINT = 30 }; 00045 enum { LOOK_AUTO = 31 }; 00046 enum { MANIP_MODE = 40 }; 00047 enum { PICK = 41 }; 00048 enum { TOUCHIT_EXEC = 42 }; 00049 enum { TOUCHIT_PREV = 43 }; 00050 enum { TOUCHIT_CANCEL = 44 }; 00051 enum { LOOK_RARM = 45 }; 00052 enum { LOOK_LARM = 46 }; 00053 enum { PLAN = 50 }; 00054 enum { EXECUTE = 51 }; 00055 enum { PLAN_EXECUTE = 52 }; 00056 enum { CANCEL_PLAN = 53 }; 00057 enum { GENERAL = 0 }; 00058 enum { HEAD_MARKER = 1 }; 00059 enum { RHAND_MARKER = 2 }; 00060 enum { LHAND_MARKER = 3 }; 00061 enum { RLEG_MARKER = 4 }; 00062 enum { LLEG_MARKER = 5 }; 00063 enum { BASE_MARKER = 6 }; 00064 enum { RFINGER_MARKER = 7 }; 00065 enum { LFINGER_MARKER = 8 }; 00066 00067 MarkerMenu(): 00068 menu(0), 00069 type(0), 00070 marker_name("") 00071 { 00072 } 00073 00074 virtual int serialize(unsigned char *outbuffer) const 00075 { 00076 int offset = 0; 00077 union { 00078 int8_t real; 00079 uint8_t base; 00080 } u_menu; 00081 u_menu.real = this->menu; 00082 *(outbuffer + offset + 0) = (u_menu.base >> (8 * 0)) & 0xFF; 00083 offset += sizeof(this->menu); 00084 union { 00085 int8_t real; 00086 uint8_t base; 00087 } u_type; 00088 u_type.real = this->type; 00089 *(outbuffer + offset + 0) = (u_type.base >> (8 * 0)) & 0xFF; 00090 offset += sizeof(this->type); 00091 uint32_t length_marker_name = strlen(this->marker_name); 00092 varToArr(outbuffer + offset, length_marker_name); 00093 offset += 4; 00094 memcpy(outbuffer + offset, this->marker_name, length_marker_name); 00095 offset += length_marker_name; 00096 return offset; 00097 } 00098 00099 virtual int deserialize(unsigned char *inbuffer) 00100 { 00101 int offset = 0; 00102 union { 00103 int8_t real; 00104 uint8_t base; 00105 } u_menu; 00106 u_menu.base = 0; 00107 u_menu.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); 00108 this->menu = u_menu.real; 00109 offset += sizeof(this->menu); 00110 union { 00111 int8_t real; 00112 uint8_t base; 00113 } u_type; 00114 u_type.base = 0; 00115 u_type.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); 00116 this->type = u_type.real; 00117 offset += sizeof(this->type); 00118 uint32_t length_marker_name; 00119 arrToVar(length_marker_name, (inbuffer + offset)); 00120 offset += 4; 00121 for(unsigned int k= offset; k< offset+length_marker_name; ++k){ 00122 inbuffer[k-1]=inbuffer[k]; 00123 } 00124 inbuffer[offset+length_marker_name-1]=0; 00125 this->marker_name = (char *)(inbuffer + offset-1); 00126 offset += length_marker_name; 00127 return offset; 00128 } 00129 00130 virtual const char * getType(){ return "jsk_interactive_marker/MarkerMenu"; }; 00131 virtual const char * getMD5(){ return "192d3b78eda584051c0d487463f7de74"; }; 00132 00133 }; 00134 00135 } 00136 #endif
Generated on Mon Sep 26 2022 13:47:02 by
