00001 """autogenerated by genmsg_py from DoorsDetectorRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import std_msgs.msg
00007 import door_msgs.msg
00008
00009 class DoorsDetectorRequest(roslib.message.Message):
00010 _md5sum = "72afb754afb6ff619fa1a692675498c0"
00011 _type = "door_handle_detector/DoorsDetectorRequest"
00012 _has_header = False
00013 _full_text = """door_msgs/Door door
00014
00015 ================================================================================
00016 MSG: door_msgs/Door
00017 Header header
00018 geometry_msgs/Point32 frame_p1 ## position of the door frame
00019 geometry_msgs/Point32 frame_p2 ## position of the door frame
00020 geometry_msgs/Point32 door_p1 ## Ground plane projection of a point on the plane of the door
00021 geometry_msgs/Point32 door_p2 ## Ground plane projection of a point on the plane of the door
00022 geometry_msgs/Point32 handle ## Position of the door handle
00023 float32 height ## Height of the door
00024
00025 int32 UNKNOWN=0
00026
00027 int32 HINGE_P1=1
00028 int32 HINGE_P2=2
00029 int32 hinge
00030
00031 int32 ROT_DIR_CLOCKWISE=1
00032 int32 ROT_DIR_COUNTERCLOCKWISE=2
00033 int32 rot_dir
00034
00035 int32 LOCKED=1
00036 int32 LATCHED=2
00037 int32 UNLATCHED=3
00038 int32 latch_state
00039
00040 geometry_msgs/Vector3 travel_dir ## vector pointing in the direction the robot is going to travel through the door
00041 float32 weight ## @Sachin: what do we use this for?
00042
00043
00044
00045 ================================================================================
00046 MSG: std_msgs/Header
00047 # Standard metadata for higher-level stamped data types.
00048 # This is generally used to communicate timestamped data
00049 # in a particular coordinate frame.
00050 #
00051 # sequence ID: consecutively increasing ID
00052 uint32 seq
00053 #Two-integer timestamp that is expressed as:
00054 # * stamp.secs: seconds (stamp_secs) since epoch
00055 # * stamp.nsecs: nanoseconds since stamp_secs
00056 # time-handling sugar is provided by the client library
00057 time stamp
00058 #Frame this data is associated with
00059 # 0: no frame
00060 # 1: global frame
00061 string frame_id
00062
00063 ================================================================================
00064 MSG: geometry_msgs/Point32
00065 # This contains the position of a point in free space(with 32 bits of precision).
00066 # It is recommeded to use Point wherever possible instead of Point32.
00067 #
00068 # This recommendation is to promote interoperability.
00069 #
00070 # This message is designed to take up less space when sending
00071 # lots of points at once, as in the case of a PointCloud.
00072
00073 float32 x
00074 float32 y
00075 float32 z
00076 ================================================================================
00077 MSG: geometry_msgs/Vector3
00078 # This represents a vector in free space.
00079
00080 float64 x
00081 float64 y
00082 float64 z
00083 """
00084 __slots__ = ['door']
00085 _slot_types = ['door_msgs/Door']
00086
00087 def __init__(self, *args, **kwds):
00088 """
00089 Constructor. Any message fields that are implicitly/explicitly
00090 set to None will be assigned a default value. The recommend
00091 use is keyword arguments as this is more robust to future message
00092 changes. You cannot mix in-order arguments and keyword arguments.
00093
00094 The available fields are:
00095 door
00096
00097 @param args: complete set of field values, in .msg order
00098 @param kwds: use keyword arguments corresponding to message field names
00099 to set specific fields.
00100 """
00101 if args or kwds:
00102 super(DoorsDetectorRequest, self).__init__(*args, **kwds)
00103
00104 if self.door is None:
00105 self.door = door_msgs.msg.Door()
00106 else:
00107 self.door = door_msgs.msg.Door()
00108
00109 def _get_types(self):
00110 """
00111 internal API method
00112 """
00113 return self._slot_types
00114
00115 def serialize(self, buff):
00116 """
00117 serialize message into buffer
00118 @param buff: buffer
00119 @type buff: StringIO
00120 """
00121 try:
00122 _x = self
00123 buff.write(_struct_3I.pack(_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs))
00124 _x = self.door.header.frame_id
00125 length = len(_x)
00126 buff.write(struct.pack('<I%ss'%length, length, _x))
00127 _x = self
00128 buff.write(_struct_16f3i3df.pack(_x.door.frame_p1.x, _x.door.frame_p1.y, _x.door.frame_p1.z, _x.door.frame_p2.x, _x.door.frame_p2.y, _x.door.frame_p2.z, _x.door.door_p1.x, _x.door.door_p1.y, _x.door.door_p1.z, _x.door.door_p2.x, _x.door.door_p2.y, _x.door.door_p2.z, _x.door.handle.x, _x.door.handle.y, _x.door.handle.z, _x.door.height, _x.door.hinge, _x.door.rot_dir, _x.door.latch_state, _x.door.travel_dir.x, _x.door.travel_dir.y, _x.door.travel_dir.z, _x.door.weight))
00129 except struct.error, se: self._check_types(se)
00130 except TypeError, te: self._check_types(te)
00131
00132 def deserialize(self, str):
00133 """
00134 unpack serialized message in str into this message instance
00135 @param str: byte array of serialized message
00136 @type str: str
00137 """
00138 try:
00139 if self.door is None:
00140 self.door = door_msgs.msg.Door()
00141 end = 0
00142 _x = self
00143 start = end
00144 end += 12
00145 (_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs,) = _struct_3I.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.door.header.frame_id = str[start:end]
00152 _x = self
00153 start = end
00154 end += 104
00155 (_x.door.frame_p1.x, _x.door.frame_p1.y, _x.door.frame_p1.z, _x.door.frame_p2.x, _x.door.frame_p2.y, _x.door.frame_p2.z, _x.door.door_p1.x, _x.door.door_p1.y, _x.door.door_p1.z, _x.door.door_p2.x, _x.door.door_p2.y, _x.door.door_p2.z, _x.door.handle.x, _x.door.handle.y, _x.door.handle.z, _x.door.height, _x.door.hinge, _x.door.rot_dir, _x.door.latch_state, _x.door.travel_dir.x, _x.door.travel_dir.y, _x.door.travel_dir.z, _x.door.weight,) = _struct_16f3i3df.unpack(str[start:end])
00156 return self
00157 except struct.error, e:
00158 raise roslib.message.DeserializationError(e)
00159
00160
00161 def serialize_numpy(self, buff, numpy):
00162 """
00163 serialize message with numpy array types into buffer
00164 @param buff: buffer
00165 @type buff: StringIO
00166 @param numpy: numpy python module
00167 @type numpy module
00168 """
00169 try:
00170 _x = self
00171 buff.write(_struct_3I.pack(_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs))
00172 _x = self.door.header.frame_id
00173 length = len(_x)
00174 buff.write(struct.pack('<I%ss'%length, length, _x))
00175 _x = self
00176 buff.write(_struct_16f3i3df.pack(_x.door.frame_p1.x, _x.door.frame_p1.y, _x.door.frame_p1.z, _x.door.frame_p2.x, _x.door.frame_p2.y, _x.door.frame_p2.z, _x.door.door_p1.x, _x.door.door_p1.y, _x.door.door_p1.z, _x.door.door_p2.x, _x.door.door_p2.y, _x.door.door_p2.z, _x.door.handle.x, _x.door.handle.y, _x.door.handle.z, _x.door.height, _x.door.hinge, _x.door.rot_dir, _x.door.latch_state, _x.door.travel_dir.x, _x.door.travel_dir.y, _x.door.travel_dir.z, _x.door.weight))
00177 except struct.error, se: self._check_types(se)
00178 except TypeError, te: self._check_types(te)
00179
00180 def deserialize_numpy(self, str, numpy):
00181 """
00182 unpack serialized message in str into this message instance using numpy for array types
00183 @param str: byte array of serialized message
00184 @type str: str
00185 @param numpy: numpy python module
00186 @type numpy: module
00187 """
00188 try:
00189 if self.door is None:
00190 self.door = door_msgs.msg.Door()
00191 end = 0
00192 _x = self
00193 start = end
00194 end += 12
00195 (_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00196 start = end
00197 end += 4
00198 (length,) = _struct_I.unpack(str[start:end])
00199 start = end
00200 end += length
00201 self.door.header.frame_id = str[start:end]
00202 _x = self
00203 start = end
00204 end += 104
00205 (_x.door.frame_p1.x, _x.door.frame_p1.y, _x.door.frame_p1.z, _x.door.frame_p2.x, _x.door.frame_p2.y, _x.door.frame_p2.z, _x.door.door_p1.x, _x.door.door_p1.y, _x.door.door_p1.z, _x.door.door_p2.x, _x.door.door_p2.y, _x.door.door_p2.z, _x.door.handle.x, _x.door.handle.y, _x.door.handle.z, _x.door.height, _x.door.hinge, _x.door.rot_dir, _x.door.latch_state, _x.door.travel_dir.x, _x.door.travel_dir.y, _x.door.travel_dir.z, _x.door.weight,) = _struct_16f3i3df.unpack(str[start:end])
00206 return self
00207 except struct.error, e:
00208 raise roslib.message.DeserializationError(e)
00209
00210 _struct_I = roslib.message.struct_I
00211 _struct_3I = struct.Struct("<3I")
00212 _struct_16f3i3df = struct.Struct("<16f3i3df")
00213 """autogenerated by genmsg_py from DoorsDetectorResponse.msg. Do not edit."""
00214 import roslib.message
00215 import struct
00216
00217 import geometry_msgs.msg
00218 import std_msgs.msg
00219 import door_msgs.msg
00220
00221 class DoorsDetectorResponse(roslib.message.Message):
00222 _md5sum = "814c1a77e8c0b7c5b3832dabceff607d"
00223 _type = "door_handle_detector/DoorsDetectorResponse"
00224 _has_header = False
00225 _full_text = """door_msgs/Door[] doors
00226
00227
00228 ================================================================================
00229 MSG: door_msgs/Door
00230 Header header
00231 geometry_msgs/Point32 frame_p1 ## position of the door frame
00232 geometry_msgs/Point32 frame_p2 ## position of the door frame
00233 geometry_msgs/Point32 door_p1 ## Ground plane projection of a point on the plane of the door
00234 geometry_msgs/Point32 door_p2 ## Ground plane projection of a point on the plane of the door
00235 geometry_msgs/Point32 handle ## Position of the door handle
00236 float32 height ## Height of the door
00237
00238 int32 UNKNOWN=0
00239
00240 int32 HINGE_P1=1
00241 int32 HINGE_P2=2
00242 int32 hinge
00243
00244 int32 ROT_DIR_CLOCKWISE=1
00245 int32 ROT_DIR_COUNTERCLOCKWISE=2
00246 int32 rot_dir
00247
00248 int32 LOCKED=1
00249 int32 LATCHED=2
00250 int32 UNLATCHED=3
00251 int32 latch_state
00252
00253 geometry_msgs/Vector3 travel_dir ## vector pointing in the direction the robot is going to travel through the door
00254 float32 weight ## @Sachin: what do we use this for?
00255
00256
00257
00258 ================================================================================
00259 MSG: std_msgs/Header
00260 # Standard metadata for higher-level stamped data types.
00261 # This is generally used to communicate timestamped data
00262 # in a particular coordinate frame.
00263 #
00264 # sequence ID: consecutively increasing ID
00265 uint32 seq
00266 #Two-integer timestamp that is expressed as:
00267 # * stamp.secs: seconds (stamp_secs) since epoch
00268 # * stamp.nsecs: nanoseconds since stamp_secs
00269 # time-handling sugar is provided by the client library
00270 time stamp
00271 #Frame this data is associated with
00272 # 0: no frame
00273 # 1: global frame
00274 string frame_id
00275
00276 ================================================================================
00277 MSG: geometry_msgs/Point32
00278 # This contains the position of a point in free space(with 32 bits of precision).
00279 # It is recommeded to use Point wherever possible instead of Point32.
00280 #
00281 # This recommendation is to promote interoperability.
00282 #
00283 # This message is designed to take up less space when sending
00284 # lots of points at once, as in the case of a PointCloud.
00285
00286 float32 x
00287 float32 y
00288 float32 z
00289 ================================================================================
00290 MSG: geometry_msgs/Vector3
00291 # This represents a vector in free space.
00292
00293 float64 x
00294 float64 y
00295 float64 z
00296 """
00297 __slots__ = ['doors']
00298 _slot_types = ['door_msgs/Door[]']
00299
00300 def __init__(self, *args, **kwds):
00301 """
00302 Constructor. Any message fields that are implicitly/explicitly
00303 set to None will be assigned a default value. The recommend
00304 use is keyword arguments as this is more robust to future message
00305 changes. You cannot mix in-order arguments and keyword arguments.
00306
00307 The available fields are:
00308 doors
00309
00310 @param args: complete set of field values, in .msg order
00311 @param kwds: use keyword arguments corresponding to message field names
00312 to set specific fields.
00313 """
00314 if args or kwds:
00315 super(DoorsDetectorResponse, self).__init__(*args, **kwds)
00316
00317 if self.doors is None:
00318 self.doors = []
00319 else:
00320 self.doors = []
00321
00322 def _get_types(self):
00323 """
00324 internal API method
00325 """
00326 return self._slot_types
00327
00328 def serialize(self, buff):
00329 """
00330 serialize message into buffer
00331 @param buff: buffer
00332 @type buff: StringIO
00333 """
00334 try:
00335 length = len(self.doors)
00336 buff.write(_struct_I.pack(length))
00337 for val1 in self.doors:
00338 _v1 = val1.header
00339 buff.write(_struct_I.pack(_v1.seq))
00340 _v2 = _v1.stamp
00341 _x = _v2
00342 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00343 _x = _v1.frame_id
00344 length = len(_x)
00345 buff.write(struct.pack('<I%ss'%length, length, _x))
00346 _v3 = val1.frame_p1
00347 _x = _v3
00348 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00349 _v4 = val1.frame_p2
00350 _x = _v4
00351 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00352 _v5 = val1.door_p1
00353 _x = _v5
00354 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00355 _v6 = val1.door_p2
00356 _x = _v6
00357 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00358 _v7 = val1.handle
00359 _x = _v7
00360 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00361 _x = val1
00362 buff.write(_struct_f3i.pack(_x.height, _x.hinge, _x.rot_dir, _x.latch_state))
00363 _v8 = val1.travel_dir
00364 _x = _v8
00365 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00366 buff.write(_struct_f.pack(val1.weight))
00367 except struct.error, se: self._check_types(se)
00368 except TypeError, te: self._check_types(te)
00369
00370 def deserialize(self, str):
00371 """
00372 unpack serialized message in str into this message instance
00373 @param str: byte array of serialized message
00374 @type str: str
00375 """
00376 try:
00377 end = 0
00378 start = end
00379 end += 4
00380 (length,) = _struct_I.unpack(str[start:end])
00381 self.doors = []
00382 for i in xrange(0, length):
00383 val1 = door_msgs.msg.Door()
00384 _v9 = val1.header
00385 start = end
00386 end += 4
00387 (_v9.seq,) = _struct_I.unpack(str[start:end])
00388 _v10 = _v9.stamp
00389 _x = _v10
00390 start = end
00391 end += 8
00392 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00393 start = end
00394 end += 4
00395 (length,) = _struct_I.unpack(str[start:end])
00396 start = end
00397 end += length
00398 _v9.frame_id = str[start:end]
00399 _v11 = val1.frame_p1
00400 _x = _v11
00401 start = end
00402 end += 12
00403 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00404 _v12 = val1.frame_p2
00405 _x = _v12
00406 start = end
00407 end += 12
00408 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00409 _v13 = val1.door_p1
00410 _x = _v13
00411 start = end
00412 end += 12
00413 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00414 _v14 = val1.door_p2
00415 _x = _v14
00416 start = end
00417 end += 12
00418 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00419 _v15 = val1.handle
00420 _x = _v15
00421 start = end
00422 end += 12
00423 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00424 _x = val1
00425 start = end
00426 end += 16
00427 (_x.height, _x.hinge, _x.rot_dir, _x.latch_state,) = _struct_f3i.unpack(str[start:end])
00428 _v16 = val1.travel_dir
00429 _x = _v16
00430 start = end
00431 end += 24
00432 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00433 start = end
00434 end += 4
00435 (val1.weight,) = _struct_f.unpack(str[start:end])
00436 self.doors.append(val1)
00437 return self
00438 except struct.error, e:
00439 raise roslib.message.DeserializationError(e)
00440
00441
00442 def serialize_numpy(self, buff, numpy):
00443 """
00444 serialize message with numpy array types into buffer
00445 @param buff: buffer
00446 @type buff: StringIO
00447 @param numpy: numpy python module
00448 @type numpy module
00449 """
00450 try:
00451 length = len(self.doors)
00452 buff.write(_struct_I.pack(length))
00453 for val1 in self.doors:
00454 _v17 = val1.header
00455 buff.write(_struct_I.pack(_v17.seq))
00456 _v18 = _v17.stamp
00457 _x = _v18
00458 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00459 _x = _v17.frame_id
00460 length = len(_x)
00461 buff.write(struct.pack('<I%ss'%length, length, _x))
00462 _v19 = val1.frame_p1
00463 _x = _v19
00464 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00465 _v20 = val1.frame_p2
00466 _x = _v20
00467 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00468 _v21 = val1.door_p1
00469 _x = _v21
00470 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00471 _v22 = val1.door_p2
00472 _x = _v22
00473 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00474 _v23 = val1.handle
00475 _x = _v23
00476 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00477 _x = val1
00478 buff.write(_struct_f3i.pack(_x.height, _x.hinge, _x.rot_dir, _x.latch_state))
00479 _v24 = val1.travel_dir
00480 _x = _v24
00481 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00482 buff.write(_struct_f.pack(val1.weight))
00483 except struct.error, se: self._check_types(se)
00484 except TypeError, te: self._check_types(te)
00485
00486 def deserialize_numpy(self, str, numpy):
00487 """
00488 unpack serialized message in str into this message instance using numpy for array types
00489 @param str: byte array of serialized message
00490 @type str: str
00491 @param numpy: numpy python module
00492 @type numpy: module
00493 """
00494 try:
00495 end = 0
00496 start = end
00497 end += 4
00498 (length,) = _struct_I.unpack(str[start:end])
00499 self.doors = []
00500 for i in xrange(0, length):
00501 val1 = door_msgs.msg.Door()
00502 _v25 = val1.header
00503 start = end
00504 end += 4
00505 (_v25.seq,) = _struct_I.unpack(str[start:end])
00506 _v26 = _v25.stamp
00507 _x = _v26
00508 start = end
00509 end += 8
00510 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00511 start = end
00512 end += 4
00513 (length,) = _struct_I.unpack(str[start:end])
00514 start = end
00515 end += length
00516 _v25.frame_id = str[start:end]
00517 _v27 = val1.frame_p1
00518 _x = _v27
00519 start = end
00520 end += 12
00521 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00522 _v28 = val1.frame_p2
00523 _x = _v28
00524 start = end
00525 end += 12
00526 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00527 _v29 = val1.door_p1
00528 _x = _v29
00529 start = end
00530 end += 12
00531 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00532 _v30 = val1.door_p2
00533 _x = _v30
00534 start = end
00535 end += 12
00536 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00537 _v31 = val1.handle
00538 _x = _v31
00539 start = end
00540 end += 12
00541 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00542 _x = val1
00543 start = end
00544 end += 16
00545 (_x.height, _x.hinge, _x.rot_dir, _x.latch_state,) = _struct_f3i.unpack(str[start:end])
00546 _v32 = val1.travel_dir
00547 _x = _v32
00548 start = end
00549 end += 24
00550 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00551 start = end
00552 end += 4
00553 (val1.weight,) = _struct_f.unpack(str[start:end])
00554 self.doors.append(val1)
00555 return self
00556 except struct.error, e:
00557 raise roslib.message.DeserializationError(e)
00558
00559 _struct_I = roslib.message.struct_I
00560 _struct_f = struct.Struct("<f")
00561 _struct_f3i = struct.Struct("<f3i")
00562 _struct_3f = struct.Struct("<3f")
00563 _struct_2I = struct.Struct("<2I")
00564 _struct_3d = struct.Struct("<3d")
00565 class DoorsDetector(roslib.message.ServiceDefinition):
00566 _type = 'door_handle_detector/DoorsDetector'
00567 _md5sum = '46040a30211c7ba5ce5105a2fbcfa5de'
00568 _request_class = DoorsDetectorRequest
00569 _response_class = DoorsDetectorResponse