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