00001 """autogenerated by genpy from arm_navigation_msgs/GetCollisionObjectsRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class GetCollisionObjectsRequest(genpy.Message):
00009 _md5sum = "3ae7288b23c84452d229e442c1673708"
00010 _type = "arm_navigation_msgs/GetCollisionObjectsRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015 bool include_points
00016
00017 """
00018 __slots__ = ['include_points']
00019 _slot_types = ['bool']
00020
00021 def __init__(self, *args, **kwds):
00022 """
00023 Constructor. Any message fields that are implicitly/explicitly
00024 set to None will be assigned a default value. The recommend
00025 use is keyword arguments as this is more robust to future message
00026 changes. You cannot mix in-order arguments and keyword arguments.
00027
00028 The available fields are:
00029 include_points
00030
00031 :param args: complete set of field values, in .msg order
00032 :param kwds: use keyword arguments corresponding to message field names
00033 to set specific fields.
00034 """
00035 if args or kwds:
00036 super(GetCollisionObjectsRequest, self).__init__(*args, **kwds)
00037
00038 if self.include_points is None:
00039 self.include_points = False
00040 else:
00041 self.include_points = False
00042
00043 def _get_types(self):
00044 """
00045 internal API method
00046 """
00047 return self._slot_types
00048
00049 def serialize(self, buff):
00050 """
00051 serialize message into buffer
00052 :param buff: buffer, ``StringIO``
00053 """
00054 try:
00055 buff.write(_struct_B.pack(self.include_points))
00056 except struct.error as se: self._check_types(se)
00057 except TypeError as te: self._check_types(te)
00058
00059 def deserialize(self, str):
00060 """
00061 unpack serialized message in str into this message instance
00062 :param str: byte array of serialized message, ``str``
00063 """
00064 try:
00065 end = 0
00066 start = end
00067 end += 1
00068 (self.include_points,) = _struct_B.unpack(str[start:end])
00069 self.include_points = bool(self.include_points)
00070 return self
00071 except struct.error as e:
00072 raise genpy.DeserializationError(e)
00073
00074
00075 def serialize_numpy(self, buff, numpy):
00076 """
00077 serialize message with numpy array types into buffer
00078 :param buff: buffer, ``StringIO``
00079 :param numpy: numpy python module
00080 """
00081 try:
00082 buff.write(_struct_B.pack(self.include_points))
00083 except struct.error as se: self._check_types(se)
00084 except TypeError as te: self._check_types(te)
00085
00086 def deserialize_numpy(self, str, numpy):
00087 """
00088 unpack serialized message in str into this message instance using numpy for array types
00089 :param str: byte array of serialized message, ``str``
00090 :param numpy: numpy python module
00091 """
00092 try:
00093 end = 0
00094 start = end
00095 end += 1
00096 (self.include_points,) = _struct_B.unpack(str[start:end])
00097 self.include_points = bool(self.include_points)
00098 return self
00099 except struct.error as e:
00100 raise genpy.DeserializationError(e)
00101
00102 _struct_I = genpy.struct_I
00103 _struct_B = struct.Struct("<B")
00104 """autogenerated by genpy from arm_navigation_msgs/GetCollisionObjectsResponse.msg. Do not edit."""
00105 import sys
00106 python3 = True if sys.hexversion > 0x03000000 else False
00107 import genpy
00108 import struct
00109
00110 import arm_navigation_msgs.msg
00111 import geometry_msgs.msg
00112 import std_msgs.msg
00113
00114 class GetCollisionObjectsResponse(genpy.Message):
00115 _md5sum = "c361b849f4eb74ea667a930b0b9dc801"
00116 _type = "arm_navigation_msgs/GetCollisionObjectsResponse"
00117 _has_header = False
00118 _full_text = """
00119 arm_navigation_msgs/CollisionMap points
00120
00121 arm_navigation_msgs/CollisionObject[] collision_objects
00122
00123 arm_navigation_msgs/AttachedCollisionObject[] attached_collision_objects
00124
00125
00126 ================================================================================
00127 MSG: arm_navigation_msgs/CollisionMap
00128 #header for interpreting box positions
00129 Header header
00130
00131 #boxes for use in collision testing
00132 OrientedBoundingBox[] boxes
00133
00134 ================================================================================
00135 MSG: std_msgs/Header
00136 # Standard metadata for higher-level stamped data types.
00137 # This is generally used to communicate timestamped data
00138 # in a particular coordinate frame.
00139 #
00140 # sequence ID: consecutively increasing ID
00141 uint32 seq
00142 #Two-integer timestamp that is expressed as:
00143 # * stamp.secs: seconds (stamp_secs) since epoch
00144 # * stamp.nsecs: nanoseconds since stamp_secs
00145 # time-handling sugar is provided by the client library
00146 time stamp
00147 #Frame this data is associated with
00148 # 0: no frame
00149 # 1: global frame
00150 string frame_id
00151
00152 ================================================================================
00153 MSG: arm_navigation_msgs/OrientedBoundingBox
00154 #the center of the box
00155 geometry_msgs/Point32 center
00156
00157 #the extents of the box, assuming the center is at the point
00158 geometry_msgs/Point32 extents
00159
00160 #the axis of the box
00161 geometry_msgs/Point32 axis
00162
00163 #the angle of rotation around the axis
00164 float32 angle
00165
00166 ================================================================================
00167 MSG: geometry_msgs/Point32
00168 # This contains the position of a point in free space(with 32 bits of precision).
00169 # It is recommeded to use Point wherever possible instead of Point32.
00170 #
00171 # This recommendation is to promote interoperability.
00172 #
00173 # This message is designed to take up less space when sending
00174 # lots of points at once, as in the case of a PointCloud.
00175
00176 float32 x
00177 float32 y
00178 float32 z
00179 ================================================================================
00180 MSG: arm_navigation_msgs/CollisionObject
00181 # a header, used for interpreting the poses
00182 Header header
00183
00184 # the id of the object
00185 string id
00186
00187 # The padding used for filtering points near the object.
00188 # This does not affect collision checking for the object.
00189 # Set to negative to get zero padding.
00190 float32 padding
00191
00192 #This contains what is to be done with the object
00193 CollisionObjectOperation operation
00194
00195 #the shapes associated with the object
00196 arm_navigation_msgs/Shape[] shapes
00197
00198 #the poses associated with the shapes - will be transformed using the header
00199 geometry_msgs/Pose[] poses
00200
00201 ================================================================================
00202 MSG: arm_navigation_msgs/CollisionObjectOperation
00203 #Puts the object into the environment
00204 #or updates the object if already added
00205 byte ADD=0
00206
00207 #Removes the object from the environment entirely
00208 byte REMOVE=1
00209
00210 #Only valid within the context of a CollisionAttachedObject message
00211 #Will be ignored if sent with an CollisionObject message
00212 #Takes an attached object, detaches from the attached link
00213 #But adds back in as regular object
00214 byte DETACH_AND_ADD_AS_OBJECT=2
00215
00216 #Only valid within the context of a CollisionAttachedObject message
00217 #Will be ignored if sent with an CollisionObject message
00218 #Takes current object in the environment and removes it as
00219 #a regular object
00220 byte ATTACH_AND_REMOVE_AS_OBJECT=3
00221
00222 # Byte code for operation
00223 byte operation
00224
00225 ================================================================================
00226 MSG: arm_navigation_msgs/Shape
00227 byte SPHERE=0
00228 byte BOX=1
00229 byte CYLINDER=2
00230 byte MESH=3
00231
00232 byte type
00233
00234
00235 #### define sphere, box, cylinder ####
00236 # the origin of each shape is considered at the shape's center
00237
00238 # for sphere
00239 # radius := dimensions[0]
00240
00241 # for cylinder
00242 # radius := dimensions[0]
00243 # length := dimensions[1]
00244 # the length is along the Z axis
00245
00246 # for box
00247 # size_x := dimensions[0]
00248 # size_y := dimensions[1]
00249 # size_z := dimensions[2]
00250 float64[] dimensions
00251
00252
00253 #### define mesh ####
00254
00255 # list of triangles; triangle k is defined by tre vertices located
00256 # at indices triangles[3k], triangles[3k+1], triangles[3k+2]
00257 int32[] triangles
00258 geometry_msgs/Point[] vertices
00259
00260 ================================================================================
00261 MSG: geometry_msgs/Point
00262 # This contains the position of a point in free space
00263 float64 x
00264 float64 y
00265 float64 z
00266
00267 ================================================================================
00268 MSG: geometry_msgs/Pose
00269 # A representation of pose in free space, composed of postion and orientation.
00270 Point position
00271 Quaternion orientation
00272
00273 ================================================================================
00274 MSG: geometry_msgs/Quaternion
00275 # This represents an orientation in free space in quaternion form.
00276
00277 float64 x
00278 float64 y
00279 float64 z
00280 float64 w
00281
00282 ================================================================================
00283 MSG: arm_navigation_msgs/AttachedCollisionObject
00284 # The CollisionObject will be attached with a fixed joint to this link
00285 # If link name is set to REMOVE_ALL_ATTACHED_OBJECTS and object.operation
00286 # is set to REMOVE will remove all attached bodies attached to any object
00287 string link_name
00288
00289 #Reserved for indicating that all attached objects should be removed
00290 string REMOVE_ALL_ATTACHED_OBJECTS = "all"
00291
00292 #This contains the actual shapes and poses for the CollisionObject
00293 #to be attached to the link
00294 #If action is remove and no object.id is set, all objects
00295 #attached to the link indicated by link_name will be removed
00296 CollisionObject object
00297
00298 # The set of links that the attached objects are allowed to touch
00299 # by default - the link_name is included by default
00300 string[] touch_links
00301
00302 """
00303 __slots__ = ['points','collision_objects','attached_collision_objects']
00304 _slot_types = ['arm_navigation_msgs/CollisionMap','arm_navigation_msgs/CollisionObject[]','arm_navigation_msgs/AttachedCollisionObject[]']
00305
00306 def __init__(self, *args, **kwds):
00307 """
00308 Constructor. Any message fields that are implicitly/explicitly
00309 set to None will be assigned a default value. The recommend
00310 use is keyword arguments as this is more robust to future message
00311 changes. You cannot mix in-order arguments and keyword arguments.
00312
00313 The available fields are:
00314 points,collision_objects,attached_collision_objects
00315
00316 :param args: complete set of field values, in .msg order
00317 :param kwds: use keyword arguments corresponding to message field names
00318 to set specific fields.
00319 """
00320 if args or kwds:
00321 super(GetCollisionObjectsResponse, self).__init__(*args, **kwds)
00322
00323 if self.points is None:
00324 self.points = arm_navigation_msgs.msg.CollisionMap()
00325 if self.collision_objects is None:
00326 self.collision_objects = []
00327 if self.attached_collision_objects is None:
00328 self.attached_collision_objects = []
00329 else:
00330 self.points = arm_navigation_msgs.msg.CollisionMap()
00331 self.collision_objects = []
00332 self.attached_collision_objects = []
00333
00334 def _get_types(self):
00335 """
00336 internal API method
00337 """
00338 return self._slot_types
00339
00340 def serialize(self, buff):
00341 """
00342 serialize message into buffer
00343 :param buff: buffer, ``StringIO``
00344 """
00345 try:
00346 _x = self
00347 buff.write(_struct_3I.pack(_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs))
00348 _x = self.points.header.frame_id
00349 length = len(_x)
00350 if python3 or type(_x) == unicode:
00351 _x = _x.encode('utf-8')
00352 length = len(_x)
00353 buff.write(struct.pack('<I%ss'%length, length, _x))
00354 length = len(self.points.boxes)
00355 buff.write(_struct_I.pack(length))
00356 for val1 in self.points.boxes:
00357 _v1 = val1.center
00358 _x = _v1
00359 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00360 _v2 = val1.extents
00361 _x = _v2
00362 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00363 _v3 = val1.axis
00364 _x = _v3
00365 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00366 buff.write(_struct_f.pack(val1.angle))
00367 length = len(self.collision_objects)
00368 buff.write(_struct_I.pack(length))
00369 for val1 in self.collision_objects:
00370 _v4 = val1.header
00371 buff.write(_struct_I.pack(_v4.seq))
00372 _v5 = _v4.stamp
00373 _x = _v5
00374 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00375 _x = _v4.frame_id
00376 length = len(_x)
00377 if python3 or type(_x) == unicode:
00378 _x = _x.encode('utf-8')
00379 length = len(_x)
00380 buff.write(struct.pack('<I%ss'%length, length, _x))
00381 _x = val1.id
00382 length = len(_x)
00383 if python3 or type(_x) == unicode:
00384 _x = _x.encode('utf-8')
00385 length = len(_x)
00386 buff.write(struct.pack('<I%ss'%length, length, _x))
00387 buff.write(_struct_f.pack(val1.padding))
00388 _v6 = val1.operation
00389 buff.write(_struct_b.pack(_v6.operation))
00390 length = len(val1.shapes)
00391 buff.write(_struct_I.pack(length))
00392 for val2 in val1.shapes:
00393 buff.write(_struct_b.pack(val2.type))
00394 length = len(val2.dimensions)
00395 buff.write(_struct_I.pack(length))
00396 pattern = '<%sd'%length
00397 buff.write(struct.pack(pattern, *val2.dimensions))
00398 length = len(val2.triangles)
00399 buff.write(_struct_I.pack(length))
00400 pattern = '<%si'%length
00401 buff.write(struct.pack(pattern, *val2.triangles))
00402 length = len(val2.vertices)
00403 buff.write(_struct_I.pack(length))
00404 for val3 in val2.vertices:
00405 _x = val3
00406 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00407 length = len(val1.poses)
00408 buff.write(_struct_I.pack(length))
00409 for val2 in val1.poses:
00410 _v7 = val2.position
00411 _x = _v7
00412 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00413 _v8 = val2.orientation
00414 _x = _v8
00415 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00416 length = len(self.attached_collision_objects)
00417 buff.write(_struct_I.pack(length))
00418 for val1 in self.attached_collision_objects:
00419 _x = val1.link_name
00420 length = len(_x)
00421 if python3 or type(_x) == unicode:
00422 _x = _x.encode('utf-8')
00423 length = len(_x)
00424 buff.write(struct.pack('<I%ss'%length, length, _x))
00425 _v9 = val1.object
00426 _v10 = _v9.header
00427 buff.write(_struct_I.pack(_v10.seq))
00428 _v11 = _v10.stamp
00429 _x = _v11
00430 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00431 _x = _v10.frame_id
00432 length = len(_x)
00433 if python3 or type(_x) == unicode:
00434 _x = _x.encode('utf-8')
00435 length = len(_x)
00436 buff.write(struct.pack('<I%ss'%length, length, _x))
00437 _x = _v9.id
00438 length = len(_x)
00439 if python3 or type(_x) == unicode:
00440 _x = _x.encode('utf-8')
00441 length = len(_x)
00442 buff.write(struct.pack('<I%ss'%length, length, _x))
00443 buff.write(_struct_f.pack(_v9.padding))
00444 _v12 = _v9.operation
00445 buff.write(_struct_b.pack(_v12.operation))
00446 length = len(_v9.shapes)
00447 buff.write(_struct_I.pack(length))
00448 for val3 in _v9.shapes:
00449 buff.write(_struct_b.pack(val3.type))
00450 length = len(val3.dimensions)
00451 buff.write(_struct_I.pack(length))
00452 pattern = '<%sd'%length
00453 buff.write(struct.pack(pattern, *val3.dimensions))
00454 length = len(val3.triangles)
00455 buff.write(_struct_I.pack(length))
00456 pattern = '<%si'%length
00457 buff.write(struct.pack(pattern, *val3.triangles))
00458 length = len(val3.vertices)
00459 buff.write(_struct_I.pack(length))
00460 for val4 in val3.vertices:
00461 _x = val4
00462 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00463 length = len(_v9.poses)
00464 buff.write(_struct_I.pack(length))
00465 for val3 in _v9.poses:
00466 _v13 = val3.position
00467 _x = _v13
00468 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00469 _v14 = val3.orientation
00470 _x = _v14
00471 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00472 length = len(val1.touch_links)
00473 buff.write(_struct_I.pack(length))
00474 for val2 in val1.touch_links:
00475 length = len(val2)
00476 if python3 or type(val2) == unicode:
00477 val2 = val2.encode('utf-8')
00478 length = len(val2)
00479 buff.write(struct.pack('<I%ss'%length, length, val2))
00480 except struct.error as se: self._check_types(se)
00481 except TypeError as te: self._check_types(te)
00482
00483 def deserialize(self, str):
00484 """
00485 unpack serialized message in str into this message instance
00486 :param str: byte array of serialized message, ``str``
00487 """
00488 try:
00489 if self.points is None:
00490 self.points = arm_navigation_msgs.msg.CollisionMap()
00491 if self.collision_objects is None:
00492 self.collision_objects = None
00493 if self.attached_collision_objects is None:
00494 self.attached_collision_objects = None
00495 end = 0
00496 _x = self
00497 start = end
00498 end += 12
00499 (_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00500 start = end
00501 end += 4
00502 (length,) = _struct_I.unpack(str[start:end])
00503 start = end
00504 end += length
00505 if python3:
00506 self.points.header.frame_id = str[start:end].decode('utf-8')
00507 else:
00508 self.points.header.frame_id = str[start:end]
00509 start = end
00510 end += 4
00511 (length,) = _struct_I.unpack(str[start:end])
00512 self.points.boxes = []
00513 for i in range(0, length):
00514 val1 = arm_navigation_msgs.msg.OrientedBoundingBox()
00515 _v15 = val1.center
00516 _x = _v15
00517 start = end
00518 end += 12
00519 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00520 _v16 = val1.extents
00521 _x = _v16
00522 start = end
00523 end += 12
00524 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00525 _v17 = val1.axis
00526 _x = _v17
00527 start = end
00528 end += 12
00529 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00530 start = end
00531 end += 4
00532 (val1.angle,) = _struct_f.unpack(str[start:end])
00533 self.points.boxes.append(val1)
00534 start = end
00535 end += 4
00536 (length,) = _struct_I.unpack(str[start:end])
00537 self.collision_objects = []
00538 for i in range(0, length):
00539 val1 = arm_navigation_msgs.msg.CollisionObject()
00540 _v18 = val1.header
00541 start = end
00542 end += 4
00543 (_v18.seq,) = _struct_I.unpack(str[start:end])
00544 _v19 = _v18.stamp
00545 _x = _v19
00546 start = end
00547 end += 8
00548 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00549 start = end
00550 end += 4
00551 (length,) = _struct_I.unpack(str[start:end])
00552 start = end
00553 end += length
00554 if python3:
00555 _v18.frame_id = str[start:end].decode('utf-8')
00556 else:
00557 _v18.frame_id = str[start:end]
00558 start = end
00559 end += 4
00560 (length,) = _struct_I.unpack(str[start:end])
00561 start = end
00562 end += length
00563 if python3:
00564 val1.id = str[start:end].decode('utf-8')
00565 else:
00566 val1.id = str[start:end]
00567 start = end
00568 end += 4
00569 (val1.padding,) = _struct_f.unpack(str[start:end])
00570 _v20 = val1.operation
00571 start = end
00572 end += 1
00573 (_v20.operation,) = _struct_b.unpack(str[start:end])
00574 start = end
00575 end += 4
00576 (length,) = _struct_I.unpack(str[start:end])
00577 val1.shapes = []
00578 for i in range(0, length):
00579 val2 = arm_navigation_msgs.msg.Shape()
00580 start = end
00581 end += 1
00582 (val2.type,) = _struct_b.unpack(str[start:end])
00583 start = end
00584 end += 4
00585 (length,) = _struct_I.unpack(str[start:end])
00586 pattern = '<%sd'%length
00587 start = end
00588 end += struct.calcsize(pattern)
00589 val2.dimensions = struct.unpack(pattern, str[start:end])
00590 start = end
00591 end += 4
00592 (length,) = _struct_I.unpack(str[start:end])
00593 pattern = '<%si'%length
00594 start = end
00595 end += struct.calcsize(pattern)
00596 val2.triangles = struct.unpack(pattern, str[start:end])
00597 start = end
00598 end += 4
00599 (length,) = _struct_I.unpack(str[start:end])
00600 val2.vertices = []
00601 for i in range(0, length):
00602 val3 = geometry_msgs.msg.Point()
00603 _x = val3
00604 start = end
00605 end += 24
00606 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00607 val2.vertices.append(val3)
00608 val1.shapes.append(val2)
00609 start = end
00610 end += 4
00611 (length,) = _struct_I.unpack(str[start:end])
00612 val1.poses = []
00613 for i in range(0, length):
00614 val2 = geometry_msgs.msg.Pose()
00615 _v21 = val2.position
00616 _x = _v21
00617 start = end
00618 end += 24
00619 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00620 _v22 = val2.orientation
00621 _x = _v22
00622 start = end
00623 end += 32
00624 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00625 val1.poses.append(val2)
00626 self.collision_objects.append(val1)
00627 start = end
00628 end += 4
00629 (length,) = _struct_I.unpack(str[start:end])
00630 self.attached_collision_objects = []
00631 for i in range(0, length):
00632 val1 = arm_navigation_msgs.msg.AttachedCollisionObject()
00633 start = end
00634 end += 4
00635 (length,) = _struct_I.unpack(str[start:end])
00636 start = end
00637 end += length
00638 if python3:
00639 val1.link_name = str[start:end].decode('utf-8')
00640 else:
00641 val1.link_name = str[start:end]
00642 _v23 = val1.object
00643 _v24 = _v23.header
00644 start = end
00645 end += 4
00646 (_v24.seq,) = _struct_I.unpack(str[start:end])
00647 _v25 = _v24.stamp
00648 _x = _v25
00649 start = end
00650 end += 8
00651 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00652 start = end
00653 end += 4
00654 (length,) = _struct_I.unpack(str[start:end])
00655 start = end
00656 end += length
00657 if python3:
00658 _v24.frame_id = str[start:end].decode('utf-8')
00659 else:
00660 _v24.frame_id = str[start:end]
00661 start = end
00662 end += 4
00663 (length,) = _struct_I.unpack(str[start:end])
00664 start = end
00665 end += length
00666 if python3:
00667 _v23.id = str[start:end].decode('utf-8')
00668 else:
00669 _v23.id = str[start:end]
00670 start = end
00671 end += 4
00672 (_v23.padding,) = _struct_f.unpack(str[start:end])
00673 _v26 = _v23.operation
00674 start = end
00675 end += 1
00676 (_v26.operation,) = _struct_b.unpack(str[start:end])
00677 start = end
00678 end += 4
00679 (length,) = _struct_I.unpack(str[start:end])
00680 _v23.shapes = []
00681 for i in range(0, length):
00682 val3 = arm_navigation_msgs.msg.Shape()
00683 start = end
00684 end += 1
00685 (val3.type,) = _struct_b.unpack(str[start:end])
00686 start = end
00687 end += 4
00688 (length,) = _struct_I.unpack(str[start:end])
00689 pattern = '<%sd'%length
00690 start = end
00691 end += struct.calcsize(pattern)
00692 val3.dimensions = struct.unpack(pattern, str[start:end])
00693 start = end
00694 end += 4
00695 (length,) = _struct_I.unpack(str[start:end])
00696 pattern = '<%si'%length
00697 start = end
00698 end += struct.calcsize(pattern)
00699 val3.triangles = struct.unpack(pattern, str[start:end])
00700 start = end
00701 end += 4
00702 (length,) = _struct_I.unpack(str[start:end])
00703 val3.vertices = []
00704 for i in range(0, length):
00705 val4 = geometry_msgs.msg.Point()
00706 _x = val4
00707 start = end
00708 end += 24
00709 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00710 val3.vertices.append(val4)
00711 _v23.shapes.append(val3)
00712 start = end
00713 end += 4
00714 (length,) = _struct_I.unpack(str[start:end])
00715 _v23.poses = []
00716 for i in range(0, length):
00717 val3 = geometry_msgs.msg.Pose()
00718 _v27 = val3.position
00719 _x = _v27
00720 start = end
00721 end += 24
00722 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00723 _v28 = val3.orientation
00724 _x = _v28
00725 start = end
00726 end += 32
00727 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00728 _v23.poses.append(val3)
00729 start = end
00730 end += 4
00731 (length,) = _struct_I.unpack(str[start:end])
00732 val1.touch_links = []
00733 for i in range(0, length):
00734 start = end
00735 end += 4
00736 (length,) = _struct_I.unpack(str[start:end])
00737 start = end
00738 end += length
00739 if python3:
00740 val2 = str[start:end].decode('utf-8')
00741 else:
00742 val2 = str[start:end]
00743 val1.touch_links.append(val2)
00744 self.attached_collision_objects.append(val1)
00745 return self
00746 except struct.error as e:
00747 raise genpy.DeserializationError(e)
00748
00749
00750 def serialize_numpy(self, buff, numpy):
00751 """
00752 serialize message with numpy array types into buffer
00753 :param buff: buffer, ``StringIO``
00754 :param numpy: numpy python module
00755 """
00756 try:
00757 _x = self
00758 buff.write(_struct_3I.pack(_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs))
00759 _x = self.points.header.frame_id
00760 length = len(_x)
00761 if python3 or type(_x) == unicode:
00762 _x = _x.encode('utf-8')
00763 length = len(_x)
00764 buff.write(struct.pack('<I%ss'%length, length, _x))
00765 length = len(self.points.boxes)
00766 buff.write(_struct_I.pack(length))
00767 for val1 in self.points.boxes:
00768 _v29 = val1.center
00769 _x = _v29
00770 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00771 _v30 = val1.extents
00772 _x = _v30
00773 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00774 _v31 = val1.axis
00775 _x = _v31
00776 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00777 buff.write(_struct_f.pack(val1.angle))
00778 length = len(self.collision_objects)
00779 buff.write(_struct_I.pack(length))
00780 for val1 in self.collision_objects:
00781 _v32 = val1.header
00782 buff.write(_struct_I.pack(_v32.seq))
00783 _v33 = _v32.stamp
00784 _x = _v33
00785 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00786 _x = _v32.frame_id
00787 length = len(_x)
00788 if python3 or type(_x) == unicode:
00789 _x = _x.encode('utf-8')
00790 length = len(_x)
00791 buff.write(struct.pack('<I%ss'%length, length, _x))
00792 _x = val1.id
00793 length = len(_x)
00794 if python3 or type(_x) == unicode:
00795 _x = _x.encode('utf-8')
00796 length = len(_x)
00797 buff.write(struct.pack('<I%ss'%length, length, _x))
00798 buff.write(_struct_f.pack(val1.padding))
00799 _v34 = val1.operation
00800 buff.write(_struct_b.pack(_v34.operation))
00801 length = len(val1.shapes)
00802 buff.write(_struct_I.pack(length))
00803 for val2 in val1.shapes:
00804 buff.write(_struct_b.pack(val2.type))
00805 length = len(val2.dimensions)
00806 buff.write(_struct_I.pack(length))
00807 pattern = '<%sd'%length
00808 buff.write(val2.dimensions.tostring())
00809 length = len(val2.triangles)
00810 buff.write(_struct_I.pack(length))
00811 pattern = '<%si'%length
00812 buff.write(val2.triangles.tostring())
00813 length = len(val2.vertices)
00814 buff.write(_struct_I.pack(length))
00815 for val3 in val2.vertices:
00816 _x = val3
00817 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00818 length = len(val1.poses)
00819 buff.write(_struct_I.pack(length))
00820 for val2 in val1.poses:
00821 _v35 = val2.position
00822 _x = _v35
00823 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00824 _v36 = val2.orientation
00825 _x = _v36
00826 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00827 length = len(self.attached_collision_objects)
00828 buff.write(_struct_I.pack(length))
00829 for val1 in self.attached_collision_objects:
00830 _x = val1.link_name
00831 length = len(_x)
00832 if python3 or type(_x) == unicode:
00833 _x = _x.encode('utf-8')
00834 length = len(_x)
00835 buff.write(struct.pack('<I%ss'%length, length, _x))
00836 _v37 = val1.object
00837 _v38 = _v37.header
00838 buff.write(_struct_I.pack(_v38.seq))
00839 _v39 = _v38.stamp
00840 _x = _v39
00841 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00842 _x = _v38.frame_id
00843 length = len(_x)
00844 if python3 or type(_x) == unicode:
00845 _x = _x.encode('utf-8')
00846 length = len(_x)
00847 buff.write(struct.pack('<I%ss'%length, length, _x))
00848 _x = _v37.id
00849 length = len(_x)
00850 if python3 or type(_x) == unicode:
00851 _x = _x.encode('utf-8')
00852 length = len(_x)
00853 buff.write(struct.pack('<I%ss'%length, length, _x))
00854 buff.write(_struct_f.pack(_v37.padding))
00855 _v40 = _v37.operation
00856 buff.write(_struct_b.pack(_v40.operation))
00857 length = len(_v37.shapes)
00858 buff.write(_struct_I.pack(length))
00859 for val3 in _v37.shapes:
00860 buff.write(_struct_b.pack(val3.type))
00861 length = len(val3.dimensions)
00862 buff.write(_struct_I.pack(length))
00863 pattern = '<%sd'%length
00864 buff.write(val3.dimensions.tostring())
00865 length = len(val3.triangles)
00866 buff.write(_struct_I.pack(length))
00867 pattern = '<%si'%length
00868 buff.write(val3.triangles.tostring())
00869 length = len(val3.vertices)
00870 buff.write(_struct_I.pack(length))
00871 for val4 in val3.vertices:
00872 _x = val4
00873 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00874 length = len(_v37.poses)
00875 buff.write(_struct_I.pack(length))
00876 for val3 in _v37.poses:
00877 _v41 = val3.position
00878 _x = _v41
00879 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00880 _v42 = val3.orientation
00881 _x = _v42
00882 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00883 length = len(val1.touch_links)
00884 buff.write(_struct_I.pack(length))
00885 for val2 in val1.touch_links:
00886 length = len(val2)
00887 if python3 or type(val2) == unicode:
00888 val2 = val2.encode('utf-8')
00889 length = len(val2)
00890 buff.write(struct.pack('<I%ss'%length, length, val2))
00891 except struct.error as se: self._check_types(se)
00892 except TypeError as te: self._check_types(te)
00893
00894 def deserialize_numpy(self, str, numpy):
00895 """
00896 unpack serialized message in str into this message instance using numpy for array types
00897 :param str: byte array of serialized message, ``str``
00898 :param numpy: numpy python module
00899 """
00900 try:
00901 if self.points is None:
00902 self.points = arm_navigation_msgs.msg.CollisionMap()
00903 if self.collision_objects is None:
00904 self.collision_objects = None
00905 if self.attached_collision_objects is None:
00906 self.attached_collision_objects = None
00907 end = 0
00908 _x = self
00909 start = end
00910 end += 12
00911 (_x.points.header.seq, _x.points.header.stamp.secs, _x.points.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00912 start = end
00913 end += 4
00914 (length,) = _struct_I.unpack(str[start:end])
00915 start = end
00916 end += length
00917 if python3:
00918 self.points.header.frame_id = str[start:end].decode('utf-8')
00919 else:
00920 self.points.header.frame_id = str[start:end]
00921 start = end
00922 end += 4
00923 (length,) = _struct_I.unpack(str[start:end])
00924 self.points.boxes = []
00925 for i in range(0, length):
00926 val1 = arm_navigation_msgs.msg.OrientedBoundingBox()
00927 _v43 = val1.center
00928 _x = _v43
00929 start = end
00930 end += 12
00931 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00932 _v44 = val1.extents
00933 _x = _v44
00934 start = end
00935 end += 12
00936 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00937 _v45 = val1.axis
00938 _x = _v45
00939 start = end
00940 end += 12
00941 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00942 start = end
00943 end += 4
00944 (val1.angle,) = _struct_f.unpack(str[start:end])
00945 self.points.boxes.append(val1)
00946 start = end
00947 end += 4
00948 (length,) = _struct_I.unpack(str[start:end])
00949 self.collision_objects = []
00950 for i in range(0, length):
00951 val1 = arm_navigation_msgs.msg.CollisionObject()
00952 _v46 = val1.header
00953 start = end
00954 end += 4
00955 (_v46.seq,) = _struct_I.unpack(str[start:end])
00956 _v47 = _v46.stamp
00957 _x = _v47
00958 start = end
00959 end += 8
00960 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00961 start = end
00962 end += 4
00963 (length,) = _struct_I.unpack(str[start:end])
00964 start = end
00965 end += length
00966 if python3:
00967 _v46.frame_id = str[start:end].decode('utf-8')
00968 else:
00969 _v46.frame_id = str[start:end]
00970 start = end
00971 end += 4
00972 (length,) = _struct_I.unpack(str[start:end])
00973 start = end
00974 end += length
00975 if python3:
00976 val1.id = str[start:end].decode('utf-8')
00977 else:
00978 val1.id = str[start:end]
00979 start = end
00980 end += 4
00981 (val1.padding,) = _struct_f.unpack(str[start:end])
00982 _v48 = val1.operation
00983 start = end
00984 end += 1
00985 (_v48.operation,) = _struct_b.unpack(str[start:end])
00986 start = end
00987 end += 4
00988 (length,) = _struct_I.unpack(str[start:end])
00989 val1.shapes = []
00990 for i in range(0, length):
00991 val2 = arm_navigation_msgs.msg.Shape()
00992 start = end
00993 end += 1
00994 (val2.type,) = _struct_b.unpack(str[start:end])
00995 start = end
00996 end += 4
00997 (length,) = _struct_I.unpack(str[start:end])
00998 pattern = '<%sd'%length
00999 start = end
01000 end += struct.calcsize(pattern)
01001 val2.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01002 start = end
01003 end += 4
01004 (length,) = _struct_I.unpack(str[start:end])
01005 pattern = '<%si'%length
01006 start = end
01007 end += struct.calcsize(pattern)
01008 val2.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
01009 start = end
01010 end += 4
01011 (length,) = _struct_I.unpack(str[start:end])
01012 val2.vertices = []
01013 for i in range(0, length):
01014 val3 = geometry_msgs.msg.Point()
01015 _x = val3
01016 start = end
01017 end += 24
01018 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01019 val2.vertices.append(val3)
01020 val1.shapes.append(val2)
01021 start = end
01022 end += 4
01023 (length,) = _struct_I.unpack(str[start:end])
01024 val1.poses = []
01025 for i in range(0, length):
01026 val2 = geometry_msgs.msg.Pose()
01027 _v49 = val2.position
01028 _x = _v49
01029 start = end
01030 end += 24
01031 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01032 _v50 = val2.orientation
01033 _x = _v50
01034 start = end
01035 end += 32
01036 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01037 val1.poses.append(val2)
01038 self.collision_objects.append(val1)
01039 start = end
01040 end += 4
01041 (length,) = _struct_I.unpack(str[start:end])
01042 self.attached_collision_objects = []
01043 for i in range(0, length):
01044 val1 = arm_navigation_msgs.msg.AttachedCollisionObject()
01045 start = end
01046 end += 4
01047 (length,) = _struct_I.unpack(str[start:end])
01048 start = end
01049 end += length
01050 if python3:
01051 val1.link_name = str[start:end].decode('utf-8')
01052 else:
01053 val1.link_name = str[start:end]
01054 _v51 = val1.object
01055 _v52 = _v51.header
01056 start = end
01057 end += 4
01058 (_v52.seq,) = _struct_I.unpack(str[start:end])
01059 _v53 = _v52.stamp
01060 _x = _v53
01061 start = end
01062 end += 8
01063 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01064 start = end
01065 end += 4
01066 (length,) = _struct_I.unpack(str[start:end])
01067 start = end
01068 end += length
01069 if python3:
01070 _v52.frame_id = str[start:end].decode('utf-8')
01071 else:
01072 _v52.frame_id = str[start:end]
01073 start = end
01074 end += 4
01075 (length,) = _struct_I.unpack(str[start:end])
01076 start = end
01077 end += length
01078 if python3:
01079 _v51.id = str[start:end].decode('utf-8')
01080 else:
01081 _v51.id = str[start:end]
01082 start = end
01083 end += 4
01084 (_v51.padding,) = _struct_f.unpack(str[start:end])
01085 _v54 = _v51.operation
01086 start = end
01087 end += 1
01088 (_v54.operation,) = _struct_b.unpack(str[start:end])
01089 start = end
01090 end += 4
01091 (length,) = _struct_I.unpack(str[start:end])
01092 _v51.shapes = []
01093 for i in range(0, length):
01094 val3 = arm_navigation_msgs.msg.Shape()
01095 start = end
01096 end += 1
01097 (val3.type,) = _struct_b.unpack(str[start:end])
01098 start = end
01099 end += 4
01100 (length,) = _struct_I.unpack(str[start:end])
01101 pattern = '<%sd'%length
01102 start = end
01103 end += struct.calcsize(pattern)
01104 val3.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
01105 start = end
01106 end += 4
01107 (length,) = _struct_I.unpack(str[start:end])
01108 pattern = '<%si'%length
01109 start = end
01110 end += struct.calcsize(pattern)
01111 val3.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
01112 start = end
01113 end += 4
01114 (length,) = _struct_I.unpack(str[start:end])
01115 val3.vertices = []
01116 for i in range(0, length):
01117 val4 = geometry_msgs.msg.Point()
01118 _x = val4
01119 start = end
01120 end += 24
01121 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01122 val3.vertices.append(val4)
01123 _v51.shapes.append(val3)
01124 start = end
01125 end += 4
01126 (length,) = _struct_I.unpack(str[start:end])
01127 _v51.poses = []
01128 for i in range(0, length):
01129 val3 = geometry_msgs.msg.Pose()
01130 _v55 = val3.position
01131 _x = _v55
01132 start = end
01133 end += 24
01134 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01135 _v56 = val3.orientation
01136 _x = _v56
01137 start = end
01138 end += 32
01139 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01140 _v51.poses.append(val3)
01141 start = end
01142 end += 4
01143 (length,) = _struct_I.unpack(str[start:end])
01144 val1.touch_links = []
01145 for i in range(0, length):
01146 start = end
01147 end += 4
01148 (length,) = _struct_I.unpack(str[start:end])
01149 start = end
01150 end += length
01151 if python3:
01152 val2 = str[start:end].decode('utf-8')
01153 else:
01154 val2 = str[start:end]
01155 val1.touch_links.append(val2)
01156 self.attached_collision_objects.append(val1)
01157 return self
01158 except struct.error as e:
01159 raise genpy.DeserializationError(e)
01160
01161 _struct_I = genpy.struct_I
01162 _struct_b = struct.Struct("<b")
01163 _struct_f = struct.Struct("<f")
01164 _struct_2I = struct.Struct("<2I")
01165 _struct_3I = struct.Struct("<3I")
01166 _struct_4d = struct.Struct("<4d")
01167 _struct_3f = struct.Struct("<3f")
01168 _struct_3d = struct.Struct("<3d")
01169 class GetCollisionObjects(object):
01170 _type = 'arm_navigation_msgs/GetCollisionObjects'
01171 _md5sum = '8a4f57995c7be09c22ca01de6eb557ac'
01172 _request_class = GetCollisionObjectsRequest
01173 _response_class = GetCollisionObjectsResponse