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