$search
00001 """autogenerated by genmsg_py from CarveSegmentsActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import pr2_dremel_server.msg 00006 import geometry_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class CarveSegmentsActionGoal(roslib.message.Message): 00012 _md5sum = "1d955593e40b876809ed7fcb2b3fc637" 00013 _type = "pr2_dremel_server/CarveSegmentsActionGoal" 00014 _has_header = True #flag to mark the presence of a Header object 00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00016 00017 Header header 00018 actionlib_msgs/GoalID goal_id 00019 CarveSegmentsGoal goal 00020 00021 ================================================================================ 00022 MSG: std_msgs/Header 00023 # Standard metadata for higher-level stamped data types. 00024 # This is generally used to communicate timestamped data 00025 # in a particular coordinate frame. 00026 # 00027 # sequence ID: consecutively increasing ID 00028 uint32 seq 00029 #Two-integer timestamp that is expressed as: 00030 # * stamp.secs: seconds (stamp_secs) since epoch 00031 # * stamp.nsecs: nanoseconds since stamp_secs 00032 # time-handling sugar is provided by the client library 00033 time stamp 00034 #Frame this data is associated with 00035 # 0: no frame 00036 # 1: global frame 00037 string frame_id 00038 00039 ================================================================================ 00040 MSG: actionlib_msgs/GoalID 00041 # The stamp should store the time at which this goal was requested. 00042 # It is used by an action server when it tries to preempt all 00043 # goals that were requested before a certain time 00044 time stamp 00045 00046 # The id provides a way to associate feedback and 00047 # result message with specific goal requests. The id 00048 # specified must be unique. 00049 string id 00050 00051 00052 ================================================================================ 00053 MSG: pr2_dremel_server/CarveSegmentsGoal 00054 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00055 # Define the goal 00056 pr2_dremel_server/Segment[] segments 00057 00058 ================================================================================ 00059 MSG: pr2_dremel_server/Segment 00060 geometry_msgs/Point[] points 00061 00062 ================================================================================ 00063 MSG: geometry_msgs/Point 00064 # This contains the position of a point in free space 00065 float64 x 00066 float64 y 00067 float64 z 00068 00069 """ 00070 __slots__ = ['header','goal_id','goal'] 00071 _slot_types = ['Header','actionlib_msgs/GoalID','pr2_dremel_server/CarveSegmentsGoal'] 00072 00073 def __init__(self, *args, **kwds): 00074 """ 00075 Constructor. Any message fields that are implicitly/explicitly 00076 set to None will be assigned a default value. The recommend 00077 use is keyword arguments as this is more robust to future message 00078 changes. You cannot mix in-order arguments and keyword arguments. 00079 00080 The available fields are: 00081 header,goal_id,goal 00082 00083 @param args: complete set of field values, in .msg order 00084 @param kwds: use keyword arguments corresponding to message field names 00085 to set specific fields. 00086 """ 00087 if args or kwds: 00088 super(CarveSegmentsActionGoal, self).__init__(*args, **kwds) 00089 #message fields cannot be None, assign default values for those that are 00090 if self.header is None: 00091 self.header = std_msgs.msg._Header.Header() 00092 if self.goal_id is None: 00093 self.goal_id = actionlib_msgs.msg.GoalID() 00094 if self.goal is None: 00095 self.goal = pr2_dremel_server.msg.CarveSegmentsGoal() 00096 else: 00097 self.header = std_msgs.msg._Header.Header() 00098 self.goal_id = actionlib_msgs.msg.GoalID() 00099 self.goal = pr2_dremel_server.msg.CarveSegmentsGoal() 00100 00101 def _get_types(self): 00102 """ 00103 internal API method 00104 """ 00105 return self._slot_types 00106 00107 def serialize(self, buff): 00108 """ 00109 serialize message into buffer 00110 @param buff: buffer 00111 @type buff: StringIO 00112 """ 00113 try: 00114 _x = self 00115 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00116 _x = self.header.frame_id 00117 length = len(_x) 00118 buff.write(struct.pack('<I%ss'%length, length, _x)) 00119 _x = self 00120 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00121 _x = self.goal_id.id 00122 length = len(_x) 00123 buff.write(struct.pack('<I%ss'%length, length, _x)) 00124 length = len(self.goal.segments) 00125 buff.write(_struct_I.pack(length)) 00126 for val1 in self.goal.segments: 00127 length = len(val1.points) 00128 buff.write(_struct_I.pack(length)) 00129 for val2 in val1.points: 00130 _x = val2 00131 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00132 except struct.error as se: self._check_types(se) 00133 except TypeError as te: self._check_types(te) 00134 00135 def deserialize(self, str): 00136 """ 00137 unpack serialized message in str into this message instance 00138 @param str: byte array of serialized message 00139 @type str: str 00140 """ 00141 try: 00142 if self.header is None: 00143 self.header = std_msgs.msg._Header.Header() 00144 if self.goal_id is None: 00145 self.goal_id = actionlib_msgs.msg.GoalID() 00146 if self.goal is None: 00147 self.goal = pr2_dremel_server.msg.CarveSegmentsGoal() 00148 end = 0 00149 _x = self 00150 start = end 00151 end += 12 00152 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00153 start = end 00154 end += 4 00155 (length,) = _struct_I.unpack(str[start:end]) 00156 start = end 00157 end += length 00158 self.header.frame_id = str[start:end] 00159 _x = self 00160 start = end 00161 end += 8 00162 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00163 start = end 00164 end += 4 00165 (length,) = _struct_I.unpack(str[start:end]) 00166 start = end 00167 end += length 00168 self.goal_id.id = str[start:end] 00169 start = end 00170 end += 4 00171 (length,) = _struct_I.unpack(str[start:end]) 00172 self.goal.segments = [] 00173 for i in range(0, length): 00174 val1 = pr2_dremel_server.msg.Segment() 00175 start = end 00176 end += 4 00177 (length,) = _struct_I.unpack(str[start:end]) 00178 val1.points = [] 00179 for i in range(0, length): 00180 val2 = geometry_msgs.msg.Point() 00181 _x = val2 00182 start = end 00183 end += 24 00184 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00185 val1.points.append(val2) 00186 self.goal.segments.append(val1) 00187 return self 00188 except struct.error as e: 00189 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00190 00191 00192 def serialize_numpy(self, buff, numpy): 00193 """ 00194 serialize message with numpy array types into buffer 00195 @param buff: buffer 00196 @type buff: StringIO 00197 @param numpy: numpy python module 00198 @type numpy module 00199 """ 00200 try: 00201 _x = self 00202 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00203 _x = self.header.frame_id 00204 length = len(_x) 00205 buff.write(struct.pack('<I%ss'%length, length, _x)) 00206 _x = self 00207 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00208 _x = self.goal_id.id 00209 length = len(_x) 00210 buff.write(struct.pack('<I%ss'%length, length, _x)) 00211 length = len(self.goal.segments) 00212 buff.write(_struct_I.pack(length)) 00213 for val1 in self.goal.segments: 00214 length = len(val1.points) 00215 buff.write(_struct_I.pack(length)) 00216 for val2 in val1.points: 00217 _x = val2 00218 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00219 except struct.error as se: self._check_types(se) 00220 except TypeError as te: self._check_types(te) 00221 00222 def deserialize_numpy(self, str, numpy): 00223 """ 00224 unpack serialized message in str into this message instance using numpy for array types 00225 @param str: byte array of serialized message 00226 @type str: str 00227 @param numpy: numpy python module 00228 @type numpy: module 00229 """ 00230 try: 00231 if self.header is None: 00232 self.header = std_msgs.msg._Header.Header() 00233 if self.goal_id is None: 00234 self.goal_id = actionlib_msgs.msg.GoalID() 00235 if self.goal is None: 00236 self.goal = pr2_dremel_server.msg.CarveSegmentsGoal() 00237 end = 0 00238 _x = self 00239 start = end 00240 end += 12 00241 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00242 start = end 00243 end += 4 00244 (length,) = _struct_I.unpack(str[start:end]) 00245 start = end 00246 end += length 00247 self.header.frame_id = str[start:end] 00248 _x = self 00249 start = end 00250 end += 8 00251 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00252 start = end 00253 end += 4 00254 (length,) = _struct_I.unpack(str[start:end]) 00255 start = end 00256 end += length 00257 self.goal_id.id = str[start:end] 00258 start = end 00259 end += 4 00260 (length,) = _struct_I.unpack(str[start:end]) 00261 self.goal.segments = [] 00262 for i in range(0, length): 00263 val1 = pr2_dremel_server.msg.Segment() 00264 start = end 00265 end += 4 00266 (length,) = _struct_I.unpack(str[start:end]) 00267 val1.points = [] 00268 for i in range(0, length): 00269 val2 = geometry_msgs.msg.Point() 00270 _x = val2 00271 start = end 00272 end += 24 00273 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00274 val1.points.append(val2) 00275 self.goal.segments.append(val1) 00276 return self 00277 except struct.error as e: 00278 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00279 00280 _struct_I = roslib.message.struct_I 00281 _struct_3I = struct.Struct("<3I") 00282 _struct_2I = struct.Struct("<2I") 00283 _struct_3d = struct.Struct("<3d")