00001 """autogenerated by genmsg_py from FindContainerGoal.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import std_msgs.msg
00007 import sensor_msgs.msg
00008
00009 class FindContainerGoal(roslib.message.Message):
00010 _md5sum = "97ad28247bca1903867d6a79d91c2a52"
00011 _type = "object_manipulation_msgs/FindContainerGoal"
00012 _has_header = False
00013 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00014 # The cloud
00015 sensor_msgs/PointCloud2 cloud
00016
00017 # starting estimate of bounding box
00018 # all output will be in this frame
00019 # Assumes axis-aligned with header frame,
00020 # and WON'T take orientation into account.
00021 geometry_msgs/PoseStamped box_pose
00022 geometry_msgs/Vector3 box_dims
00023
00024 # the direction that the container opens (in bounding box header frame)
00025 geometry_msgs/Vector3 opening_dir
00026
00027
00028 ================================================================================
00029 MSG: sensor_msgs/PointCloud2
00030 # This message holds a collection of N-dimensional points, which may
00031 # contain additional information such as normals, intensity, etc. The
00032 # point data is stored as a binary blob, its layout described by the
00033 # contents of the "fields" array.
00034
00035 # The point cloud data may be organized 2d (image-like) or 1d
00036 # (unordered). Point clouds organized as 2d images may be produced by
00037 # camera depth sensors such as stereo or time-of-flight.
00038
00039 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00040 # points).
00041 Header header
00042
00043 # 2D structure of the point cloud. If the cloud is unordered, height is
00044 # 1 and width is the length of the point cloud.
00045 uint32 height
00046 uint32 width
00047
00048 # Describes the channels and their layout in the binary data blob.
00049 PointField[] fields
00050
00051 bool is_bigendian # Is this data bigendian?
00052 uint32 point_step # Length of a point in bytes
00053 uint32 row_step # Length of a row in bytes
00054 uint8[] data # Actual point data, size is (row_step*height)
00055
00056 bool is_dense # True if there are no invalid points
00057
00058 ================================================================================
00059 MSG: std_msgs/Header
00060 # Standard metadata for higher-level stamped data types.
00061 # This is generally used to communicate timestamped data
00062 # in a particular coordinate frame.
00063 #
00064 # sequence ID: consecutively increasing ID
00065 uint32 seq
00066 #Two-integer timestamp that is expressed as:
00067 # * stamp.secs: seconds (stamp_secs) since epoch
00068 # * stamp.nsecs: nanoseconds since stamp_secs
00069 # time-handling sugar is provided by the client library
00070 time stamp
00071 #Frame this data is associated with
00072 # 0: no frame
00073 # 1: global frame
00074 string frame_id
00075
00076 ================================================================================
00077 MSG: sensor_msgs/PointField
00078 # This message holds the description of one point entry in the
00079 # PointCloud2 message format.
00080 uint8 INT8 = 1
00081 uint8 UINT8 = 2
00082 uint8 INT16 = 3
00083 uint8 UINT16 = 4
00084 uint8 INT32 = 5
00085 uint8 UINT32 = 6
00086 uint8 FLOAT32 = 7
00087 uint8 FLOAT64 = 8
00088
00089 string name # Name of field
00090 uint32 offset # Offset from start of point struct
00091 uint8 datatype # Datatype enumeration, see above
00092 uint32 count # How many elements in the field
00093
00094 ================================================================================
00095 MSG: geometry_msgs/PoseStamped
00096 # A Pose with reference coordinate frame and timestamp
00097 Header header
00098 Pose pose
00099
00100 ================================================================================
00101 MSG: geometry_msgs/Pose
00102 # A representation of pose in free space, composed of postion and orientation.
00103 Point position
00104 Quaternion orientation
00105
00106 ================================================================================
00107 MSG: geometry_msgs/Point
00108 # This contains the position of a point in free space
00109 float64 x
00110 float64 y
00111 float64 z
00112
00113 ================================================================================
00114 MSG: geometry_msgs/Quaternion
00115 # This represents an orientation in free space in quaternion form.
00116
00117 float64 x
00118 float64 y
00119 float64 z
00120 float64 w
00121
00122 ================================================================================
00123 MSG: geometry_msgs/Vector3
00124 # This represents a vector in free space.
00125
00126 float64 x
00127 float64 y
00128 float64 z
00129 """
00130 __slots__ = ['cloud','box_pose','box_dims','opening_dir']
00131 _slot_types = ['sensor_msgs/PointCloud2','geometry_msgs/PoseStamped','geometry_msgs/Vector3','geometry_msgs/Vector3']
00132
00133 def __init__(self, *args, **kwds):
00134 """
00135 Constructor. Any message fields that are implicitly/explicitly
00136 set to None will be assigned a default value. The recommend
00137 use is keyword arguments as this is more robust to future message
00138 changes. You cannot mix in-order arguments and keyword arguments.
00139
00140 The available fields are:
00141 cloud,box_pose,box_dims,opening_dir
00142
00143 @param args: complete set of field values, in .msg order
00144 @param kwds: use keyword arguments corresponding to message field names
00145 to set specific fields.
00146 """
00147 if args or kwds:
00148 super(FindContainerGoal, self).__init__(*args, **kwds)
00149
00150 if self.cloud is None:
00151 self.cloud = sensor_msgs.msg.PointCloud2()
00152 if self.box_pose is None:
00153 self.box_pose = geometry_msgs.msg.PoseStamped()
00154 if self.box_dims is None:
00155 self.box_dims = geometry_msgs.msg.Vector3()
00156 if self.opening_dir is None:
00157 self.opening_dir = geometry_msgs.msg.Vector3()
00158 else:
00159 self.cloud = sensor_msgs.msg.PointCloud2()
00160 self.box_pose = geometry_msgs.msg.PoseStamped()
00161 self.box_dims = geometry_msgs.msg.Vector3()
00162 self.opening_dir = geometry_msgs.msg.Vector3()
00163
00164 def _get_types(self):
00165 """
00166 internal API method
00167 """
00168 return self._slot_types
00169
00170 def serialize(self, buff):
00171 """
00172 serialize message into buffer
00173 @param buff: buffer
00174 @type buff: StringIO
00175 """
00176 try:
00177 _x = self
00178 buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs))
00179 _x = self.cloud.header.frame_id
00180 length = len(_x)
00181 buff.write(struct.pack('<I%ss'%length, length, _x))
00182 _x = self
00183 buff.write(_struct_2I.pack(_x.cloud.height, _x.cloud.width))
00184 length = len(self.cloud.fields)
00185 buff.write(_struct_I.pack(length))
00186 for val1 in self.cloud.fields:
00187 _x = val1.name
00188 length = len(_x)
00189 buff.write(struct.pack('<I%ss'%length, length, _x))
00190 _x = val1
00191 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00192 _x = self
00193 buff.write(_struct_B2I.pack(_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step))
00194 _x = self.cloud.data
00195 length = len(_x)
00196
00197 if type(_x) in [list, tuple]:
00198 buff.write(struct.pack('<I%sB'%length, length, *_x))
00199 else:
00200 buff.write(struct.pack('<I%ss'%length, length, _x))
00201 _x = self
00202 buff.write(_struct_B3I.pack(_x.cloud.is_dense, _x.box_pose.header.seq, _x.box_pose.header.stamp.secs, _x.box_pose.header.stamp.nsecs))
00203 _x = self.box_pose.header.frame_id
00204 length = len(_x)
00205 buff.write(struct.pack('<I%ss'%length, length, _x))
00206 _x = self
00207 buff.write(_struct_13d.pack(_x.box_pose.pose.position.x, _x.box_pose.pose.position.y, _x.box_pose.pose.position.z, _x.box_pose.pose.orientation.x, _x.box_pose.pose.orientation.y, _x.box_pose.pose.orientation.z, _x.box_pose.pose.orientation.w, _x.box_dims.x, _x.box_dims.y, _x.box_dims.z, _x.opening_dir.x, _x.opening_dir.y, _x.opening_dir.z))
00208 except struct.error as se: self._check_types(se)
00209 except TypeError as te: self._check_types(te)
00210
00211 def deserialize(self, str):
00212 """
00213 unpack serialized message in str into this message instance
00214 @param str: byte array of serialized message
00215 @type str: str
00216 """
00217 try:
00218 if self.cloud is None:
00219 self.cloud = sensor_msgs.msg.PointCloud2()
00220 if self.box_pose is None:
00221 self.box_pose = geometry_msgs.msg.PoseStamped()
00222 if self.box_dims is None:
00223 self.box_dims = geometry_msgs.msg.Vector3()
00224 if self.opening_dir is None:
00225 self.opening_dir = geometry_msgs.msg.Vector3()
00226 end = 0
00227 _x = self
00228 start = end
00229 end += 12
00230 (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00231 start = end
00232 end += 4
00233 (length,) = _struct_I.unpack(str[start:end])
00234 start = end
00235 end += length
00236 self.cloud.header.frame_id = str[start:end]
00237 _x = self
00238 start = end
00239 end += 8
00240 (_x.cloud.height, _x.cloud.width,) = _struct_2I.unpack(str[start:end])
00241 start = end
00242 end += 4
00243 (length,) = _struct_I.unpack(str[start:end])
00244 self.cloud.fields = []
00245 for i in range(0, length):
00246 val1 = sensor_msgs.msg.PointField()
00247 start = end
00248 end += 4
00249 (length,) = _struct_I.unpack(str[start:end])
00250 start = end
00251 end += length
00252 val1.name = str[start:end]
00253 _x = val1
00254 start = end
00255 end += 9
00256 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00257 self.cloud.fields.append(val1)
00258 _x = self
00259 start = end
00260 end += 9
00261 (_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00262 self.cloud.is_bigendian = bool(self.cloud.is_bigendian)
00263 start = end
00264 end += 4
00265 (length,) = _struct_I.unpack(str[start:end])
00266 start = end
00267 end += length
00268 self.cloud.data = str[start:end]
00269 _x = self
00270 start = end
00271 end += 13
00272 (_x.cloud.is_dense, _x.box_pose.header.seq, _x.box_pose.header.stamp.secs, _x.box_pose.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00273 self.cloud.is_dense = bool(self.cloud.is_dense)
00274 start = end
00275 end += 4
00276 (length,) = _struct_I.unpack(str[start:end])
00277 start = end
00278 end += length
00279 self.box_pose.header.frame_id = str[start:end]
00280 _x = self
00281 start = end
00282 end += 104
00283 (_x.box_pose.pose.position.x, _x.box_pose.pose.position.y, _x.box_pose.pose.position.z, _x.box_pose.pose.orientation.x, _x.box_pose.pose.orientation.y, _x.box_pose.pose.orientation.z, _x.box_pose.pose.orientation.w, _x.box_dims.x, _x.box_dims.y, _x.box_dims.z, _x.opening_dir.x, _x.opening_dir.y, _x.opening_dir.z,) = _struct_13d.unpack(str[start:end])
00284 return self
00285 except struct.error as e:
00286 raise roslib.message.DeserializationError(e)
00287
00288
00289 def serialize_numpy(self, buff, numpy):
00290 """
00291 serialize message with numpy array types into buffer
00292 @param buff: buffer
00293 @type buff: StringIO
00294 @param numpy: numpy python module
00295 @type numpy module
00296 """
00297 try:
00298 _x = self
00299 buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs))
00300 _x = self.cloud.header.frame_id
00301 length = len(_x)
00302 buff.write(struct.pack('<I%ss'%length, length, _x))
00303 _x = self
00304 buff.write(_struct_2I.pack(_x.cloud.height, _x.cloud.width))
00305 length = len(self.cloud.fields)
00306 buff.write(_struct_I.pack(length))
00307 for val1 in self.cloud.fields:
00308 _x = val1.name
00309 length = len(_x)
00310 buff.write(struct.pack('<I%ss'%length, length, _x))
00311 _x = val1
00312 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00313 _x = self
00314 buff.write(_struct_B2I.pack(_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step))
00315 _x = self.cloud.data
00316 length = len(_x)
00317
00318 if type(_x) in [list, tuple]:
00319 buff.write(struct.pack('<I%sB'%length, length, *_x))
00320 else:
00321 buff.write(struct.pack('<I%ss'%length, length, _x))
00322 _x = self
00323 buff.write(_struct_B3I.pack(_x.cloud.is_dense, _x.box_pose.header.seq, _x.box_pose.header.stamp.secs, _x.box_pose.header.stamp.nsecs))
00324 _x = self.box_pose.header.frame_id
00325 length = len(_x)
00326 buff.write(struct.pack('<I%ss'%length, length, _x))
00327 _x = self
00328 buff.write(_struct_13d.pack(_x.box_pose.pose.position.x, _x.box_pose.pose.position.y, _x.box_pose.pose.position.z, _x.box_pose.pose.orientation.x, _x.box_pose.pose.orientation.y, _x.box_pose.pose.orientation.z, _x.box_pose.pose.orientation.w, _x.box_dims.x, _x.box_dims.y, _x.box_dims.z, _x.opening_dir.x, _x.opening_dir.y, _x.opening_dir.z))
00329 except struct.error as se: self._check_types(se)
00330 except TypeError as te: self._check_types(te)
00331
00332 def deserialize_numpy(self, str, numpy):
00333 """
00334 unpack serialized message in str into this message instance using numpy for array types
00335 @param str: byte array of serialized message
00336 @type str: str
00337 @param numpy: numpy python module
00338 @type numpy: module
00339 """
00340 try:
00341 if self.cloud is None:
00342 self.cloud = sensor_msgs.msg.PointCloud2()
00343 if self.box_pose is None:
00344 self.box_pose = geometry_msgs.msg.PoseStamped()
00345 if self.box_dims is None:
00346 self.box_dims = geometry_msgs.msg.Vector3()
00347 if self.opening_dir is None:
00348 self.opening_dir = geometry_msgs.msg.Vector3()
00349 end = 0
00350 _x = self
00351 start = end
00352 end += 12
00353 (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00354 start = end
00355 end += 4
00356 (length,) = _struct_I.unpack(str[start:end])
00357 start = end
00358 end += length
00359 self.cloud.header.frame_id = str[start:end]
00360 _x = self
00361 start = end
00362 end += 8
00363 (_x.cloud.height, _x.cloud.width,) = _struct_2I.unpack(str[start:end])
00364 start = end
00365 end += 4
00366 (length,) = _struct_I.unpack(str[start:end])
00367 self.cloud.fields = []
00368 for i in range(0, length):
00369 val1 = sensor_msgs.msg.PointField()
00370 start = end
00371 end += 4
00372 (length,) = _struct_I.unpack(str[start:end])
00373 start = end
00374 end += length
00375 val1.name = str[start:end]
00376 _x = val1
00377 start = end
00378 end += 9
00379 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00380 self.cloud.fields.append(val1)
00381 _x = self
00382 start = end
00383 end += 9
00384 (_x.cloud.is_bigendian, _x.cloud.point_step, _x.cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00385 self.cloud.is_bigendian = bool(self.cloud.is_bigendian)
00386 start = end
00387 end += 4
00388 (length,) = _struct_I.unpack(str[start:end])
00389 start = end
00390 end += length
00391 self.cloud.data = str[start:end]
00392 _x = self
00393 start = end
00394 end += 13
00395 (_x.cloud.is_dense, _x.box_pose.header.seq, _x.box_pose.header.stamp.secs, _x.box_pose.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00396 self.cloud.is_dense = bool(self.cloud.is_dense)
00397 start = end
00398 end += 4
00399 (length,) = _struct_I.unpack(str[start:end])
00400 start = end
00401 end += length
00402 self.box_pose.header.frame_id = str[start:end]
00403 _x = self
00404 start = end
00405 end += 104
00406 (_x.box_pose.pose.position.x, _x.box_pose.pose.position.y, _x.box_pose.pose.position.z, _x.box_pose.pose.orientation.x, _x.box_pose.pose.orientation.y, _x.box_pose.pose.orientation.z, _x.box_pose.pose.orientation.w, _x.box_dims.x, _x.box_dims.y, _x.box_dims.z, _x.opening_dir.x, _x.opening_dir.y, _x.opening_dir.z,) = _struct_13d.unpack(str[start:end])
00407 return self
00408 except struct.error as e:
00409 raise roslib.message.DeserializationError(e)
00410
00411 _struct_I = roslib.message.struct_I
00412 _struct_IBI = struct.Struct("<IBI")
00413 _struct_13d = struct.Struct("<13d")
00414 _struct_3I = struct.Struct("<3I")
00415 _struct_B3I = struct.Struct("<B3I")
00416 _struct_B2I = struct.Struct("<B2I")
00417 _struct_2I = struct.Struct("<2I")