$search
00001 """autogenerated by genmsg_py from ArmNavCollObjRequest.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 ArmNavCollObjRequest(roslib.message.Message): 00009 _md5sum = "97c8e64e0da61b2f0eb0ea8f7b85c3de" 00010 _type = "srs_assisted_arm_navigation_msgs/ArmNavCollObjRequest" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """string object_name 00013 geometry_msgs/PoseStamped pose 00014 geometry_msgs/Point bb_lwh 00015 bool allow_collision 00016 bool attached 00017 string attach_to_frame_id 00018 bool allow_pregrasps 00019 00020 ================================================================================ 00021 MSG: geometry_msgs/PoseStamped 00022 # A Pose with reference coordinate frame and timestamp 00023 Header header 00024 Pose pose 00025 00026 ================================================================================ 00027 MSG: std_msgs/Header 00028 # Standard metadata for higher-level stamped data types. 00029 # This is generally used to communicate timestamped data 00030 # in a particular coordinate frame. 00031 # 00032 # sequence ID: consecutively increasing ID 00033 uint32 seq 00034 #Two-integer timestamp that is expressed as: 00035 # * stamp.secs: seconds (stamp_secs) since epoch 00036 # * stamp.nsecs: nanoseconds since stamp_secs 00037 # time-handling sugar is provided by the client library 00038 time stamp 00039 #Frame this data is associated with 00040 # 0: no frame 00041 # 1: global frame 00042 string frame_id 00043 00044 ================================================================================ 00045 MSG: geometry_msgs/Pose 00046 # A representation of pose in free space, composed of postion and orientation. 00047 Point position 00048 Quaternion orientation 00049 00050 ================================================================================ 00051 MSG: geometry_msgs/Point 00052 # This contains the position of a point in free space 00053 float64 x 00054 float64 y 00055 float64 z 00056 00057 ================================================================================ 00058 MSG: geometry_msgs/Quaternion 00059 # This represents an orientation in free space in quaternion form. 00060 00061 float64 x 00062 float64 y 00063 float64 z 00064 float64 w 00065 00066 """ 00067 __slots__ = ['object_name','pose','bb_lwh','allow_collision','attached','attach_to_frame_id','allow_pregrasps'] 00068 _slot_types = ['string','geometry_msgs/PoseStamped','geometry_msgs/Point','bool','bool','string','bool'] 00069 00070 def __init__(self, *args, **kwds): 00071 """ 00072 Constructor. Any message fields that are implicitly/explicitly 00073 set to None will be assigned a default value. The recommend 00074 use is keyword arguments as this is more robust to future message 00075 changes. You cannot mix in-order arguments and keyword arguments. 00076 00077 The available fields are: 00078 object_name,pose,bb_lwh,allow_collision,attached,attach_to_frame_id,allow_pregrasps 00079 00080 @param args: complete set of field values, in .msg order 00081 @param kwds: use keyword arguments corresponding to message field names 00082 to set specific fields. 00083 """ 00084 if args or kwds: 00085 super(ArmNavCollObjRequest, self).__init__(*args, **kwds) 00086 #message fields cannot be None, assign default values for those that are 00087 if self.object_name is None: 00088 self.object_name = '' 00089 if self.pose is None: 00090 self.pose = geometry_msgs.msg.PoseStamped() 00091 if self.bb_lwh is None: 00092 self.bb_lwh = geometry_msgs.msg.Point() 00093 if self.allow_collision is None: 00094 self.allow_collision = False 00095 if self.attached is None: 00096 self.attached = False 00097 if self.attach_to_frame_id is None: 00098 self.attach_to_frame_id = '' 00099 if self.allow_pregrasps is None: 00100 self.allow_pregrasps = False 00101 else: 00102 self.object_name = '' 00103 self.pose = geometry_msgs.msg.PoseStamped() 00104 self.bb_lwh = geometry_msgs.msg.Point() 00105 self.allow_collision = False 00106 self.attached = False 00107 self.attach_to_frame_id = '' 00108 self.allow_pregrasps = False 00109 00110 def _get_types(self): 00111 """ 00112 internal API method 00113 """ 00114 return self._slot_types 00115 00116 def serialize(self, buff): 00117 """ 00118 serialize message into buffer 00119 @param buff: buffer 00120 @type buff: StringIO 00121 """ 00122 try: 00123 _x = self.object_name 00124 length = len(_x) 00125 buff.write(struct.pack('<I%ss'%length, length, _x)) 00126 _x = self 00127 buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs)) 00128 _x = self.pose.header.frame_id 00129 length = len(_x) 00130 buff.write(struct.pack('<I%ss'%length, length, _x)) 00131 _x = self 00132 buff.write(_struct_10d2B.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.bb_lwh.x, _x.bb_lwh.y, _x.bb_lwh.z, _x.allow_collision, _x.attached)) 00133 _x = self.attach_to_frame_id 00134 length = len(_x) 00135 buff.write(struct.pack('<I%ss'%length, length, _x)) 00136 buff.write(_struct_B.pack(self.allow_pregrasps)) 00137 except struct.error as se: self._check_types(se) 00138 except TypeError as te: self._check_types(te) 00139 00140 def deserialize(self, str): 00141 """ 00142 unpack serialized message in str into this message instance 00143 @param str: byte array of serialized message 00144 @type str: str 00145 """ 00146 try: 00147 if self.pose is None: 00148 self.pose = geometry_msgs.msg.PoseStamped() 00149 if self.bb_lwh is None: 00150 self.bb_lwh = geometry_msgs.msg.Point() 00151 end = 0 00152 start = end 00153 end += 4 00154 (length,) = _struct_I.unpack(str[start:end]) 00155 start = end 00156 end += length 00157 self.object_name = str[start:end] 00158 _x = self 00159 start = end 00160 end += 12 00161 (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00162 start = end 00163 end += 4 00164 (length,) = _struct_I.unpack(str[start:end]) 00165 start = end 00166 end += length 00167 self.pose.header.frame_id = str[start:end] 00168 _x = self 00169 start = end 00170 end += 82 00171 (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.bb_lwh.x, _x.bb_lwh.y, _x.bb_lwh.z, _x.allow_collision, _x.attached,) = _struct_10d2B.unpack(str[start:end]) 00172 self.allow_collision = bool(self.allow_collision) 00173 self.attached = bool(self.attached) 00174 start = end 00175 end += 4 00176 (length,) = _struct_I.unpack(str[start:end]) 00177 start = end 00178 end += length 00179 self.attach_to_frame_id = str[start:end] 00180 start = end 00181 end += 1 00182 (self.allow_pregrasps,) = _struct_B.unpack(str[start:end]) 00183 self.allow_pregrasps = bool(self.allow_pregrasps) 00184 return self 00185 except struct.error as e: 00186 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00187 00188 00189 def serialize_numpy(self, buff, numpy): 00190 """ 00191 serialize message with numpy array types into buffer 00192 @param buff: buffer 00193 @type buff: StringIO 00194 @param numpy: numpy python module 00195 @type numpy module 00196 """ 00197 try: 00198 _x = self.object_name 00199 length = len(_x) 00200 buff.write(struct.pack('<I%ss'%length, length, _x)) 00201 _x = self 00202 buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs)) 00203 _x = self.pose.header.frame_id 00204 length = len(_x) 00205 buff.write(struct.pack('<I%ss'%length, length, _x)) 00206 _x = self 00207 buff.write(_struct_10d2B.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.bb_lwh.x, _x.bb_lwh.y, _x.bb_lwh.z, _x.allow_collision, _x.attached)) 00208 _x = self.attach_to_frame_id 00209 length = len(_x) 00210 buff.write(struct.pack('<I%ss'%length, length, _x)) 00211 buff.write(_struct_B.pack(self.allow_pregrasps)) 00212 except struct.error as se: self._check_types(se) 00213 except TypeError as te: self._check_types(te) 00214 00215 def deserialize_numpy(self, str, numpy): 00216 """ 00217 unpack serialized message in str into this message instance using numpy for array types 00218 @param str: byte array of serialized message 00219 @type str: str 00220 @param numpy: numpy python module 00221 @type numpy: module 00222 """ 00223 try: 00224 if self.pose is None: 00225 self.pose = geometry_msgs.msg.PoseStamped() 00226 if self.bb_lwh is None: 00227 self.bb_lwh = geometry_msgs.msg.Point() 00228 end = 0 00229 start = end 00230 end += 4 00231 (length,) = _struct_I.unpack(str[start:end]) 00232 start = end 00233 end += length 00234 self.object_name = str[start:end] 00235 _x = self 00236 start = end 00237 end += 12 00238 (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00239 start = end 00240 end += 4 00241 (length,) = _struct_I.unpack(str[start:end]) 00242 start = end 00243 end += length 00244 self.pose.header.frame_id = str[start:end] 00245 _x = self 00246 start = end 00247 end += 82 00248 (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.bb_lwh.x, _x.bb_lwh.y, _x.bb_lwh.z, _x.allow_collision, _x.attached,) = _struct_10d2B.unpack(str[start:end]) 00249 self.allow_collision = bool(self.allow_collision) 00250 self.attached = bool(self.attached) 00251 start = end 00252 end += 4 00253 (length,) = _struct_I.unpack(str[start:end]) 00254 start = end 00255 end += length 00256 self.attach_to_frame_id = str[start:end] 00257 start = end 00258 end += 1 00259 (self.allow_pregrasps,) = _struct_B.unpack(str[start:end]) 00260 self.allow_pregrasps = bool(self.allow_pregrasps) 00261 return self 00262 except struct.error as e: 00263 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00264 00265 _struct_I = roslib.message.struct_I 00266 _struct_10d2B = struct.Struct("<10d2B") 00267 _struct_3I = struct.Struct("<3I") 00268 _struct_B = struct.Struct("<B") 00269 """autogenerated by genmsg_py from ArmNavCollObjResponse.msg. Do not edit.""" 00270 import roslib.message 00271 import struct 00272 00273 00274 class ArmNavCollObjResponse(roslib.message.Message): 00275 _md5sum = "7de7f4695a268566c2ce9ae9e3a34e73" 00276 _type = "srs_assisted_arm_navigation_msgs/ArmNavCollObjResponse" 00277 _has_header = False #flag to mark the presence of a Header object 00278 _full_text = """bool completed 00279 string msg 00280 00281 """ 00282 __slots__ = ['completed','msg'] 00283 _slot_types = ['bool','string'] 00284 00285 def __init__(self, *args, **kwds): 00286 """ 00287 Constructor. Any message fields that are implicitly/explicitly 00288 set to None will be assigned a default value. The recommend 00289 use is keyword arguments as this is more robust to future message 00290 changes. You cannot mix in-order arguments and keyword arguments. 00291 00292 The available fields are: 00293 completed,msg 00294 00295 @param args: complete set of field values, in .msg order 00296 @param kwds: use keyword arguments corresponding to message field names 00297 to set specific fields. 00298 """ 00299 if args or kwds: 00300 super(ArmNavCollObjResponse, self).__init__(*args, **kwds) 00301 #message fields cannot be None, assign default values for those that are 00302 if self.completed is None: 00303 self.completed = False 00304 if self.msg is None: 00305 self.msg = '' 00306 else: 00307 self.completed = False 00308 self.msg = '' 00309 00310 def _get_types(self): 00311 """ 00312 internal API method 00313 """ 00314 return self._slot_types 00315 00316 def serialize(self, buff): 00317 """ 00318 serialize message into buffer 00319 @param buff: buffer 00320 @type buff: StringIO 00321 """ 00322 try: 00323 buff.write(_struct_B.pack(self.completed)) 00324 _x = self.msg 00325 length = len(_x) 00326 buff.write(struct.pack('<I%ss'%length, length, _x)) 00327 except struct.error as se: self._check_types(se) 00328 except TypeError as te: self._check_types(te) 00329 00330 def deserialize(self, str): 00331 """ 00332 unpack serialized message in str into this message instance 00333 @param str: byte array of serialized message 00334 @type str: str 00335 """ 00336 try: 00337 end = 0 00338 start = end 00339 end += 1 00340 (self.completed,) = _struct_B.unpack(str[start:end]) 00341 self.completed = bool(self.completed) 00342 start = end 00343 end += 4 00344 (length,) = _struct_I.unpack(str[start:end]) 00345 start = end 00346 end += length 00347 self.msg = str[start:end] 00348 return self 00349 except struct.error as e: 00350 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00351 00352 00353 def serialize_numpy(self, buff, numpy): 00354 """ 00355 serialize message with numpy array types into buffer 00356 @param buff: buffer 00357 @type buff: StringIO 00358 @param numpy: numpy python module 00359 @type numpy module 00360 """ 00361 try: 00362 buff.write(_struct_B.pack(self.completed)) 00363 _x = self.msg 00364 length = len(_x) 00365 buff.write(struct.pack('<I%ss'%length, length, _x)) 00366 except struct.error as se: self._check_types(se) 00367 except TypeError as te: self._check_types(te) 00368 00369 def deserialize_numpy(self, str, numpy): 00370 """ 00371 unpack serialized message in str into this message instance using numpy for array types 00372 @param str: byte array of serialized message 00373 @type str: str 00374 @param numpy: numpy python module 00375 @type numpy: module 00376 """ 00377 try: 00378 end = 0 00379 start = end 00380 end += 1 00381 (self.completed,) = _struct_B.unpack(str[start:end]) 00382 self.completed = bool(self.completed) 00383 start = end 00384 end += 4 00385 (length,) = _struct_I.unpack(str[start:end]) 00386 start = end 00387 end += length 00388 self.msg = str[start:end] 00389 return self 00390 except struct.error as e: 00391 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00392 00393 _struct_I = roslib.message.struct_I 00394 _struct_B = struct.Struct("<B") 00395 class ArmNavCollObj(roslib.message.ServiceDefinition): 00396 _type = 'srs_assisted_arm_navigation_msgs/ArmNavCollObj' 00397 _md5sum = '63b0a204272b75794df041b3be314a82' 00398 _request_class = ArmNavCollObjRequest 00399 _response_class = ArmNavCollObjResponse