_ObjectSegmentationGuiActionResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from interactive_perception_msgs/ObjectSegmentationGuiActionResult.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 tabletop_object_detector.msg
00008 import interactive_perception_msgs.msg
00009 import actionlib_msgs.msg
00010 import geometry_msgs.msg
00011 import shape_msgs.msg
00012 import sensor_msgs.msg
00013 import genpy
00014 import std_msgs.msg
00015 
00016 class ObjectSegmentationGuiActionResult(genpy.Message):
00017   _md5sum = "e9395f60f386a384a20f11e7d1bf8293"
00018   _type = "interactive_perception_msgs/ObjectSegmentationGuiActionResult"
00019   _has_header = True #flag to mark the presence of a Header object
00020   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00021 
00022 Header header
00023 actionlib_msgs/GoalStatus status
00024 ObjectSegmentationGuiResult result
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: actionlib_msgs/GoalStatus
00046 GoalID goal_id
00047 uint8 status
00048 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00049 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00050 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00051                             #   and has since completed its execution (Terminal State)
00052 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00053 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00054                             #    to some failure (Terminal State)
00055 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00056                             #    because the goal was unattainable or invalid (Terminal State)
00057 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00058                             #    and has not yet completed execution
00059 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00060                             #    but the action server has not yet confirmed that the goal is canceled
00061 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00062                             #    and was successfully cancelled (Terminal State)
00063 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00064                             #    sent over the wire by an action server
00065 
00066 #Allow for the user to associate a string with GoalStatus for debugging
00067 string text
00068 
00069 
00070 ================================================================================
00071 MSG: actionlib_msgs/GoalID
00072 # The stamp should store the time at which this goal was requested.
00073 # It is used by an action server when it tries to preempt all
00074 # goals that were requested before a certain time
00075 time stamp
00076 
00077 # The id provides a way to associate feedback and
00078 # result message with specific goal requests. The id
00079 # specified must be unique.
00080 string id
00081 
00082 
00083 ================================================================================
00084 MSG: interactive_perception_msgs/ObjectSegmentationGuiResult
00085 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00086 # The information for the plane that has been detected
00087 tabletop_object_detector/Table table
00088 
00089 # The raw clusters detected in the scan 
00090 sensor_msgs/PointCloud[] clusters
00091 
00092 # Whether the detection has succeeded or failed
00093 int32 NO_CLOUD_RECEIVED = 1
00094 int32 NO_TABLE = 2
00095 int32 OTHER_ERROR = 3
00096 int32 SUCCESS = 4
00097 int32 result
00098 
00099 
00100 ================================================================================
00101 MSG: tabletop_object_detector/Table
00102 # Informs that a planar table has been detected at a given location
00103 
00104 # The pose gives you the transform that take you to the coordinate system
00105 # of the table, with the origin somewhere in the table plane and the 
00106 # z axis normal to the plane
00107 geometry_msgs/PoseStamped pose
00108 
00109 # These values give you the observed extents of the table, along x and y,
00110 # in the table's own coordinate system (above)
00111 # there is no guarantee that the origin of the table coordinate system is
00112 # inside the boundary defined by these values. 
00113 float32 x_min
00114 float32 x_max
00115 float32 y_min
00116 float32 y_max
00117 
00118 # There is no guarantee that the table does NOT extend further than these 
00119 # values; this is just as far as we've observed it.
00120 
00121 
00122 # Newer table definition as triangle mesh of convex hull (relative to pose)
00123 shape_msgs/Mesh convex_hull
00124 
00125 ================================================================================
00126 MSG: geometry_msgs/PoseStamped
00127 # A Pose with reference coordinate frame and timestamp
00128 Header header
00129 Pose pose
00130 
00131 ================================================================================
00132 MSG: geometry_msgs/Pose
00133 # A representation of pose in free space, composed of postion and orientation. 
00134 Point position
00135 Quaternion orientation
00136 
00137 ================================================================================
00138 MSG: geometry_msgs/Point
00139 # This contains the position of a point in free space
00140 float64 x
00141 float64 y
00142 float64 z
00143 
00144 ================================================================================
00145 MSG: geometry_msgs/Quaternion
00146 # This represents an orientation in free space in quaternion form.
00147 
00148 float64 x
00149 float64 y
00150 float64 z
00151 float64 w
00152 
00153 ================================================================================
00154 MSG: shape_msgs/Mesh
00155 # Definition of a mesh
00156 
00157 # list of triangles; the index values refer to positions in vertices[]
00158 MeshTriangle[] triangles
00159 
00160 # the actual vertices that make up the mesh
00161 geometry_msgs/Point[] vertices
00162 
00163 ================================================================================
00164 MSG: shape_msgs/MeshTriangle
00165 # Definition of a triangle's vertices
00166 uint32[3] vertex_indices
00167 
00168 ================================================================================
00169 MSG: sensor_msgs/PointCloud
00170 # This message holds a collection of 3d points, plus optional additional
00171 # information about each point.
00172 
00173 # Time of sensor data acquisition, coordinate frame ID.
00174 Header header
00175 
00176 # Array of 3d points. Each Point32 should be interpreted as a 3d point
00177 # in the frame given in the header.
00178 geometry_msgs/Point32[] points
00179 
00180 # Each channel should have the same number of elements as points array,
00181 # and the data in each channel should correspond 1:1 with each point.
00182 # Channel names in common practice are listed in ChannelFloat32.msg.
00183 ChannelFloat32[] channels
00184 
00185 ================================================================================
00186 MSG: geometry_msgs/Point32
00187 # This contains the position of a point in free space(with 32 bits of precision).
00188 # It is recommeded to use Point wherever possible instead of Point32.  
00189 # 
00190 # This recommendation is to promote interoperability.  
00191 #
00192 # This message is designed to take up less space when sending
00193 # lots of points at once, as in the case of a PointCloud.  
00194 
00195 float32 x
00196 float32 y
00197 float32 z
00198 ================================================================================
00199 MSG: sensor_msgs/ChannelFloat32
00200 # This message is used by the PointCloud message to hold optional data
00201 # associated with each point in the cloud. The length of the values
00202 # array should be the same as the length of the points array in the
00203 # PointCloud, and each value should be associated with the corresponding
00204 # point.
00205 
00206 # Channel names in existing practice include:
00207 #   "u", "v" - row and column (respectively) in the left stereo image.
00208 #              This is opposite to usual conventions but remains for
00209 #              historical reasons. The newer PointCloud2 message has no
00210 #              such problem.
00211 #   "rgb" - For point clouds produced by color stereo cameras. uint8
00212 #           (R,G,B) values packed into the least significant 24 bits,
00213 #           in order.
00214 #   "intensity" - laser or pixel intensity.
00215 #   "distance"
00216 
00217 # The channel name should give semantics of the channel (e.g.
00218 # "intensity" instead of "value").
00219 string name
00220 
00221 # The values array should be 1-1 with the elements of the associated
00222 # PointCloud.
00223 float32[] values
00224 
00225 """
00226   __slots__ = ['header','status','result']
00227   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','interactive_perception_msgs/ObjectSegmentationGuiResult']
00228 
00229   def __init__(self, *args, **kwds):
00230     """
00231     Constructor. Any message fields that are implicitly/explicitly
00232     set to None will be assigned a default value. The recommend
00233     use is keyword arguments as this is more robust to future message
00234     changes.  You cannot mix in-order arguments and keyword arguments.
00235 
00236     The available fields are:
00237        header,status,result
00238 
00239     :param args: complete set of field values, in .msg order
00240     :param kwds: use keyword arguments corresponding to message field names
00241     to set specific fields.
00242     """
00243     if args or kwds:
00244       super(ObjectSegmentationGuiActionResult, self).__init__(*args, **kwds)
00245       #message fields cannot be None, assign default values for those that are
00246       if self.header is None:
00247         self.header = std_msgs.msg.Header()
00248       if self.status is None:
00249         self.status = actionlib_msgs.msg.GoalStatus()
00250       if self.result is None:
00251         self.result = interactive_perception_msgs.msg.ObjectSegmentationGuiResult()
00252     else:
00253       self.header = std_msgs.msg.Header()
00254       self.status = actionlib_msgs.msg.GoalStatus()
00255       self.result = interactive_perception_msgs.msg.ObjectSegmentationGuiResult()
00256 
00257   def _get_types(self):
00258     """
00259     internal API method
00260     """
00261     return self._slot_types
00262 
00263   def serialize(self, buff):
00264     """
00265     serialize message into buffer
00266     :param buff: buffer, ``StringIO``
00267     """
00268     try:
00269       _x = self
00270       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00271       _x = self.header.frame_id
00272       length = len(_x)
00273       if python3 or type(_x) == unicode:
00274         _x = _x.encode('utf-8')
00275         length = len(_x)
00276       buff.write(struct.pack('<I%ss'%length, length, _x))
00277       _x = self
00278       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00279       _x = self.status.goal_id.id
00280       length = len(_x)
00281       if python3 or type(_x) == unicode:
00282         _x = _x.encode('utf-8')
00283         length = len(_x)
00284       buff.write(struct.pack('<I%ss'%length, length, _x))
00285       buff.write(_struct_B.pack(self.status.status))
00286       _x = self.status.text
00287       length = len(_x)
00288       if python3 or type(_x) == unicode:
00289         _x = _x.encode('utf-8')
00290         length = len(_x)
00291       buff.write(struct.pack('<I%ss'%length, length, _x))
00292       _x = self
00293       buff.write(_struct_3I.pack(_x.result.table.pose.header.seq, _x.result.table.pose.header.stamp.secs, _x.result.table.pose.header.stamp.nsecs))
00294       _x = self.result.table.pose.header.frame_id
00295       length = len(_x)
00296       if python3 or type(_x) == unicode:
00297         _x = _x.encode('utf-8')
00298         length = len(_x)
00299       buff.write(struct.pack('<I%ss'%length, length, _x))
00300       _x = self
00301       buff.write(_struct_7d4f.pack(_x.result.table.pose.pose.position.x, _x.result.table.pose.pose.position.y, _x.result.table.pose.pose.position.z, _x.result.table.pose.pose.orientation.x, _x.result.table.pose.pose.orientation.y, _x.result.table.pose.pose.orientation.z, _x.result.table.pose.pose.orientation.w, _x.result.table.x_min, _x.result.table.x_max, _x.result.table.y_min, _x.result.table.y_max))
00302       length = len(self.result.table.convex_hull.triangles)
00303       buff.write(_struct_I.pack(length))
00304       for val1 in self.result.table.convex_hull.triangles:
00305         buff.write(_struct_3I.pack(*val1.vertex_indices))
00306       length = len(self.result.table.convex_hull.vertices)
00307       buff.write(_struct_I.pack(length))
00308       for val1 in self.result.table.convex_hull.vertices:
00309         _x = val1
00310         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00311       length = len(self.result.clusters)
00312       buff.write(_struct_I.pack(length))
00313       for val1 in self.result.clusters:
00314         _v1 = val1.header
00315         buff.write(_struct_I.pack(_v1.seq))
00316         _v2 = _v1.stamp
00317         _x = _v2
00318         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00319         _x = _v1.frame_id
00320         length = len(_x)
00321         if python3 or type(_x) == unicode:
00322           _x = _x.encode('utf-8')
00323           length = len(_x)
00324         buff.write(struct.pack('<I%ss'%length, length, _x))
00325         length = len(val1.points)
00326         buff.write(_struct_I.pack(length))
00327         for val2 in val1.points:
00328           _x = val2
00329           buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00330         length = len(val1.channels)
00331         buff.write(_struct_I.pack(length))
00332         for val2 in val1.channels:
00333           _x = val2.name
00334           length = len(_x)
00335           if python3 or type(_x) == unicode:
00336             _x = _x.encode('utf-8')
00337             length = len(_x)
00338           buff.write(struct.pack('<I%ss'%length, length, _x))
00339           length = len(val2.values)
00340           buff.write(_struct_I.pack(length))
00341           pattern = '<%sf'%length
00342           buff.write(struct.pack(pattern, *val2.values))
00343       buff.write(_struct_i.pack(self.result.result))
00344     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00345     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00346 
00347   def deserialize(self, str):
00348     """
00349     unpack serialized message in str into this message instance
00350     :param str: byte array of serialized message, ``str``
00351     """
00352     try:
00353       if self.header is None:
00354         self.header = std_msgs.msg.Header()
00355       if self.status is None:
00356         self.status = actionlib_msgs.msg.GoalStatus()
00357       if self.result is None:
00358         self.result = interactive_perception_msgs.msg.ObjectSegmentationGuiResult()
00359       end = 0
00360       _x = self
00361       start = end
00362       end += 12
00363       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00364       start = end
00365       end += 4
00366       (length,) = _struct_I.unpack(str[start:end])
00367       start = end
00368       end += length
00369       if python3:
00370         self.header.frame_id = str[start:end].decode('utf-8')
00371       else:
00372         self.header.frame_id = str[start:end]
00373       _x = self
00374       start = end
00375       end += 8
00376       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00377       start = end
00378       end += 4
00379       (length,) = _struct_I.unpack(str[start:end])
00380       start = end
00381       end += length
00382       if python3:
00383         self.status.goal_id.id = str[start:end].decode('utf-8')
00384       else:
00385         self.status.goal_id.id = str[start:end]
00386       start = end
00387       end += 1
00388       (self.status.status,) = _struct_B.unpack(str[start:end])
00389       start = end
00390       end += 4
00391       (length,) = _struct_I.unpack(str[start:end])
00392       start = end
00393       end += length
00394       if python3:
00395         self.status.text = str[start:end].decode('utf-8')
00396       else:
00397         self.status.text = str[start:end]
00398       _x = self
00399       start = end
00400       end += 12
00401       (_x.result.table.pose.header.seq, _x.result.table.pose.header.stamp.secs, _x.result.table.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00402       start = end
00403       end += 4
00404       (length,) = _struct_I.unpack(str[start:end])
00405       start = end
00406       end += length
00407       if python3:
00408         self.result.table.pose.header.frame_id = str[start:end].decode('utf-8')
00409       else:
00410         self.result.table.pose.header.frame_id = str[start:end]
00411       _x = self
00412       start = end
00413       end += 72
00414       (_x.result.table.pose.pose.position.x, _x.result.table.pose.pose.position.y, _x.result.table.pose.pose.position.z, _x.result.table.pose.pose.orientation.x, _x.result.table.pose.pose.orientation.y, _x.result.table.pose.pose.orientation.z, _x.result.table.pose.pose.orientation.w, _x.result.table.x_min, _x.result.table.x_max, _x.result.table.y_min, _x.result.table.y_max,) = _struct_7d4f.unpack(str[start:end])
00415       start = end
00416       end += 4
00417       (length,) = _struct_I.unpack(str[start:end])
00418       self.result.table.convex_hull.triangles = []
00419       for i in range(0, length):
00420         val1 = shape_msgs.msg.MeshTriangle()
00421         start = end
00422         end += 12
00423         val1.vertex_indices = _struct_3I.unpack(str[start:end])
00424         self.result.table.convex_hull.triangles.append(val1)
00425       start = end
00426       end += 4
00427       (length,) = _struct_I.unpack(str[start:end])
00428       self.result.table.convex_hull.vertices = []
00429       for i in range(0, length):
00430         val1 = geometry_msgs.msg.Point()
00431         _x = val1
00432         start = end
00433         end += 24
00434         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00435         self.result.table.convex_hull.vertices.append(val1)
00436       start = end
00437       end += 4
00438       (length,) = _struct_I.unpack(str[start:end])
00439       self.result.clusters = []
00440       for i in range(0, length):
00441         val1 = sensor_msgs.msg.PointCloud()
00442         _v3 = val1.header
00443         start = end
00444         end += 4
00445         (_v3.seq,) = _struct_I.unpack(str[start:end])
00446         _v4 = _v3.stamp
00447         _x = _v4
00448         start = end
00449         end += 8
00450         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00451         start = end
00452         end += 4
00453         (length,) = _struct_I.unpack(str[start:end])
00454         start = end
00455         end += length
00456         if python3:
00457           _v3.frame_id = str[start:end].decode('utf-8')
00458         else:
00459           _v3.frame_id = str[start:end]
00460         start = end
00461         end += 4
00462         (length,) = _struct_I.unpack(str[start:end])
00463         val1.points = []
00464         for i in range(0, length):
00465           val2 = geometry_msgs.msg.Point32()
00466           _x = val2
00467           start = end
00468           end += 12
00469           (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00470           val1.points.append(val2)
00471         start = end
00472         end += 4
00473         (length,) = _struct_I.unpack(str[start:end])
00474         val1.channels = []
00475         for i in range(0, length):
00476           val2 = sensor_msgs.msg.ChannelFloat32()
00477           start = end
00478           end += 4
00479           (length,) = _struct_I.unpack(str[start:end])
00480           start = end
00481           end += length
00482           if python3:
00483             val2.name = str[start:end].decode('utf-8')
00484           else:
00485             val2.name = str[start:end]
00486           start = end
00487           end += 4
00488           (length,) = _struct_I.unpack(str[start:end])
00489           pattern = '<%sf'%length
00490           start = end
00491           end += struct.calcsize(pattern)
00492           val2.values = struct.unpack(pattern, str[start:end])
00493           val1.channels.append(val2)
00494         self.result.clusters.append(val1)
00495       start = end
00496       end += 4
00497       (self.result.result,) = _struct_i.unpack(str[start:end])
00498       return self
00499     except struct.error as e:
00500       raise genpy.DeserializationError(e) #most likely buffer underfill
00501 
00502 
00503   def serialize_numpy(self, buff, numpy):
00504     """
00505     serialize message with numpy array types into buffer
00506     :param buff: buffer, ``StringIO``
00507     :param numpy: numpy python module
00508     """
00509     try:
00510       _x = self
00511       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00512       _x = self.header.frame_id
00513       length = len(_x)
00514       if python3 or type(_x) == unicode:
00515         _x = _x.encode('utf-8')
00516         length = len(_x)
00517       buff.write(struct.pack('<I%ss'%length, length, _x))
00518       _x = self
00519       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00520       _x = self.status.goal_id.id
00521       length = len(_x)
00522       if python3 or type(_x) == unicode:
00523         _x = _x.encode('utf-8')
00524         length = len(_x)
00525       buff.write(struct.pack('<I%ss'%length, length, _x))
00526       buff.write(_struct_B.pack(self.status.status))
00527       _x = self.status.text
00528       length = len(_x)
00529       if python3 or type(_x) == unicode:
00530         _x = _x.encode('utf-8')
00531         length = len(_x)
00532       buff.write(struct.pack('<I%ss'%length, length, _x))
00533       _x = self
00534       buff.write(_struct_3I.pack(_x.result.table.pose.header.seq, _x.result.table.pose.header.stamp.secs, _x.result.table.pose.header.stamp.nsecs))
00535       _x = self.result.table.pose.header.frame_id
00536       length = len(_x)
00537       if python3 or type(_x) == unicode:
00538         _x = _x.encode('utf-8')
00539         length = len(_x)
00540       buff.write(struct.pack('<I%ss'%length, length, _x))
00541       _x = self
00542       buff.write(_struct_7d4f.pack(_x.result.table.pose.pose.position.x, _x.result.table.pose.pose.position.y, _x.result.table.pose.pose.position.z, _x.result.table.pose.pose.orientation.x, _x.result.table.pose.pose.orientation.y, _x.result.table.pose.pose.orientation.z, _x.result.table.pose.pose.orientation.w, _x.result.table.x_min, _x.result.table.x_max, _x.result.table.y_min, _x.result.table.y_max))
00543       length = len(self.result.table.convex_hull.triangles)
00544       buff.write(_struct_I.pack(length))
00545       for val1 in self.result.table.convex_hull.triangles:
00546         buff.write(val1.vertex_indices.tostring())
00547       length = len(self.result.table.convex_hull.vertices)
00548       buff.write(_struct_I.pack(length))
00549       for val1 in self.result.table.convex_hull.vertices:
00550         _x = val1
00551         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00552       length = len(self.result.clusters)
00553       buff.write(_struct_I.pack(length))
00554       for val1 in self.result.clusters:
00555         _v5 = val1.header
00556         buff.write(_struct_I.pack(_v5.seq))
00557         _v6 = _v5.stamp
00558         _x = _v6
00559         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00560         _x = _v5.frame_id
00561         length = len(_x)
00562         if python3 or type(_x) == unicode:
00563           _x = _x.encode('utf-8')
00564           length = len(_x)
00565         buff.write(struct.pack('<I%ss'%length, length, _x))
00566         length = len(val1.points)
00567         buff.write(_struct_I.pack(length))
00568         for val2 in val1.points:
00569           _x = val2
00570           buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00571         length = len(val1.channels)
00572         buff.write(_struct_I.pack(length))
00573         for val2 in val1.channels:
00574           _x = val2.name
00575           length = len(_x)
00576           if python3 or type(_x) == unicode:
00577             _x = _x.encode('utf-8')
00578             length = len(_x)
00579           buff.write(struct.pack('<I%ss'%length, length, _x))
00580           length = len(val2.values)
00581           buff.write(_struct_I.pack(length))
00582           pattern = '<%sf'%length
00583           buff.write(val2.values.tostring())
00584       buff.write(_struct_i.pack(self.result.result))
00585     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00586     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00587 
00588   def deserialize_numpy(self, str, numpy):
00589     """
00590     unpack serialized message in str into this message instance using numpy for array types
00591     :param str: byte array of serialized message, ``str``
00592     :param numpy: numpy python module
00593     """
00594     try:
00595       if self.header is None:
00596         self.header = std_msgs.msg.Header()
00597       if self.status is None:
00598         self.status = actionlib_msgs.msg.GoalStatus()
00599       if self.result is None:
00600         self.result = interactive_perception_msgs.msg.ObjectSegmentationGuiResult()
00601       end = 0
00602       _x = self
00603       start = end
00604       end += 12
00605       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00606       start = end
00607       end += 4
00608       (length,) = _struct_I.unpack(str[start:end])
00609       start = end
00610       end += length
00611       if python3:
00612         self.header.frame_id = str[start:end].decode('utf-8')
00613       else:
00614         self.header.frame_id = str[start:end]
00615       _x = self
00616       start = end
00617       end += 8
00618       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(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.status.goal_id.id = str[start:end].decode('utf-8')
00626       else:
00627         self.status.goal_id.id = str[start:end]
00628       start = end
00629       end += 1
00630       (self.status.status,) = _struct_B.unpack(str[start:end])
00631       start = end
00632       end += 4
00633       (length,) = _struct_I.unpack(str[start:end])
00634       start = end
00635       end += length
00636       if python3:
00637         self.status.text = str[start:end].decode('utf-8')
00638       else:
00639         self.status.text = str[start:end]
00640       _x = self
00641       start = end
00642       end += 12
00643       (_x.result.table.pose.header.seq, _x.result.table.pose.header.stamp.secs, _x.result.table.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00644       start = end
00645       end += 4
00646       (length,) = _struct_I.unpack(str[start:end])
00647       start = end
00648       end += length
00649       if python3:
00650         self.result.table.pose.header.frame_id = str[start:end].decode('utf-8')
00651       else:
00652         self.result.table.pose.header.frame_id = str[start:end]
00653       _x = self
00654       start = end
00655       end += 72
00656       (_x.result.table.pose.pose.position.x, _x.result.table.pose.pose.position.y, _x.result.table.pose.pose.position.z, _x.result.table.pose.pose.orientation.x, _x.result.table.pose.pose.orientation.y, _x.result.table.pose.pose.orientation.z, _x.result.table.pose.pose.orientation.w, _x.result.table.x_min, _x.result.table.x_max, _x.result.table.y_min, _x.result.table.y_max,) = _struct_7d4f.unpack(str[start:end])
00657       start = end
00658       end += 4
00659       (length,) = _struct_I.unpack(str[start:end])
00660       self.result.table.convex_hull.triangles = []
00661       for i in range(0, length):
00662         val1 = shape_msgs.msg.MeshTriangle()
00663         start = end
00664         end += 12
00665         val1.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3)
00666         self.result.table.convex_hull.triangles.append(val1)
00667       start = end
00668       end += 4
00669       (length,) = _struct_I.unpack(str[start:end])
00670       self.result.table.convex_hull.vertices = []
00671       for i in range(0, length):
00672         val1 = geometry_msgs.msg.Point()
00673         _x = val1
00674         start = end
00675         end += 24
00676         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00677         self.result.table.convex_hull.vertices.append(val1)
00678       start = end
00679       end += 4
00680       (length,) = _struct_I.unpack(str[start:end])
00681       self.result.clusters = []
00682       for i in range(0, length):
00683         val1 = sensor_msgs.msg.PointCloud()
00684         _v7 = val1.header
00685         start = end
00686         end += 4
00687         (_v7.seq,) = _struct_I.unpack(str[start:end])
00688         _v8 = _v7.stamp
00689         _x = _v8
00690         start = end
00691         end += 8
00692         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00693         start = end
00694         end += 4
00695         (length,) = _struct_I.unpack(str[start:end])
00696         start = end
00697         end += length
00698         if python3:
00699           _v7.frame_id = str[start:end].decode('utf-8')
00700         else:
00701           _v7.frame_id = str[start:end]
00702         start = end
00703         end += 4
00704         (length,) = _struct_I.unpack(str[start:end])
00705         val1.points = []
00706         for i in range(0, length):
00707           val2 = geometry_msgs.msg.Point32()
00708           _x = val2
00709           start = end
00710           end += 12
00711           (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00712           val1.points.append(val2)
00713         start = end
00714         end += 4
00715         (length,) = _struct_I.unpack(str[start:end])
00716         val1.channels = []
00717         for i in range(0, length):
00718           val2 = sensor_msgs.msg.ChannelFloat32()
00719           start = end
00720           end += 4
00721           (length,) = _struct_I.unpack(str[start:end])
00722           start = end
00723           end += length
00724           if python3:
00725             val2.name = str[start:end].decode('utf-8')
00726           else:
00727             val2.name = str[start:end]
00728           start = end
00729           end += 4
00730           (length,) = _struct_I.unpack(str[start:end])
00731           pattern = '<%sf'%length
00732           start = end
00733           end += struct.calcsize(pattern)
00734           val2.values = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00735           val1.channels.append(val2)
00736         self.result.clusters.append(val1)
00737       start = end
00738       end += 4
00739       (self.result.result,) = _struct_i.unpack(str[start:end])
00740       return self
00741     except struct.error as e:
00742       raise genpy.DeserializationError(e) #most likely buffer underfill
00743 
00744 _struct_I = genpy.struct_I
00745 _struct_B = struct.Struct("<B")
00746 _struct_7d4f = struct.Struct("<7d4f")
00747 _struct_3f = struct.Struct("<3f")
00748 _struct_i = struct.Struct("<i")
00749 _struct_3I = struct.Struct("<3I")
00750 _struct_2I = struct.Struct("<2I")
00751 _struct_3d = struct.Struct("<3d")


interactive_perception_msgs
Author(s): jbinney
autogenerated on Mon Oct 6 2014 11:51:20