00001 """autogenerated by genpy from triangulate_point_cloud/TriangulatePCLRequest.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 geometry_msgs.msg
00008 import std_msgs.msg
00009 import sensor_msgs.msg
00010
00011 class TriangulatePCLRequest(genpy.Message):
00012 _md5sum = "54a80efa9f266878f68875ef84938b67"
00013 _type = "triangulate_point_cloud/TriangulatePCLRequest"
00014 _has_header = False
00015 _full_text = """sensor_msgs/PointCloud points
00016
00017 ================================================================================
00018 MSG: sensor_msgs/PointCloud
00019 # This message holds a collection of 3d points, plus optional additional
00020 # information about each point.
00021
00022 # Time of sensor data acquisition, coordinate frame ID.
00023 Header header
00024
00025 # Array of 3d points. Each Point32 should be interpreted as a 3d point
00026 # in the frame given in the header.
00027 geometry_msgs/Point32[] points
00028
00029 # Each channel should have the same number of elements as points array,
00030 # and the data in each channel should correspond 1:1 with each point.
00031 # Channel names in common practice are listed in ChannelFloat32.msg.
00032 ChannelFloat32[] channels
00033
00034 ================================================================================
00035 MSG: std_msgs/Header
00036 # Standard metadata for higher-level stamped data types.
00037 # This is generally used to communicate timestamped data
00038 # in a particular coordinate frame.
00039 #
00040 # sequence ID: consecutively increasing ID
00041 uint32 seq
00042 #Two-integer timestamp that is expressed as:
00043 # * stamp.secs: seconds (stamp_secs) since epoch
00044 # * stamp.nsecs: nanoseconds since stamp_secs
00045 # time-handling sugar is provided by the client library
00046 time stamp
00047 #Frame this data is associated with
00048 # 0: no frame
00049 # 1: global frame
00050 string frame_id
00051
00052 ================================================================================
00053 MSG: geometry_msgs/Point32
00054 # This contains the position of a point in free space(with 32 bits of precision).
00055 # It is recommeded to use Point wherever possible instead of Point32.
00056 #
00057 # This recommendation is to promote interoperability.
00058 #
00059 # This message is designed to take up less space when sending
00060 # lots of points at once, as in the case of a PointCloud.
00061
00062 float32 x
00063 float32 y
00064 float32 z
00065 ================================================================================
00066 MSG: sensor_msgs/ChannelFloat32
00067 # This message is used by the PointCloud message to hold optional data
00068 # associated with each point in the cloud. The length of the values
00069 # array should be the same as the length of the points array in the
00070 # PointCloud, and each value should be associated with the corresponding
00071 # point.
00072
00073 # Channel names in existing practice include:
00074 # "u", "v" - row and column (respectively) in the left stereo image.
00075 # This is opposite to usual conventions but remains for
00076 # historical reasons. The newer PointCloud2 message has no
00077 # such problem.
00078 # "rgb" - For point clouds produced by color stereo cameras. uint8
00079 # (R,G,B) values packed into the least significant 24 bits,
00080 # in order.
00081 # "intensity" - laser or pixel intensity.
00082 # "distance"
00083
00084 # The channel name should give semantics of the channel (e.g.
00085 # "intensity" instead of "value").
00086 string name
00087
00088 # The values array should be 1-1 with the elements of the associated
00089 # PointCloud.
00090 float32[] values
00091
00092 """
00093 __slots__ = ['points']
00094 _slot_types = ['sensor_msgs/PointCloud']
00095
00096 def __init__(self, *args, **kwds):
00097 """
00098 Constructor. Any message fields that are implicitly/explicitly
00099 set to None will be assigned a default value. The recommend
00100 use is keyword arguments as this is more robust to future message
00101 changes. You cannot mix in-order arguments and keyword arguments.
00102
00103 The available fields are:
00104 points
00105
00106 :param args: complete set of field values, in .msg order
00107 :param kwds: use keyword arguments corresponding to message field names
00108 to set specific fields.
00109 """
00110 if args or kwds:
00111 super(TriangulatePCLRequest, self).__init__(*args, **kwds)
00112 #message fields cannot be None, assign default values for those that are
00113 if self.points is None:
00114 self.points = sensor_msgs.msg.PointCloud()
00115 else:
00116 self.points = sensor_msgs.msg.PointCloud()
00117
00118 def _get_types(self):
00119 """
00120 internal API method
00121 """
00122 return self._slot_types
00123
00124 def serialize(self, buff):
00125 """
00126 serialize message into buffer
00127 :param buff: buffer, ``StringIO``
00128 """
00129 try:
00130 _x = self
00131 buff.write(_struct_3I.pack(_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs))
00132 _x = self.points.header.frame_id
00133 length = len(_x)
00134 if python3 or type(_x) == unicode:
00135 _x = _x.encode('utf-8')
00136 length = len(_x)
00137 buff.write(struct.pack('<I%ss'%length, length, _x))
00138 length = len(self.points.points)
00139 buff.write(_struct_I.pack(length))
00140 for val1 in self.points.points:
00141 _x = val1
00142 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00143 length = len(self.points.channels)
00144 buff.write(_struct_I.pack(length))
00145 for val1 in self.points.channels:
00146 _x = val1.name
00147 length = len(_x)
00148 if python3 or type(_x) == unicode:
00149 _x = _x.encode('utf-8')
00150 length = len(_x)
00151 buff.write(struct.pack('<I%ss'%length, length, _x))
00152 length = len(val1.values)
00153 buff.write(_struct_I.pack(length))
00154 pattern = '<%sf'%length
00155 buff.write(struct.pack(pattern, *val1.values))
00156 except struct.error as se: self._check_types(se)
00157 except TypeError as te: self._check_types(te)
00158
00159 def deserialize(self, str):
00160 """
00161 unpack serialized message in str into this message instance
00162 :param str: byte array of serialized message, ``str``
00163 """
00164 try:
00165 if self.points is None:
00166 self.points = sensor_msgs.msg.PointCloud()
00167 end = 0
00168 _x = self
00169 start = end
00170 end += 12
00171 (_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00172 start = end
00173 end += 4
00174 (length,) = _struct_I.unpack(str[start:end])
00175 start = end
00176 end += length
00177 if python3:
00178 self.points.header.frame_id = str[start:end].decode('utf-8')
00179 else:
00180 self.points.header.frame_id = str[start:end]
00181 start = end
00182 end += 4
00183 (length,) = _struct_I.unpack(str[start:end])
00184 self.points.points = []
00185 for i in range(0, length):
00186 val1 = geometry_msgs.msg.Point32()
00187 _x = val1
00188 start = end
00189 end += 12
00190 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00191 self.points.points.append(val1)
00192 start = end
00193 end += 4
00194 (length,) = _struct_I.unpack(str[start:end])
00195 self.points.channels = []
00196 for i in range(0, length):
00197 val1 = sensor_msgs.msg.ChannelFloat32()
00198 start = end
00199 end += 4
00200 (length,) = _struct_I.unpack(str[start:end])
00201 start = end
00202 end += length
00203 if python3:
00204 val1.name = str[start:end].decode('utf-8')
00205 else:
00206 val1.name = str[start:end]
00207 start = end
00208 end += 4
00209 (length,) = _struct_I.unpack(str[start:end])
00210 pattern = '<%sf'%length
00211 start = end
00212 end += struct.calcsize(pattern)
00213 val1.values = struct.unpack(pattern, str[start:end])
00214 self.points.channels.append(val1)
00215 return self
00216 except struct.error as e:
00217 raise genpy.DeserializationError(e) #most likely buffer underfill
00218
00219
00220 def serialize_numpy(self, buff, numpy):
00221 """
00222 serialize message with numpy array types into buffer
00223 :param buff: buffer, ``StringIO``
00224 :param numpy: numpy python module
00225 """
00226 try:
00227 _x = self
00228 buff.write(_struct_3I.pack(_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs))
00229 _x = self.points.header.frame_id
00230 length = len(_x)
00231 if python3 or type(_x) == unicode:
00232 _x = _x.encode('utf-8')
00233 length = len(_x)
00234 buff.write(struct.pack('<I%ss'%length, length, _x))
00235 length = len(self.points.points)
00236 buff.write(_struct_I.pack(length))
00237 for val1 in self.points.points:
00238 _x = val1
00239 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00240 length = len(self.points.channels)
00241 buff.write(_struct_I.pack(length))
00242 for val1 in self.points.channels:
00243 _x = val1.name
00244 length = len(_x)
00245 if python3 or type(_x) == unicode:
00246 _x = _x.encode('utf-8')
00247 length = len(_x)
00248 buff.write(struct.pack('<I%ss'%length, length, _x))
00249 length = len(val1.values)
00250 buff.write(_struct_I.pack(length))
00251 pattern = '<%sf'%length
00252 buff.write(val1.values.tostring())
00253 except struct.error as se: self._check_types(se)
00254 except TypeError as te: self._check_types(te)
00255
00256 def deserialize_numpy(self, str, numpy):
00257 """
00258 unpack serialized message in str into this message instance using numpy for array types
00259 :param str: byte array of serialized message, ``str``
00260 :param numpy: numpy python module
00261 """
00262 try:
00263 if self.points is None:
00264 self.points = sensor_msgs.msg.PointCloud()
00265 end = 0
00266 _x = self
00267 start = end
00268 end += 12
00269 (_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00270 start = end
00271 end += 4
00272 (length,) = _struct_I.unpack(str[start:end])
00273 start = end
00274 end += length
00275 if python3:
00276 self.points.header.frame_id = str[start:end].decode('utf-8')
00277 else:
00278 self.points.header.frame_id = str[start:end]
00279 start = end
00280 end += 4
00281 (length,) = _struct_I.unpack(str[start:end])
00282 self.points.points = []
00283 for i in range(0, length):
00284 val1 = geometry_msgs.msg.Point32()
00285 _x = val1
00286 start = end
00287 end += 12
00288 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00289 self.points.points.append(val1)
00290 start = end
00291 end += 4
00292 (length,) = _struct_I.unpack(str[start:end])
00293 self.points.channels = []
00294 for i in range(0, length):
00295 val1 = sensor_msgs.msg.ChannelFloat32()
00296 start = end
00297 end += 4
00298 (length,) = _struct_I.unpack(str[start:end])
00299 start = end
00300 end += length
00301 if python3:
00302 val1.name = str[start:end].decode('utf-8')
00303 else:
00304 val1.name = str[start:end]
00305 start = end
00306 end += 4
00307 (length,) = _struct_I.unpack(str[start:end])
00308 pattern = '<%sf'%length
00309 start = end
00310 end += struct.calcsize(pattern)
00311 val1.values = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00312 self.points.channels.append(val1)
00313 return self
00314 except struct.error as e:
00315 raise genpy.DeserializationError(e) #most likely buffer underfill
00316
00317 _struct_I = genpy.struct_I
00318 _struct_3I = struct.Struct("<3I")
00319 _struct_3f = struct.Struct("<3f")
00320 """autogenerated by genpy from triangulate_point_cloud/TriangulatePCLResponse.msg. Do not edit."""
00321 import sys
00322 python3 = True if sys.hexversion > 0x03000000 else False
00323 import genpy
00324 import struct
00325
00326 import arm_navigation_msgs.msg
00327 import geometry_msgs.msg
00328
00329 class TriangulatePCLResponse(genpy.Message):
00330 _md5sum = "59c4b22062858a80399727c45ed4b30b"
00331 _type = "triangulate_point_cloud/TriangulatePCLResponse"
00332 _has_header = False #flag to mark the presence of a Header object
00333 _full_text = """arm_navigation_msgs/Shape mesh
00334
00335
00336 ================================================================================
00337 MSG: arm_navigation_msgs/Shape
00338 byte SPHERE=0
00339 byte BOX=1
00340 byte CYLINDER=2
00341 byte MESH=3
00342
00343 byte type
00344
00345
00346 #### define sphere, box, cylinder ####
00347 # the origin of each shape is considered at the shape's center
00348
00349 # for sphere
00350 # radius := dimensions[0]
00351
00352 # for cylinder
00353 # radius := dimensions[0]
00354 # length := dimensions[1]
00355 # the length is along the Z axis
00356
00357 # for box
00358 # size_x := dimensions[0]
00359 # size_y := dimensions[1]
00360 # size_z := dimensions[2]
00361 float64[] dimensions
00362
00363
00364 #### define mesh ####
00365
00366 # list of triangles; triangle k is defined by tre vertices located
00367 # at indices triangles[3k], triangles[3k+1], triangles[3k+2]
00368 int32[] triangles
00369 geometry_msgs/Point[] vertices
00370
00371 ================================================================================
00372 MSG: geometry_msgs/Point
00373 # This contains the position of a point in free space
00374 float64 x
00375 float64 y
00376 float64 z
00377
00378 """
00379 __slots__ = ['mesh']
00380 _slot_types = ['arm_navigation_msgs/Shape']
00381
00382 def __init__(self, *args, **kwds):
00383 """
00384 Constructor. Any message fields that are implicitly/explicitly
00385 set to None will be assigned a default value. The recommend
00386 use is keyword arguments as this is more robust to future message
00387 changes. You cannot mix in-order arguments and keyword arguments.
00388
00389 The available fields are:
00390 mesh
00391
00392 :param args: complete set of field values, in .msg order
00393 :param kwds: use keyword arguments corresponding to message field names
00394 to set specific fields.
00395 """
00396 if args or kwds:
00397 super(TriangulatePCLResponse, self).__init__(*args, **kwds)
00398 #message fields cannot be None, assign default values for those that are
00399 if self.mesh is None:
00400 self.mesh = arm_navigation_msgs.msg.Shape()
00401 else:
00402 self.mesh = arm_navigation_msgs.msg.Shape()
00403
00404 def _get_types(self):
00405 """
00406 internal API method
00407 """
00408 return self._slot_types
00409
00410 def serialize(self, buff):
00411 """
00412 serialize message into buffer
00413 :param buff: buffer, ``StringIO``
00414 """
00415 try:
00416 buff.write(_struct_b.pack(self.mesh.type))
00417 length = len(self.mesh.dimensions)
00418 buff.write(_struct_I.pack(length))
00419 pattern = '<%sd'%length
00420 buff.write(struct.pack(pattern, *self.mesh.dimensions))
00421 length = len(self.mesh.triangles)
00422 buff.write(_struct_I.pack(length))
00423 pattern = '<%si'%length
00424 buff.write(struct.pack(pattern, *self.mesh.triangles))
00425 length = len(self.mesh.vertices)
00426 buff.write(_struct_I.pack(length))
00427 for val1 in self.mesh.vertices:
00428 _x = val1
00429 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00430 except struct.error as se: self._check_types(se)
00431 except TypeError as te: self._check_types(te)
00432
00433 def deserialize(self, str):
00434 """
00435 unpack serialized message in str into this message instance
00436 :param str: byte array of serialized message, ``str``
00437 """
00438 try:
00439 if self.mesh is None:
00440 self.mesh = arm_navigation_msgs.msg.Shape()
00441 end = 0
00442 start = end
00443 end += 1
00444 (self.mesh.type,) = _struct_b.unpack(str[start:end])
00445 start = end
00446 end += 4
00447 (length,) = _struct_I.unpack(str[start:end])
00448 pattern = '<%sd'%length
00449 start = end
00450 end += struct.calcsize(pattern)
00451 self.mesh.dimensions = struct.unpack(pattern, str[start:end])
00452 start = end
00453 end += 4
00454 (length,) = _struct_I.unpack(str[start:end])
00455 pattern = '<%si'%length
00456 start = end
00457 end += struct.calcsize(pattern)
00458 self.mesh.triangles = struct.unpack(pattern, str[start:end])
00459 start = end
00460 end += 4
00461 (length,) = _struct_I.unpack(str[start:end])
00462 self.mesh.vertices = []
00463 for i in range(0, length):
00464 val1 = geometry_msgs.msg.Point()
00465 _x = val1
00466 start = end
00467 end += 24
00468 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00469 self.mesh.vertices.append(val1)
00470 return self
00471 except struct.error as e:
00472 raise genpy.DeserializationError(e) #most likely buffer underfill
00473
00474
00475 def serialize_numpy(self, buff, numpy):
00476 """
00477 serialize message with numpy array types into buffer
00478 :param buff: buffer, ``StringIO``
00479 :param numpy: numpy python module
00480 """
00481 try:
00482 buff.write(_struct_b.pack(self.mesh.type))
00483 length = len(self.mesh.dimensions)
00484 buff.write(_struct_I.pack(length))
00485 pattern = '<%sd'%length
00486 buff.write(self.mesh.dimensions.tostring())
00487 length = len(self.mesh.triangles)
00488 buff.write(_struct_I.pack(length))
00489 pattern = '<%si'%length
00490 buff.write(self.mesh.triangles.tostring())
00491 length = len(self.mesh.vertices)
00492 buff.write(_struct_I.pack(length))
00493 for val1 in self.mesh.vertices:
00494 _x = val1
00495 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00496 except struct.error as se: self._check_types(se)
00497 except TypeError as te: self._check_types(te)
00498
00499 def deserialize_numpy(self, str, numpy):
00500 """
00501 unpack serialized message in str into this message instance using numpy for array types
00502 :param str: byte array of serialized message, ``str``
00503 :param numpy: numpy python module
00504 """
00505 try:
00506 if self.mesh is None:
00507 self.mesh = arm_navigation_msgs.msg.Shape()
00508 end = 0
00509 start = end
00510 end += 1
00511 (self.mesh.type,) = _struct_b.unpack(str[start:end])
00512 start = end
00513 end += 4
00514 (length,) = _struct_I.unpack(str[start:end])
00515 pattern = '<%sd'%length
00516 start = end
00517 end += struct.calcsize(pattern)
00518 self.mesh.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00519 start = end
00520 end += 4
00521 (length,) = _struct_I.unpack(str[start:end])
00522 pattern = '<%si'%length
00523 start = end
00524 end += struct.calcsize(pattern)
00525 self.mesh.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00526 start = end
00527 end += 4
00528 (length,) = _struct_I.unpack(str[start:end])
00529 self.mesh.vertices = []
00530 for i in range(0, length):
00531 val1 = geometry_msgs.msg.Point()
00532 _x = val1
00533 start = end
00534 end += 24
00535 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00536 self.mesh.vertices.append(val1)
00537 return self
00538 except struct.error as e:
00539 raise genpy.DeserializationError(e) #most likely buffer underfill
00540
00541 _struct_I = genpy.struct_I
00542 _struct_b = struct.Struct("<b")
00543 _struct_3d = struct.Struct("<3d")
00544 class TriangulatePCL(object):
00545 _type = 'triangulate_point_cloud/TriangulatePCL'
00546 _md5sum = '16df6b20004d1e78fbef415618cd54be'
00547 _request_class = TriangulatePCLRequest
00548 _response_class = TriangulatePCLResponse