_AddObject.py
Go to the documentation of this file.
00001 """autogenerated by genpy from worldmodel_msgs/AddObjectRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import geometry_msgs.msg
00008 import worldmodel_msgs.msg
00009 import std_msgs.msg
00010 
00011 class AddObjectRequest(genpy.Message):
00012   _md5sum = "e8c82f515de9d91badcd349a0de2b742"
00013   _type = "worldmodel_msgs/AddObjectRequest"
00014   _has_header = False #flag to mark the presence of a Header object
00015   _full_text = """
00016 
00017 
00018 Object object
00019 
00020 
00021 bool map_to_next_obstacle
00022 
00023 ================================================================================
00024 MSG: worldmodel_msgs/Object
00025 # This message represents an estimate of an object's pose and identity.
00026 
00027 # The header.
00028 #   stamp: Timestamp of last update.
00029 #   frame_id: Coordinate frame, in which the pose is given
00030 Header header
00031 
00032 # The pose
00033 geometry_msgs/PoseWithCovariance pose
00034 
00035 # Further information about the object
00036 ObjectInfo info
00037 
00038 # The tracked state of the object
00039 ObjectState state
00040 
00041 ================================================================================
00042 MSG: std_msgs/Header
00043 # Standard metadata for higher-level stamped data types.
00044 # This is generally used to communicate timestamped data 
00045 # in a particular coordinate frame.
00046 # 
00047 # sequence ID: consecutively increasing ID 
00048 uint32 seq
00049 #Two-integer timestamp that is expressed as:
00050 # * stamp.secs: seconds (stamp_secs) since epoch
00051 # * stamp.nsecs: nanoseconds since stamp_secs
00052 # time-handling sugar is provided by the client library
00053 time stamp
00054 #Frame this data is associated with
00055 # 0: no frame
00056 # 1: global frame
00057 string frame_id
00058 
00059 ================================================================================
00060 MSG: geometry_msgs/PoseWithCovariance
00061 # This represents a pose in free space with uncertainty.
00062 
00063 Pose pose
00064 
00065 # Row-major representation of the 6x6 covariance matrix
00066 # The orientation parameters use a fixed-axis representation.
00067 # In order, the parameters are:
00068 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
00069 float64[36] covariance
00070 
00071 ================================================================================
00072 MSG: geometry_msgs/Pose
00073 # A representation of pose in free space, composed of postion and orientation. 
00074 Point position
00075 Quaternion orientation
00076 
00077 ================================================================================
00078 MSG: geometry_msgs/Point
00079 # This contains the position of a point in free space
00080 float64 x
00081 float64 y
00082 float64 z
00083 
00084 ================================================================================
00085 MSG: geometry_msgs/Quaternion
00086 # This represents an orientation in free space in quaternion form.
00087 
00088 float64 x
00089 float64 y
00090 float64 z
00091 float64 w
00092 
00093 ================================================================================
00094 MSG: worldmodel_msgs/ObjectInfo
00095 # This message contains information about the estimated class affiliation, object id and corresponding support
00096 
00097 # A string identifying the object's class (all objects of a class look the same)
00098 string class_id
00099 
00100 # A string identifying the specific object
00101 string object_id
00102 
00103 # A string that contains the name or a description of the specific object
00104 string name
00105 
00106 # The support (degree of belief) of the object's presence given as log odd ratio
00107 float32 support
00108 
00109 
00110 ================================================================================
00111 MSG: worldmodel_msgs/ObjectState
00112 # The state of an object estimate used to track
00113 # states smaller than 0 disable all updates
00114 
00115 # Predefined states. Use states smaller than 0 or bigger than 63 for user defined states.
00116 int8 UNKNOWN = 0
00117 int8 PENDING = 1
00118 int8 ACTIVE  = 2
00119 int8 INACTIVE = 3
00120 int8 CONFIRMED = -1
00121 int8 DISCARDED = -2
00122 int8 APPROACHING = -3
00123 
00124 int8 state
00125 
00126 """
00127   __slots__ = ['object','map_to_next_obstacle']
00128   _slot_types = ['worldmodel_msgs/Object','bool']
00129 
00130   def __init__(self, *args, **kwds):
00131     """
00132     Constructor. Any message fields that are implicitly/explicitly
00133     set to None will be assigned a default value. The recommend
00134     use is keyword arguments as this is more robust to future message
00135     changes.  You cannot mix in-order arguments and keyword arguments.
00136 
00137     The available fields are:
00138        object,map_to_next_obstacle
00139 
00140     :param args: complete set of field values, in .msg order
00141     :param kwds: use keyword arguments corresponding to message field names
00142     to set specific fields.
00143     """
00144     if args or kwds:
00145       super(AddObjectRequest, self).__init__(*args, **kwds)
00146       #message fields cannot be None, assign default values for those that are
00147       if self.object is None:
00148         self.object = worldmodel_msgs.msg.Object()
00149       if self.map_to_next_obstacle is None:
00150         self.map_to_next_obstacle = False
00151     else:
00152       self.object = worldmodel_msgs.msg.Object()
00153       self.map_to_next_obstacle = False
00154 
00155   def _get_types(self):
00156     """
00157     internal API method
00158     """
00159     return self._slot_types
00160 
00161   def serialize(self, buff):
00162     """
00163     serialize message into buffer
00164     :param buff: buffer, ``StringIO``
00165     """
00166     try:
00167       _x = self
00168       buff.write(_struct_3I.pack(_x.object.header.seq, _x.object.header.stamp.secs, _x.object.header.stamp.nsecs))
00169       _x = self.object.header.frame_id
00170       length = len(_x)
00171       if python3 or type(_x) == unicode:
00172         _x = _x.encode('utf-8')
00173         length = len(_x)
00174       buff.write(struct.pack('<I%ss'%length, length, _x))
00175       _x = self
00176       buff.write(_struct_7d.pack(_x.object.pose.pose.position.x, _x.object.pose.pose.position.y, _x.object.pose.pose.position.z, _x.object.pose.pose.orientation.x, _x.object.pose.pose.orientation.y, _x.object.pose.pose.orientation.z, _x.object.pose.pose.orientation.w))
00177       buff.write(_struct_36d.pack(*self.object.pose.covariance))
00178       _x = self.object.info.class_id
00179       length = len(_x)
00180       if python3 or type(_x) == unicode:
00181         _x = _x.encode('utf-8')
00182         length = len(_x)
00183       buff.write(struct.pack('<I%ss'%length, length, _x))
00184       _x = self.object.info.object_id
00185       length = len(_x)
00186       if python3 or type(_x) == unicode:
00187         _x = _x.encode('utf-8')
00188         length = len(_x)
00189       buff.write(struct.pack('<I%ss'%length, length, _x))
00190       _x = self.object.info.name
00191       length = len(_x)
00192       if python3 or type(_x) == unicode:
00193         _x = _x.encode('utf-8')
00194         length = len(_x)
00195       buff.write(struct.pack('<I%ss'%length, length, _x))
00196       _x = self
00197       buff.write(_struct_fbB.pack(_x.object.info.support, _x.object.state.state, _x.map_to_next_obstacle))
00198     except struct.error as se: self._check_types(se)
00199     except TypeError as te: self._check_types(te)
00200 
00201   def deserialize(self, str):
00202     """
00203     unpack serialized message in str into this message instance
00204     :param str: byte array of serialized message, ``str``
00205     """
00206     try:
00207       if self.object is None:
00208         self.object = worldmodel_msgs.msg.Object()
00209       end = 0
00210       _x = self
00211       start = end
00212       end += 12
00213       (_x.object.header.seq, _x.object.header.stamp.secs, _x.object.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00214       start = end
00215       end += 4
00216       (length,) = _struct_I.unpack(str[start:end])
00217       start = end
00218       end += length
00219       if python3:
00220         self.object.header.frame_id = str[start:end].decode('utf-8')
00221       else:
00222         self.object.header.frame_id = str[start:end]
00223       _x = self
00224       start = end
00225       end += 56
00226       (_x.object.pose.pose.position.x, _x.object.pose.pose.position.y, _x.object.pose.pose.position.z, _x.object.pose.pose.orientation.x, _x.object.pose.pose.orientation.y, _x.object.pose.pose.orientation.z, _x.object.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00227       start = end
00228       end += 288
00229       self.object.pose.covariance = _struct_36d.unpack(str[start:end])
00230       start = end
00231       end += 4
00232       (length,) = _struct_I.unpack(str[start:end])
00233       start = end
00234       end += length
00235       if python3:
00236         self.object.info.class_id = str[start:end].decode('utf-8')
00237       else:
00238         self.object.info.class_id = str[start:end]
00239       start = end
00240       end += 4
00241       (length,) = _struct_I.unpack(str[start:end])
00242       start = end
00243       end += length
00244       if python3:
00245         self.object.info.object_id = str[start:end].decode('utf-8')
00246       else:
00247         self.object.info.object_id = str[start:end]
00248       start = end
00249       end += 4
00250       (length,) = _struct_I.unpack(str[start:end])
00251       start = end
00252       end += length
00253       if python3:
00254         self.object.info.name = str[start:end].decode('utf-8')
00255       else:
00256         self.object.info.name = str[start:end]
00257       _x = self
00258       start = end
00259       end += 6
00260       (_x.object.info.support, _x.object.state.state, _x.map_to_next_obstacle,) = _struct_fbB.unpack(str[start:end])
00261       self.map_to_next_obstacle = bool(self.map_to_next_obstacle)
00262       return self
00263     except struct.error as e:
00264       raise genpy.DeserializationError(e) #most likely buffer underfill
00265 
00266 
00267   def serialize_numpy(self, buff, numpy):
00268     """
00269     serialize message with numpy array types into buffer
00270     :param buff: buffer, ``StringIO``
00271     :param numpy: numpy python module
00272     """
00273     try:
00274       _x = self
00275       buff.write(_struct_3I.pack(_x.object.header.seq, _x.object.header.stamp.secs, _x.object.header.stamp.nsecs))
00276       _x = self.object.header.frame_id
00277       length = len(_x)
00278       if python3 or type(_x) == unicode:
00279         _x = _x.encode('utf-8')
00280         length = len(_x)
00281       buff.write(struct.pack('<I%ss'%length, length, _x))
00282       _x = self
00283       buff.write(_struct_7d.pack(_x.object.pose.pose.position.x, _x.object.pose.pose.position.y, _x.object.pose.pose.position.z, _x.object.pose.pose.orientation.x, _x.object.pose.pose.orientation.y, _x.object.pose.pose.orientation.z, _x.object.pose.pose.orientation.w))
00284       buff.write(self.object.pose.covariance.tostring())
00285       _x = self.object.info.class_id
00286       length = len(_x)
00287       if python3 or type(_x) == unicode:
00288         _x = _x.encode('utf-8')
00289         length = len(_x)
00290       buff.write(struct.pack('<I%ss'%length, length, _x))
00291       _x = self.object.info.object_id
00292       length = len(_x)
00293       if python3 or type(_x) == unicode:
00294         _x = _x.encode('utf-8')
00295         length = len(_x)
00296       buff.write(struct.pack('<I%ss'%length, length, _x))
00297       _x = self.object.info.name
00298       length = len(_x)
00299       if python3 or type(_x) == unicode:
00300         _x = _x.encode('utf-8')
00301         length = len(_x)
00302       buff.write(struct.pack('<I%ss'%length, length, _x))
00303       _x = self
00304       buff.write(_struct_fbB.pack(_x.object.info.support, _x.object.state.state, _x.map_to_next_obstacle))
00305     except struct.error as se: self._check_types(se)
00306     except TypeError as te: self._check_types(te)
00307 
00308   def deserialize_numpy(self, str, numpy):
00309     """
00310     unpack serialized message in str into this message instance using numpy for array types
00311     :param str: byte array of serialized message, ``str``
00312     :param numpy: numpy python module
00313     """
00314     try:
00315       if self.object is None:
00316         self.object = worldmodel_msgs.msg.Object()
00317       end = 0
00318       _x = self
00319       start = end
00320       end += 12
00321       (_x.object.header.seq, _x.object.header.stamp.secs, _x.object.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00322       start = end
00323       end += 4
00324       (length,) = _struct_I.unpack(str[start:end])
00325       start = end
00326       end += length
00327       if python3:
00328         self.object.header.frame_id = str[start:end].decode('utf-8')
00329       else:
00330         self.object.header.frame_id = str[start:end]
00331       _x = self
00332       start = end
00333       end += 56
00334       (_x.object.pose.pose.position.x, _x.object.pose.pose.position.y, _x.object.pose.pose.position.z, _x.object.pose.pose.orientation.x, _x.object.pose.pose.orientation.y, _x.object.pose.pose.orientation.z, _x.object.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00335       start = end
00336       end += 288
00337       self.object.pose.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00338       start = end
00339       end += 4
00340       (length,) = _struct_I.unpack(str[start:end])
00341       start = end
00342       end += length
00343       if python3:
00344         self.object.info.class_id = str[start:end].decode('utf-8')
00345       else:
00346         self.object.info.class_id = str[start:end]
00347       start = end
00348       end += 4
00349       (length,) = _struct_I.unpack(str[start:end])
00350       start = end
00351       end += length
00352       if python3:
00353         self.object.info.object_id = str[start:end].decode('utf-8')
00354       else:
00355         self.object.info.object_id = str[start:end]
00356       start = end
00357       end += 4
00358       (length,) = _struct_I.unpack(str[start:end])
00359       start = end
00360       end += length
00361       if python3:
00362         self.object.info.name = str[start:end].decode('utf-8')
00363       else:
00364         self.object.info.name = str[start:end]
00365       _x = self
00366       start = end
00367       end += 6
00368       (_x.object.info.support, _x.object.state.state, _x.map_to_next_obstacle,) = _struct_fbB.unpack(str[start:end])
00369       self.map_to_next_obstacle = bool(self.map_to_next_obstacle)
00370       return self
00371     except struct.error as e:
00372       raise genpy.DeserializationError(e) #most likely buffer underfill
00373 
00374 _struct_I = genpy.struct_I
00375 _struct_fbB = struct.Struct("<fbB")
00376 _struct_3I = struct.Struct("<3I")
00377 _struct_7d = struct.Struct("<7d")
00378 _struct_36d = struct.Struct("<36d")
00379 """autogenerated by genpy from worldmodel_msgs/AddObjectResponse.msg. Do not edit."""
00380 import sys
00381 python3 = True if sys.hexversion > 0x03000000 else False
00382 import genpy
00383 import struct
00384 
00385 import geometry_msgs.msg
00386 import worldmodel_msgs.msg
00387 import std_msgs.msg
00388 
00389 class AddObjectResponse(genpy.Message):
00390   _md5sum = "45a6d744054ce4dbd66f71ccfdc20273"
00391   _type = "worldmodel_msgs/AddObjectResponse"
00392   _has_header = False #flag to mark the presence of a Header object
00393   _full_text = """
00394 Object object
00395 
00396 
00397 ================================================================================
00398 MSG: worldmodel_msgs/Object
00399 # This message represents an estimate of an object's pose and identity.
00400 
00401 # The header.
00402 #   stamp: Timestamp of last update.
00403 #   frame_id: Coordinate frame, in which the pose is given
00404 Header header
00405 
00406 # The pose
00407 geometry_msgs/PoseWithCovariance pose
00408 
00409 # Further information about the object
00410 ObjectInfo info
00411 
00412 # The tracked state of the object
00413 ObjectState state
00414 
00415 ================================================================================
00416 MSG: std_msgs/Header
00417 # Standard metadata for higher-level stamped data types.
00418 # This is generally used to communicate timestamped data 
00419 # in a particular coordinate frame.
00420 # 
00421 # sequence ID: consecutively increasing ID 
00422 uint32 seq
00423 #Two-integer timestamp that is expressed as:
00424 # * stamp.secs: seconds (stamp_secs) since epoch
00425 # * stamp.nsecs: nanoseconds since stamp_secs
00426 # time-handling sugar is provided by the client library
00427 time stamp
00428 #Frame this data is associated with
00429 # 0: no frame
00430 # 1: global frame
00431 string frame_id
00432 
00433 ================================================================================
00434 MSG: geometry_msgs/PoseWithCovariance
00435 # This represents a pose in free space with uncertainty.
00436 
00437 Pose pose
00438 
00439 # Row-major representation of the 6x6 covariance matrix
00440 # The orientation parameters use a fixed-axis representation.
00441 # In order, the parameters are:
00442 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
00443 float64[36] covariance
00444 
00445 ================================================================================
00446 MSG: geometry_msgs/Pose
00447 # A representation of pose in free space, composed of postion and orientation. 
00448 Point position
00449 Quaternion orientation
00450 
00451 ================================================================================
00452 MSG: geometry_msgs/Point
00453 # This contains the position of a point in free space
00454 float64 x
00455 float64 y
00456 float64 z
00457 
00458 ================================================================================
00459 MSG: geometry_msgs/Quaternion
00460 # This represents an orientation in free space in quaternion form.
00461 
00462 float64 x
00463 float64 y
00464 float64 z
00465 float64 w
00466 
00467 ================================================================================
00468 MSG: worldmodel_msgs/ObjectInfo
00469 # This message contains information about the estimated class affiliation, object id and corresponding support
00470 
00471 # A string identifying the object's class (all objects of a class look the same)
00472 string class_id
00473 
00474 # A string identifying the specific object
00475 string object_id
00476 
00477 # A string that contains the name or a description of the specific object
00478 string name
00479 
00480 # The support (degree of belief) of the object's presence given as log odd ratio
00481 float32 support
00482 
00483 
00484 ================================================================================
00485 MSG: worldmodel_msgs/ObjectState
00486 # The state of an object estimate used to track
00487 # states smaller than 0 disable all updates
00488 
00489 # Predefined states. Use states smaller than 0 or bigger than 63 for user defined states.
00490 int8 UNKNOWN = 0
00491 int8 PENDING = 1
00492 int8 ACTIVE  = 2
00493 int8 INACTIVE = 3
00494 int8 CONFIRMED = -1
00495 int8 DISCARDED = -2
00496 int8 APPROACHING = -3
00497 
00498 int8 state
00499 
00500 """
00501   __slots__ = ['object']
00502   _slot_types = ['worldmodel_msgs/Object']
00503 
00504   def __init__(self, *args, **kwds):
00505     """
00506     Constructor. Any message fields that are implicitly/explicitly
00507     set to None will be assigned a default value. The recommend
00508     use is keyword arguments as this is more robust to future message
00509     changes.  You cannot mix in-order arguments and keyword arguments.
00510 
00511     The available fields are:
00512        object
00513 
00514     :param args: complete set of field values, in .msg order
00515     :param kwds: use keyword arguments corresponding to message field names
00516     to set specific fields.
00517     """
00518     if args or kwds:
00519       super(AddObjectResponse, self).__init__(*args, **kwds)
00520       #message fields cannot be None, assign default values for those that are
00521       if self.object is None:
00522         self.object = worldmodel_msgs.msg.Object()
00523     else:
00524       self.object = worldmodel_msgs.msg.Object()
00525 
00526   def _get_types(self):
00527     """
00528     internal API method
00529     """
00530     return self._slot_types
00531 
00532   def serialize(self, buff):
00533     """
00534     serialize message into buffer
00535     :param buff: buffer, ``StringIO``
00536     """
00537     try:
00538       _x = self
00539       buff.write(_struct_3I.pack(_x.object.header.seq, _x.object.header.stamp.secs, _x.object.header.stamp.nsecs))
00540       _x = self.object.header.frame_id
00541       length = len(_x)
00542       if python3 or type(_x) == unicode:
00543         _x = _x.encode('utf-8')
00544         length = len(_x)
00545       buff.write(struct.pack('<I%ss'%length, length, _x))
00546       _x = self
00547       buff.write(_struct_7d.pack(_x.object.pose.pose.position.x, _x.object.pose.pose.position.y, _x.object.pose.pose.position.z, _x.object.pose.pose.orientation.x, _x.object.pose.pose.orientation.y, _x.object.pose.pose.orientation.z, _x.object.pose.pose.orientation.w))
00548       buff.write(_struct_36d.pack(*self.object.pose.covariance))
00549       _x = self.object.info.class_id
00550       length = len(_x)
00551       if python3 or type(_x) == unicode:
00552         _x = _x.encode('utf-8')
00553         length = len(_x)
00554       buff.write(struct.pack('<I%ss'%length, length, _x))
00555       _x = self.object.info.object_id
00556       length = len(_x)
00557       if python3 or type(_x) == unicode:
00558         _x = _x.encode('utf-8')
00559         length = len(_x)
00560       buff.write(struct.pack('<I%ss'%length, length, _x))
00561       _x = self.object.info.name
00562       length = len(_x)
00563       if python3 or type(_x) == unicode:
00564         _x = _x.encode('utf-8')
00565         length = len(_x)
00566       buff.write(struct.pack('<I%ss'%length, length, _x))
00567       _x = self
00568       buff.write(_struct_fb.pack(_x.object.info.support, _x.object.state.state))
00569     except struct.error as se: self._check_types(se)
00570     except TypeError as te: self._check_types(te)
00571 
00572   def deserialize(self, str):
00573     """
00574     unpack serialized message in str into this message instance
00575     :param str: byte array of serialized message, ``str``
00576     """
00577     try:
00578       if self.object is None:
00579         self.object = worldmodel_msgs.msg.Object()
00580       end = 0
00581       _x = self
00582       start = end
00583       end += 12
00584       (_x.object.header.seq, _x.object.header.stamp.secs, _x.object.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00585       start = end
00586       end += 4
00587       (length,) = _struct_I.unpack(str[start:end])
00588       start = end
00589       end += length
00590       if python3:
00591         self.object.header.frame_id = str[start:end].decode('utf-8')
00592       else:
00593         self.object.header.frame_id = str[start:end]
00594       _x = self
00595       start = end
00596       end += 56
00597       (_x.object.pose.pose.position.x, _x.object.pose.pose.position.y, _x.object.pose.pose.position.z, _x.object.pose.pose.orientation.x, _x.object.pose.pose.orientation.y, _x.object.pose.pose.orientation.z, _x.object.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00598       start = end
00599       end += 288
00600       self.object.pose.covariance = _struct_36d.unpack(str[start:end])
00601       start = end
00602       end += 4
00603       (length,) = _struct_I.unpack(str[start:end])
00604       start = end
00605       end += length
00606       if python3:
00607         self.object.info.class_id = str[start:end].decode('utf-8')
00608       else:
00609         self.object.info.class_id = str[start:end]
00610       start = end
00611       end += 4
00612       (length,) = _struct_I.unpack(str[start:end])
00613       start = end
00614       end += length
00615       if python3:
00616         self.object.info.object_id = str[start:end].decode('utf-8')
00617       else:
00618         self.object.info.object_id = str[start:end]
00619       start = end
00620       end += 4
00621       (length,) = _struct_I.unpack(str[start:end])
00622       start = end
00623       end += length
00624       if python3:
00625         self.object.info.name = str[start:end].decode('utf-8')
00626       else:
00627         self.object.info.name = str[start:end]
00628       _x = self
00629       start = end
00630       end += 5
00631       (_x.object.info.support, _x.object.state.state,) = _struct_fb.unpack(str[start:end])
00632       return self
00633     except struct.error as e:
00634       raise genpy.DeserializationError(e) #most likely buffer underfill
00635 
00636 
00637   def serialize_numpy(self, buff, numpy):
00638     """
00639     serialize message with numpy array types into buffer
00640     :param buff: buffer, ``StringIO``
00641     :param numpy: numpy python module
00642     """
00643     try:
00644       _x = self
00645       buff.write(_struct_3I.pack(_x.object.header.seq, _x.object.header.stamp.secs, _x.object.header.stamp.nsecs))
00646       _x = self.object.header.frame_id
00647       length = len(_x)
00648       if python3 or type(_x) == unicode:
00649         _x = _x.encode('utf-8')
00650         length = len(_x)
00651       buff.write(struct.pack('<I%ss'%length, length, _x))
00652       _x = self
00653       buff.write(_struct_7d.pack(_x.object.pose.pose.position.x, _x.object.pose.pose.position.y, _x.object.pose.pose.position.z, _x.object.pose.pose.orientation.x, _x.object.pose.pose.orientation.y, _x.object.pose.pose.orientation.z, _x.object.pose.pose.orientation.w))
00654       buff.write(self.object.pose.covariance.tostring())
00655       _x = self.object.info.class_id
00656       length = len(_x)
00657       if python3 or type(_x) == unicode:
00658         _x = _x.encode('utf-8')
00659         length = len(_x)
00660       buff.write(struct.pack('<I%ss'%length, length, _x))
00661       _x = self.object.info.object_id
00662       length = len(_x)
00663       if python3 or type(_x) == unicode:
00664         _x = _x.encode('utf-8')
00665         length = len(_x)
00666       buff.write(struct.pack('<I%ss'%length, length, _x))
00667       _x = self.object.info.name
00668       length = len(_x)
00669       if python3 or type(_x) == unicode:
00670         _x = _x.encode('utf-8')
00671         length = len(_x)
00672       buff.write(struct.pack('<I%ss'%length, length, _x))
00673       _x = self
00674       buff.write(_struct_fb.pack(_x.object.info.support, _x.object.state.state))
00675     except struct.error as se: self._check_types(se)
00676     except TypeError as te: self._check_types(te)
00677 
00678   def deserialize_numpy(self, str, numpy):
00679     """
00680     unpack serialized message in str into this message instance using numpy for array types
00681     :param str: byte array of serialized message, ``str``
00682     :param numpy: numpy python module
00683     """
00684     try:
00685       if self.object is None:
00686         self.object = worldmodel_msgs.msg.Object()
00687       end = 0
00688       _x = self
00689       start = end
00690       end += 12
00691       (_x.object.header.seq, _x.object.header.stamp.secs, _x.object.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00692       start = end
00693       end += 4
00694       (length,) = _struct_I.unpack(str[start:end])
00695       start = end
00696       end += length
00697       if python3:
00698         self.object.header.frame_id = str[start:end].decode('utf-8')
00699       else:
00700         self.object.header.frame_id = str[start:end]
00701       _x = self
00702       start = end
00703       end += 56
00704       (_x.object.pose.pose.position.x, _x.object.pose.pose.position.y, _x.object.pose.pose.position.z, _x.object.pose.pose.orientation.x, _x.object.pose.pose.orientation.y, _x.object.pose.pose.orientation.z, _x.object.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00705       start = end
00706       end += 288
00707       self.object.pose.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00708       start = end
00709       end += 4
00710       (length,) = _struct_I.unpack(str[start:end])
00711       start = end
00712       end += length
00713       if python3:
00714         self.object.info.class_id = str[start:end].decode('utf-8')
00715       else:
00716         self.object.info.class_id = str[start:end]
00717       start = end
00718       end += 4
00719       (length,) = _struct_I.unpack(str[start:end])
00720       start = end
00721       end += length
00722       if python3:
00723         self.object.info.object_id = str[start:end].decode('utf-8')
00724       else:
00725         self.object.info.object_id = str[start:end]
00726       start = end
00727       end += 4
00728       (length,) = _struct_I.unpack(str[start:end])
00729       start = end
00730       end += length
00731       if python3:
00732         self.object.info.name = str[start:end].decode('utf-8')
00733       else:
00734         self.object.info.name = str[start:end]
00735       _x = self
00736       start = end
00737       end += 5
00738       (_x.object.info.support, _x.object.state.state,) = _struct_fb.unpack(str[start:end])
00739       return self
00740     except struct.error as e:
00741       raise genpy.DeserializationError(e) #most likely buffer underfill
00742 
00743 _struct_I = genpy.struct_I
00744 _struct_fb = struct.Struct("<fb")
00745 _struct_3I = struct.Struct("<3I")
00746 _struct_7d = struct.Struct("<7d")
00747 _struct_36d = struct.Struct("<36d")
00748 class AddObject(object):
00749   _type          = 'worldmodel_msgs/AddObject'
00750   _md5sum = '3fb8af17854d0a0aa1df05f91f7ba459'
00751   _request_class  = AddObjectRequest
00752   _response_class = AddObjectResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


worldmodel_msgs
Author(s): Johannes Meyer
autogenerated on Mon Jul 15 2013 16:50:40