00001 """autogenerated by genpy from iri_perception_msgs/PclToMarkerRequest.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 std_msgs.msg
00008 import sensor_msgs.msg
00009
00010 class PclToMarkerRequest(genpy.Message):
00011 _md5sum = "56680b720436a8fbd002ea7abe6966e1"
00012 _type = "iri_perception_msgs/PclToMarkerRequest"
00013 _has_header = False
00014 _full_text = """
00015 sensor_msgs/PointCloud2 pointcloud
00016
00017 ================================================================================
00018 MSG: sensor_msgs/PointCloud2
00019 # This message holds a collection of N-dimensional points, which may
00020 # contain additional information such as normals, intensity, etc. The
00021 # point data is stored as a binary blob, its layout described by the
00022 # contents of the "fields" array.
00023
00024 # The point cloud data may be organized 2d (image-like) or 1d
00025 # (unordered). Point clouds organized as 2d images may be produced by
00026 # camera depth sensors such as stereo or time-of-flight.
00027
00028 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00029 # points).
00030 Header header
00031
00032 # 2D structure of the point cloud. If the cloud is unordered, height is
00033 # 1 and width is the length of the point cloud.
00034 uint32 height
00035 uint32 width
00036
00037 # Describes the channels and their layout in the binary data blob.
00038 PointField[] fields
00039
00040 bool is_bigendian # Is this data bigendian?
00041 uint32 point_step # Length of a point in bytes
00042 uint32 row_step # Length of a row in bytes
00043 uint8[] data # Actual point data, size is (row_step*height)
00044
00045 bool is_dense # True if there are no invalid points
00046
00047 ================================================================================
00048 MSG: std_msgs/Header
00049 # Standard metadata for higher-level stamped data types.
00050 # This is generally used to communicate timestamped data
00051 # in a particular coordinate frame.
00052 #
00053 # sequence ID: consecutively increasing ID
00054 uint32 seq
00055 #Two-integer timestamp that is expressed as:
00056 # * stamp.secs: seconds (stamp_secs) since epoch
00057 # * stamp.nsecs: nanoseconds since stamp_secs
00058 # time-handling sugar is provided by the client library
00059 time stamp
00060 #Frame this data is associated with
00061 # 0: no frame
00062 # 1: global frame
00063 string frame_id
00064
00065 ================================================================================
00066 MSG: sensor_msgs/PointField
00067 # This message holds the description of one point entry in the
00068 # PointCloud2 message format.
00069 uint8 INT8 = 1
00070 uint8 UINT8 = 2
00071 uint8 INT16 = 3
00072 uint8 UINT16 = 4
00073 uint8 INT32 = 5
00074 uint8 UINT32 = 6
00075 uint8 FLOAT32 = 7
00076 uint8 FLOAT64 = 8
00077
00078 string name # Name of field
00079 uint32 offset # Offset from start of point struct
00080 uint8 datatype # Datatype enumeration, see above
00081 uint32 count # How many elements in the field
00082
00083 """
00084 __slots__ = ['pointcloud']
00085 _slot_types = ['sensor_msgs/PointCloud2']
00086
00087 def __init__(self, *args, **kwds):
00088 """
00089 Constructor. Any message fields that are implicitly/explicitly
00090 set to None will be assigned a default value. The recommend
00091 use is keyword arguments as this is more robust to future message
00092 changes. You cannot mix in-order arguments and keyword arguments.
00093
00094 The available fields are:
00095 pointcloud
00096
00097 :param args: complete set of field values, in .msg order
00098 :param kwds: use keyword arguments corresponding to message field names
00099 to set specific fields.
00100 """
00101 if args or kwds:
00102 super(PclToMarkerRequest, self).__init__(*args, **kwds)
00103
00104 if self.pointcloud is None:
00105 self.pointcloud = sensor_msgs.msg.PointCloud2()
00106 else:
00107 self.pointcloud = sensor_msgs.msg.PointCloud2()
00108
00109 def _get_types(self):
00110 """
00111 internal API method
00112 """
00113 return self._slot_types
00114
00115 def serialize(self, buff):
00116 """
00117 serialize message into buffer
00118 :param buff: buffer, ``StringIO``
00119 """
00120 try:
00121 _x = self
00122 buff.write(_struct_3I.pack(_x.pointcloud.header.seq, _x.pointcloud.header.stamp.secs, _x.pointcloud.header.stamp.nsecs))
00123 _x = self.pointcloud.header.frame_id
00124 length = len(_x)
00125 if python3 or type(_x) == unicode:
00126 _x = _x.encode('utf-8')
00127 length = len(_x)
00128 buff.write(struct.pack('<I%ss'%length, length, _x))
00129 _x = self
00130 buff.write(_struct_2I.pack(_x.pointcloud.height, _x.pointcloud.width))
00131 length = len(self.pointcloud.fields)
00132 buff.write(_struct_I.pack(length))
00133 for val1 in self.pointcloud.fields:
00134 _x = val1.name
00135 length = len(_x)
00136 if python3 or type(_x) == unicode:
00137 _x = _x.encode('utf-8')
00138 length = len(_x)
00139 buff.write(struct.pack('<I%ss'%length, length, _x))
00140 _x = val1
00141 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00142 _x = self
00143 buff.write(_struct_B2I.pack(_x.pointcloud.is_bigendian, _x.pointcloud.point_step, _x.pointcloud.row_step))
00144 _x = self.pointcloud.data
00145 length = len(_x)
00146
00147 if type(_x) in [list, tuple]:
00148 buff.write(struct.pack('<I%sB'%length, length, *_x))
00149 else:
00150 buff.write(struct.pack('<I%ss'%length, length, _x))
00151 buff.write(_struct_B.pack(self.pointcloud.is_dense))
00152 except struct.error as se: self._check_types(se)
00153 except TypeError as te: self._check_types(te)
00154
00155 def deserialize(self, str):
00156 """
00157 unpack serialized message in str into this message instance
00158 :param str: byte array of serialized message, ``str``
00159 """
00160 try:
00161 if self.pointcloud is None:
00162 self.pointcloud = sensor_msgs.msg.PointCloud2()
00163 end = 0
00164 _x = self
00165 start = end
00166 end += 12
00167 (_x.pointcloud.header.seq, _x.pointcloud.header.stamp.secs, _x.pointcloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00168 start = end
00169 end += 4
00170 (length,) = _struct_I.unpack(str[start:end])
00171 start = end
00172 end += length
00173 if python3:
00174 self.pointcloud.header.frame_id = str[start:end].decode('utf-8')
00175 else:
00176 self.pointcloud.header.frame_id = str[start:end]
00177 _x = self
00178 start = end
00179 end += 8
00180 (_x.pointcloud.height, _x.pointcloud.width,) = _struct_2I.unpack(str[start:end])
00181 start = end
00182 end += 4
00183 (length,) = _struct_I.unpack(str[start:end])
00184 self.pointcloud.fields = []
00185 for i in range(0, length):
00186 val1 = sensor_msgs.msg.PointField()
00187 start = end
00188 end += 4
00189 (length,) = _struct_I.unpack(str[start:end])
00190 start = end
00191 end += length
00192 if python3:
00193 val1.name = str[start:end].decode('utf-8')
00194 else:
00195 val1.name = str[start:end]
00196 _x = val1
00197 start = end
00198 end += 9
00199 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00200 self.pointcloud.fields.append(val1)
00201 _x = self
00202 start = end
00203 end += 9
00204 (_x.pointcloud.is_bigendian, _x.pointcloud.point_step, _x.pointcloud.row_step,) = _struct_B2I.unpack(str[start:end])
00205 self.pointcloud.is_bigendian = bool(self.pointcloud.is_bigendian)
00206 start = end
00207 end += 4
00208 (length,) = _struct_I.unpack(str[start:end])
00209 start = end
00210 end += length
00211 if python3:
00212 self.pointcloud.data = str[start:end].decode('utf-8')
00213 else:
00214 self.pointcloud.data = str[start:end]
00215 start = end
00216 end += 1
00217 (self.pointcloud.is_dense,) = _struct_B.unpack(str[start:end])
00218 self.pointcloud.is_dense = bool(self.pointcloud.is_dense)
00219 return self
00220 except struct.error as e:
00221 raise genpy.DeserializationError(e)
00222
00223
00224 def serialize_numpy(self, buff, numpy):
00225 """
00226 serialize message with numpy array types into buffer
00227 :param buff: buffer, ``StringIO``
00228 :param numpy: numpy python module
00229 """
00230 try:
00231 _x = self
00232 buff.write(_struct_3I.pack(_x.pointcloud.header.seq, _x.pointcloud.header.stamp.secs, _x.pointcloud.header.stamp.nsecs))
00233 _x = self.pointcloud.header.frame_id
00234 length = len(_x)
00235 if python3 or type(_x) == unicode:
00236 _x = _x.encode('utf-8')
00237 length = len(_x)
00238 buff.write(struct.pack('<I%ss'%length, length, _x))
00239 _x = self
00240 buff.write(_struct_2I.pack(_x.pointcloud.height, _x.pointcloud.width))
00241 length = len(self.pointcloud.fields)
00242 buff.write(_struct_I.pack(length))
00243 for val1 in self.pointcloud.fields:
00244 _x = val1.name
00245 length = len(_x)
00246 if python3 or type(_x) == unicode:
00247 _x = _x.encode('utf-8')
00248 length = len(_x)
00249 buff.write(struct.pack('<I%ss'%length, length, _x))
00250 _x = val1
00251 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00252 _x = self
00253 buff.write(_struct_B2I.pack(_x.pointcloud.is_bigendian, _x.pointcloud.point_step, _x.pointcloud.row_step))
00254 _x = self.pointcloud.data
00255 length = len(_x)
00256
00257 if type(_x) in [list, tuple]:
00258 buff.write(struct.pack('<I%sB'%length, length, *_x))
00259 else:
00260 buff.write(struct.pack('<I%ss'%length, length, _x))
00261 buff.write(_struct_B.pack(self.pointcloud.is_dense))
00262 except struct.error as se: self._check_types(se)
00263 except TypeError as te: self._check_types(te)
00264
00265 def deserialize_numpy(self, str, numpy):
00266 """
00267 unpack serialized message in str into this message instance using numpy for array types
00268 :param str: byte array of serialized message, ``str``
00269 :param numpy: numpy python module
00270 """
00271 try:
00272 if self.pointcloud is None:
00273 self.pointcloud = sensor_msgs.msg.PointCloud2()
00274 end = 0
00275 _x = self
00276 start = end
00277 end += 12
00278 (_x.pointcloud.header.seq, _x.pointcloud.header.stamp.secs, _x.pointcloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00279 start = end
00280 end += 4
00281 (length,) = _struct_I.unpack(str[start:end])
00282 start = end
00283 end += length
00284 if python3:
00285 self.pointcloud.header.frame_id = str[start:end].decode('utf-8')
00286 else:
00287 self.pointcloud.header.frame_id = str[start:end]
00288 _x = self
00289 start = end
00290 end += 8
00291 (_x.pointcloud.height, _x.pointcloud.width,) = _struct_2I.unpack(str[start:end])
00292 start = end
00293 end += 4
00294 (length,) = _struct_I.unpack(str[start:end])
00295 self.pointcloud.fields = []
00296 for i in range(0, length):
00297 val1 = sensor_msgs.msg.PointField()
00298 start = end
00299 end += 4
00300 (length,) = _struct_I.unpack(str[start:end])
00301 start = end
00302 end += length
00303 if python3:
00304 val1.name = str[start:end].decode('utf-8')
00305 else:
00306 val1.name = str[start:end]
00307 _x = val1
00308 start = end
00309 end += 9
00310 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00311 self.pointcloud.fields.append(val1)
00312 _x = self
00313 start = end
00314 end += 9
00315 (_x.pointcloud.is_bigendian, _x.pointcloud.point_step, _x.pointcloud.row_step,) = _struct_B2I.unpack(str[start:end])
00316 self.pointcloud.is_bigendian = bool(self.pointcloud.is_bigendian)
00317 start = end
00318 end += 4
00319 (length,) = _struct_I.unpack(str[start:end])
00320 start = end
00321 end += length
00322 if python3:
00323 self.pointcloud.data = str[start:end].decode('utf-8')
00324 else:
00325 self.pointcloud.data = str[start:end]
00326 start = end
00327 end += 1
00328 (self.pointcloud.is_dense,) = _struct_B.unpack(str[start:end])
00329 self.pointcloud.is_dense = bool(self.pointcloud.is_dense)
00330 return self
00331 except struct.error as e:
00332 raise genpy.DeserializationError(e)
00333
00334 _struct_I = genpy.struct_I
00335 _struct_IBI = struct.Struct("<IBI")
00336 _struct_3I = struct.Struct("<3I")
00337 _struct_B = struct.Struct("<B")
00338 _struct_2I = struct.Struct("<2I")
00339 _struct_B2I = struct.Struct("<B2I")
00340 """autogenerated by genpy from iri_perception_msgs/PclToMarkerResponse.msg. Do not edit."""
00341 import sys
00342 python3 = True if sys.hexversion > 0x03000000 else False
00343 import genpy
00344 import struct
00345
00346 import genpy
00347 import geometry_msgs.msg
00348 import visualization_msgs.msg
00349 import std_msgs.msg
00350
00351 class PclToMarkerResponse(genpy.Message):
00352 _md5sum = "227a89e3d0c778686f83f2dd7b0caac4"
00353 _type = "iri_perception_msgs/PclToMarkerResponse"
00354 _has_header = False
00355 _full_text = """
00356 visualization_msgs/Marker marker
00357
00358
00359 ================================================================================
00360 MSG: visualization_msgs/Marker
00361 # See http://www.ros.org/wiki/rviz/DisplayTypes/Marker and http://www.ros.org/wiki/rviz/Tutorials/Markers%3A%20Basic%20Shapes for more information on using this message with rviz
00362
00363 uint8 ARROW=0
00364 uint8 CUBE=1
00365 uint8 SPHERE=2
00366 uint8 CYLINDER=3
00367 uint8 LINE_STRIP=4
00368 uint8 LINE_LIST=5
00369 uint8 CUBE_LIST=6
00370 uint8 SPHERE_LIST=7
00371 uint8 POINTS=8
00372 uint8 TEXT_VIEW_FACING=9
00373 uint8 MESH_RESOURCE=10
00374 uint8 TRIANGLE_LIST=11
00375
00376 uint8 ADD=0
00377 uint8 MODIFY=0
00378 uint8 DELETE=2
00379
00380 Header header # header for time/frame information
00381 string ns # Namespace to place this object in... used in conjunction with id to create a unique name for the object
00382 int32 id # object ID useful in conjunction with the namespace for manipulating and deleting the object later
00383 int32 type # Type of object
00384 int32 action # 0 add/modify an object, 1 (deprecated), 2 deletes an object
00385 geometry_msgs/Pose pose # Pose of the object
00386 geometry_msgs/Vector3 scale # Scale of the object 1,1,1 means default (usually 1 meter square)
00387 std_msgs/ColorRGBA color # Color [0.0-1.0]
00388 duration lifetime # How long the object should last before being automatically deleted. 0 means forever
00389 bool frame_locked # If this marker should be frame-locked, i.e. retransformed into its frame every timestep
00390
00391 #Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)
00392 geometry_msgs/Point[] points
00393 #Only used if the type specified has some use for them (eg. POINTS, LINE_STRIP, ...)
00394 #number of colors must either be 0 or equal to the number of points
00395 #NOTE: alpha is not yet used
00396 std_msgs/ColorRGBA[] colors
00397
00398 # NOTE: only used for text markers
00399 string text
00400
00401 # NOTE: only used for MESH_RESOURCE markers
00402 string mesh_resource
00403 bool mesh_use_embedded_materials
00404
00405 ================================================================================
00406 MSG: std_msgs/Header
00407 # Standard metadata for higher-level stamped data types.
00408 # This is generally used to communicate timestamped data
00409 # in a particular coordinate frame.
00410 #
00411 # sequence ID: consecutively increasing ID
00412 uint32 seq
00413 #Two-integer timestamp that is expressed as:
00414 # * stamp.secs: seconds (stamp_secs) since epoch
00415 # * stamp.nsecs: nanoseconds since stamp_secs
00416 # time-handling sugar is provided by the client library
00417 time stamp
00418 #Frame this data is associated with
00419 # 0: no frame
00420 # 1: global frame
00421 string frame_id
00422
00423 ================================================================================
00424 MSG: geometry_msgs/Pose
00425 # A representation of pose in free space, composed of postion and orientation.
00426 Point position
00427 Quaternion orientation
00428
00429 ================================================================================
00430 MSG: geometry_msgs/Point
00431 # This contains the position of a point in free space
00432 float64 x
00433 float64 y
00434 float64 z
00435
00436 ================================================================================
00437 MSG: geometry_msgs/Quaternion
00438 # This represents an orientation in free space in quaternion form.
00439
00440 float64 x
00441 float64 y
00442 float64 z
00443 float64 w
00444
00445 ================================================================================
00446 MSG: geometry_msgs/Vector3
00447 # This represents a vector in free space.
00448
00449 float64 x
00450 float64 y
00451 float64 z
00452 ================================================================================
00453 MSG: std_msgs/ColorRGBA
00454 float32 r
00455 float32 g
00456 float32 b
00457 float32 a
00458
00459 """
00460 __slots__ = ['marker']
00461 _slot_types = ['visualization_msgs/Marker']
00462
00463 def __init__(self, *args, **kwds):
00464 """
00465 Constructor. Any message fields that are implicitly/explicitly
00466 set to None will be assigned a default value. The recommend
00467 use is keyword arguments as this is more robust to future message
00468 changes. You cannot mix in-order arguments and keyword arguments.
00469
00470 The available fields are:
00471 marker
00472
00473 :param args: complete set of field values, in .msg order
00474 :param kwds: use keyword arguments corresponding to message field names
00475 to set specific fields.
00476 """
00477 if args or kwds:
00478 super(PclToMarkerResponse, self).__init__(*args, **kwds)
00479
00480 if self.marker is None:
00481 self.marker = visualization_msgs.msg.Marker()
00482 else:
00483 self.marker = visualization_msgs.msg.Marker()
00484
00485 def _get_types(self):
00486 """
00487 internal API method
00488 """
00489 return self._slot_types
00490
00491 def serialize(self, buff):
00492 """
00493 serialize message into buffer
00494 :param buff: buffer, ``StringIO``
00495 """
00496 try:
00497 _x = self
00498 buff.write(_struct_3I.pack(_x.marker.header.seq, _x.marker.header.stamp.secs, _x.marker.header.stamp.nsecs))
00499 _x = self.marker.header.frame_id
00500 length = len(_x)
00501 if python3 or type(_x) == unicode:
00502 _x = _x.encode('utf-8')
00503 length = len(_x)
00504 buff.write(struct.pack('<I%ss'%length, length, _x))
00505 _x = self.marker.ns
00506 length = len(_x)
00507 if python3 or type(_x) == unicode:
00508 _x = _x.encode('utf-8')
00509 length = len(_x)
00510 buff.write(struct.pack('<I%ss'%length, length, _x))
00511 _x = self
00512 buff.write(_struct_3i10d4f2iB.pack(_x.marker.id, _x.marker.type, _x.marker.action, _x.marker.pose.position.x, _x.marker.pose.position.y, _x.marker.pose.position.z, _x.marker.pose.orientation.x, _x.marker.pose.orientation.y, _x.marker.pose.orientation.z, _x.marker.pose.orientation.w, _x.marker.scale.x, _x.marker.scale.y, _x.marker.scale.z, _x.marker.color.r, _x.marker.color.g, _x.marker.color.b, _x.marker.color.a, _x.marker.lifetime.secs, _x.marker.lifetime.nsecs, _x.marker.frame_locked))
00513 length = len(self.marker.points)
00514 buff.write(_struct_I.pack(length))
00515 for val1 in self.marker.points:
00516 _x = val1
00517 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00518 length = len(self.marker.colors)
00519 buff.write(_struct_I.pack(length))
00520 for val1 in self.marker.colors:
00521 _x = val1
00522 buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a))
00523 _x = self.marker.text
00524 length = len(_x)
00525 if python3 or type(_x) == unicode:
00526 _x = _x.encode('utf-8')
00527 length = len(_x)
00528 buff.write(struct.pack('<I%ss'%length, length, _x))
00529 _x = self.marker.mesh_resource
00530 length = len(_x)
00531 if python3 or type(_x) == unicode:
00532 _x = _x.encode('utf-8')
00533 length = len(_x)
00534 buff.write(struct.pack('<I%ss'%length, length, _x))
00535 buff.write(_struct_B.pack(self.marker.mesh_use_embedded_materials))
00536 except struct.error as se: self._check_types(se)
00537 except TypeError as te: self._check_types(te)
00538
00539 def deserialize(self, str):
00540 """
00541 unpack serialized message in str into this message instance
00542 :param str: byte array of serialized message, ``str``
00543 """
00544 try:
00545 if self.marker is None:
00546 self.marker = visualization_msgs.msg.Marker()
00547 end = 0
00548 _x = self
00549 start = end
00550 end += 12
00551 (_x.marker.header.seq, _x.marker.header.stamp.secs, _x.marker.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00552 start = end
00553 end += 4
00554 (length,) = _struct_I.unpack(str[start:end])
00555 start = end
00556 end += length
00557 if python3:
00558 self.marker.header.frame_id = str[start:end].decode('utf-8')
00559 else:
00560 self.marker.header.frame_id = str[start:end]
00561 start = end
00562 end += 4
00563 (length,) = _struct_I.unpack(str[start:end])
00564 start = end
00565 end += length
00566 if python3:
00567 self.marker.ns = str[start:end].decode('utf-8')
00568 else:
00569 self.marker.ns = str[start:end]
00570 _x = self
00571 start = end
00572 end += 117
00573 (_x.marker.id, _x.marker.type, _x.marker.action, _x.marker.pose.position.x, _x.marker.pose.position.y, _x.marker.pose.position.z, _x.marker.pose.orientation.x, _x.marker.pose.orientation.y, _x.marker.pose.orientation.z, _x.marker.pose.orientation.w, _x.marker.scale.x, _x.marker.scale.y, _x.marker.scale.z, _x.marker.color.r, _x.marker.color.g, _x.marker.color.b, _x.marker.color.a, _x.marker.lifetime.secs, _x.marker.lifetime.nsecs, _x.marker.frame_locked,) = _struct_3i10d4f2iB.unpack(str[start:end])
00574 self.marker.frame_locked = bool(self.marker.frame_locked)
00575 start = end
00576 end += 4
00577 (length,) = _struct_I.unpack(str[start:end])
00578 self.marker.points = []
00579 for i in range(0, length):
00580 val1 = geometry_msgs.msg.Point()
00581 _x = val1
00582 start = end
00583 end += 24
00584 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00585 self.marker.points.append(val1)
00586 start = end
00587 end += 4
00588 (length,) = _struct_I.unpack(str[start:end])
00589 self.marker.colors = []
00590 for i in range(0, length):
00591 val1 = std_msgs.msg.ColorRGBA()
00592 _x = val1
00593 start = end
00594 end += 16
00595 (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end])
00596 self.marker.colors.append(val1)
00597 start = end
00598 end += 4
00599 (length,) = _struct_I.unpack(str[start:end])
00600 start = end
00601 end += length
00602 if python3:
00603 self.marker.text = str[start:end].decode('utf-8')
00604 else:
00605 self.marker.text = 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.marker.mesh_resource = str[start:end].decode('utf-8')
00613 else:
00614 self.marker.mesh_resource = str[start:end]
00615 start = end
00616 end += 1
00617 (self.marker.mesh_use_embedded_materials,) = _struct_B.unpack(str[start:end])
00618 self.marker.mesh_use_embedded_materials = bool(self.marker.mesh_use_embedded_materials)
00619 return self
00620 except struct.error as e:
00621 raise genpy.DeserializationError(e)
00622
00623
00624 def serialize_numpy(self, buff, numpy):
00625 """
00626 serialize message with numpy array types into buffer
00627 :param buff: buffer, ``StringIO``
00628 :param numpy: numpy python module
00629 """
00630 try:
00631 _x = self
00632 buff.write(_struct_3I.pack(_x.marker.header.seq, _x.marker.header.stamp.secs, _x.marker.header.stamp.nsecs))
00633 _x = self.marker.header.frame_id
00634 length = len(_x)
00635 if python3 or type(_x) == unicode:
00636 _x = _x.encode('utf-8')
00637 length = len(_x)
00638 buff.write(struct.pack('<I%ss'%length, length, _x))
00639 _x = self.marker.ns
00640 length = len(_x)
00641 if python3 or type(_x) == unicode:
00642 _x = _x.encode('utf-8')
00643 length = len(_x)
00644 buff.write(struct.pack('<I%ss'%length, length, _x))
00645 _x = self
00646 buff.write(_struct_3i10d4f2iB.pack(_x.marker.id, _x.marker.type, _x.marker.action, _x.marker.pose.position.x, _x.marker.pose.position.y, _x.marker.pose.position.z, _x.marker.pose.orientation.x, _x.marker.pose.orientation.y, _x.marker.pose.orientation.z, _x.marker.pose.orientation.w, _x.marker.scale.x, _x.marker.scale.y, _x.marker.scale.z, _x.marker.color.r, _x.marker.color.g, _x.marker.color.b, _x.marker.color.a, _x.marker.lifetime.secs, _x.marker.lifetime.nsecs, _x.marker.frame_locked))
00647 length = len(self.marker.points)
00648 buff.write(_struct_I.pack(length))
00649 for val1 in self.marker.points:
00650 _x = val1
00651 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00652 length = len(self.marker.colors)
00653 buff.write(_struct_I.pack(length))
00654 for val1 in self.marker.colors:
00655 _x = val1
00656 buff.write(_struct_4f.pack(_x.r, _x.g, _x.b, _x.a))
00657 _x = self.marker.text
00658 length = len(_x)
00659 if python3 or type(_x) == unicode:
00660 _x = _x.encode('utf-8')
00661 length = len(_x)
00662 buff.write(struct.pack('<I%ss'%length, length, _x))
00663 _x = self.marker.mesh_resource
00664 length = len(_x)
00665 if python3 or type(_x) == unicode:
00666 _x = _x.encode('utf-8')
00667 length = len(_x)
00668 buff.write(struct.pack('<I%ss'%length, length, _x))
00669 buff.write(_struct_B.pack(self.marker.mesh_use_embedded_materials))
00670 except struct.error as se: self._check_types(se)
00671 except TypeError as te: self._check_types(te)
00672
00673 def deserialize_numpy(self, str, numpy):
00674 """
00675 unpack serialized message in str into this message instance using numpy for array types
00676 :param str: byte array of serialized message, ``str``
00677 :param numpy: numpy python module
00678 """
00679 try:
00680 if self.marker is None:
00681 self.marker = visualization_msgs.msg.Marker()
00682 end = 0
00683 _x = self
00684 start = end
00685 end += 12
00686 (_x.marker.header.seq, _x.marker.header.stamp.secs, _x.marker.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00687 start = end
00688 end += 4
00689 (length,) = _struct_I.unpack(str[start:end])
00690 start = end
00691 end += length
00692 if python3:
00693 self.marker.header.frame_id = str[start:end].decode('utf-8')
00694 else:
00695 self.marker.header.frame_id = str[start:end]
00696 start = end
00697 end += 4
00698 (length,) = _struct_I.unpack(str[start:end])
00699 start = end
00700 end += length
00701 if python3:
00702 self.marker.ns = str[start:end].decode('utf-8')
00703 else:
00704 self.marker.ns = str[start:end]
00705 _x = self
00706 start = end
00707 end += 117
00708 (_x.marker.id, _x.marker.type, _x.marker.action, _x.marker.pose.position.x, _x.marker.pose.position.y, _x.marker.pose.position.z, _x.marker.pose.orientation.x, _x.marker.pose.orientation.y, _x.marker.pose.orientation.z, _x.marker.pose.orientation.w, _x.marker.scale.x, _x.marker.scale.y, _x.marker.scale.z, _x.marker.color.r, _x.marker.color.g, _x.marker.color.b, _x.marker.color.a, _x.marker.lifetime.secs, _x.marker.lifetime.nsecs, _x.marker.frame_locked,) = _struct_3i10d4f2iB.unpack(str[start:end])
00709 self.marker.frame_locked = bool(self.marker.frame_locked)
00710 start = end
00711 end += 4
00712 (length,) = _struct_I.unpack(str[start:end])
00713 self.marker.points = []
00714 for i in range(0, length):
00715 val1 = geometry_msgs.msg.Point()
00716 _x = val1
00717 start = end
00718 end += 24
00719 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00720 self.marker.points.append(val1)
00721 start = end
00722 end += 4
00723 (length,) = _struct_I.unpack(str[start:end])
00724 self.marker.colors = []
00725 for i in range(0, length):
00726 val1 = std_msgs.msg.ColorRGBA()
00727 _x = val1
00728 start = end
00729 end += 16
00730 (_x.r, _x.g, _x.b, _x.a,) = _struct_4f.unpack(str[start:end])
00731 self.marker.colors.append(val1)
00732 start = end
00733 end += 4
00734 (length,) = _struct_I.unpack(str[start:end])
00735 start = end
00736 end += length
00737 if python3:
00738 self.marker.text = str[start:end].decode('utf-8')
00739 else:
00740 self.marker.text = str[start:end]
00741 start = end
00742 end += 4
00743 (length,) = _struct_I.unpack(str[start:end])
00744 start = end
00745 end += length
00746 if python3:
00747 self.marker.mesh_resource = str[start:end].decode('utf-8')
00748 else:
00749 self.marker.mesh_resource = str[start:end]
00750 start = end
00751 end += 1
00752 (self.marker.mesh_use_embedded_materials,) = _struct_B.unpack(str[start:end])
00753 self.marker.mesh_use_embedded_materials = bool(self.marker.mesh_use_embedded_materials)
00754 return self
00755 except struct.error as e:
00756 raise genpy.DeserializationError(e)
00757
00758 _struct_I = genpy.struct_I
00759 _struct_4f = struct.Struct("<4f")
00760 _struct_3I = struct.Struct("<3I")
00761 _struct_B = struct.Struct("<B")
00762 _struct_3i10d4f2iB = struct.Struct("<3i10d4f2iB")
00763 _struct_3d = struct.Struct("<3d")
00764 class PclToMarker(object):
00765 _type = 'iri_perception_msgs/PclToMarker'
00766 _md5sum = 'e8ebdfd2bdabaf1623d8d3b6f7d39096'
00767 _request_class = PclToMarkerRequest
00768 _response_class = PclToMarkerResponse