$search
00001 """autogenerated by genmsg_py from InteractiveMarkerPose.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import std_msgs.msg 00007 00008 class InteractiveMarkerPose(roslib.message.Message): 00009 _md5sum = "a6e6833209a196a38d798dadb02c81f8" 00010 _type = "visualization_msgs/InteractiveMarkerPose" 00011 _has_header = True #flag to mark the presence of a Header object 00012 _full_text = """# Time/frame info. 00013 Header header 00014 00015 # Initial pose. Also, defines the pivot point for rotations. 00016 geometry_msgs/Pose pose 00017 00018 # Identifying string. Must be globally unique in 00019 # the topic that this message is sent through. 00020 string name 00021 00022 ================================================================================ 00023 MSG: std_msgs/Header 00024 # Standard metadata for higher-level stamped data types. 00025 # This is generally used to communicate timestamped data 00026 # in a particular coordinate frame. 00027 # 00028 # sequence ID: consecutively increasing ID 00029 uint32 seq 00030 #Two-integer timestamp that is expressed as: 00031 # * stamp.secs: seconds (stamp_secs) since epoch 00032 # * stamp.nsecs: nanoseconds since stamp_secs 00033 # time-handling sugar is provided by the client library 00034 time stamp 00035 #Frame this data is associated with 00036 # 0: no frame 00037 # 1: global frame 00038 string frame_id 00039 00040 ================================================================================ 00041 MSG: geometry_msgs/Pose 00042 # A representation of pose in free space, composed of postion and orientation. 00043 Point position 00044 Quaternion orientation 00045 00046 ================================================================================ 00047 MSG: geometry_msgs/Point 00048 # This contains the position of a point in free space 00049 float64 x 00050 float64 y 00051 float64 z 00052 00053 ================================================================================ 00054 MSG: geometry_msgs/Quaternion 00055 # This represents an orientation in free space in quaternion form. 00056 00057 float64 x 00058 float64 y 00059 float64 z 00060 float64 w 00061 00062 """ 00063 __slots__ = ['header','pose','name'] 00064 _slot_types = ['Header','geometry_msgs/Pose','string'] 00065 00066 def __init__(self, *args, **kwds): 00067 """ 00068 Constructor. Any message fields that are implicitly/explicitly 00069 set to None will be assigned a default value. The recommend 00070 use is keyword arguments as this is more robust to future message 00071 changes. You cannot mix in-order arguments and keyword arguments. 00072 00073 The available fields are: 00074 header,pose,name 00075 00076 @param args: complete set of field values, in .msg order 00077 @param kwds: use keyword arguments corresponding to message field names 00078 to set specific fields. 00079 """ 00080 if args or kwds: 00081 super(InteractiveMarkerPose, self).__init__(*args, **kwds) 00082 #message fields cannot be None, assign default values for those that are 00083 if self.header is None: 00084 self.header = std_msgs.msg._Header.Header() 00085 if self.pose is None: 00086 self.pose = geometry_msgs.msg.Pose() 00087 if self.name is None: 00088 self.name = '' 00089 else: 00090 self.header = std_msgs.msg._Header.Header() 00091 self.pose = geometry_msgs.msg.Pose() 00092 self.name = '' 00093 00094 def _get_types(self): 00095 """ 00096 internal API method 00097 """ 00098 return self._slot_types 00099 00100 def serialize(self, buff): 00101 """ 00102 serialize message into buffer 00103 @param buff: buffer 00104 @type buff: StringIO 00105 """ 00106 try: 00107 _x = self 00108 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00109 _x = self.header.frame_id 00110 length = len(_x) 00111 buff.write(struct.pack('<I%ss'%length, length, _x)) 00112 _x = self 00113 buff.write(_struct_7d.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w)) 00114 _x = self.name 00115 length = len(_x) 00116 buff.write(struct.pack('<I%ss'%length, length, _x)) 00117 except struct.error as se: self._check_types(se) 00118 except TypeError as te: self._check_types(te) 00119 00120 def deserialize(self, str): 00121 """ 00122 unpack serialized message in str into this message instance 00123 @param str: byte array of serialized message 00124 @type str: str 00125 """ 00126 try: 00127 if self.header is None: 00128 self.header = std_msgs.msg._Header.Header() 00129 if self.pose is None: 00130 self.pose = geometry_msgs.msg.Pose() 00131 end = 0 00132 _x = self 00133 start = end 00134 end += 12 00135 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00136 start = end 00137 end += 4 00138 (length,) = _struct_I.unpack(str[start:end]) 00139 start = end 00140 end += length 00141 self.header.frame_id = str[start:end] 00142 _x = self 00143 start = end 00144 end += 56 00145 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00146 start = end 00147 end += 4 00148 (length,) = _struct_I.unpack(str[start:end]) 00149 start = end 00150 end += length 00151 self.name = str[start:end] 00152 return self 00153 except struct.error as e: 00154 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00155 00156 00157 def serialize_numpy(self, buff, numpy): 00158 """ 00159 serialize message with numpy array types into buffer 00160 @param buff: buffer 00161 @type buff: StringIO 00162 @param numpy: numpy python module 00163 @type numpy module 00164 """ 00165 try: 00166 _x = self 00167 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00168 _x = self.header.frame_id 00169 length = len(_x) 00170 buff.write(struct.pack('<I%ss'%length, length, _x)) 00171 _x = self 00172 buff.write(_struct_7d.pack(_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w)) 00173 _x = self.name 00174 length = len(_x) 00175 buff.write(struct.pack('<I%ss'%length, length, _x)) 00176 except struct.error as se: self._check_types(se) 00177 except TypeError as te: self._check_types(te) 00178 00179 def deserialize_numpy(self, str, numpy): 00180 """ 00181 unpack serialized message in str into this message instance using numpy for array types 00182 @param str: byte array of serialized message 00183 @type str: str 00184 @param numpy: numpy python module 00185 @type numpy: module 00186 """ 00187 try: 00188 if self.header is None: 00189 self.header = std_msgs.msg._Header.Header() 00190 if self.pose is None: 00191 self.pose = geometry_msgs.msg.Pose() 00192 end = 0 00193 _x = self 00194 start = end 00195 end += 12 00196 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00197 start = end 00198 end += 4 00199 (length,) = _struct_I.unpack(str[start:end]) 00200 start = end 00201 end += length 00202 self.header.frame_id = str[start:end] 00203 _x = self 00204 start = end 00205 end += 56 00206 (_x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00207 start = end 00208 end += 4 00209 (length,) = _struct_I.unpack(str[start:end]) 00210 start = end 00211 end += length 00212 self.name = str[start:end] 00213 return self 00214 except struct.error as e: 00215 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00216 00217 _struct_I = roslib.message.struct_I 00218 _struct_3I = struct.Struct("<3I") 00219 _struct_7d = struct.Struct("<7d")