00001 """autogenerated by genmsg_py from Constraints.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import motion_planning_msgs.msg
00007 import geometric_shapes_msgs.msg
00008 import std_msgs.msg
00009
00010 class Constraints(roslib.message.Message):
00011 _md5sum = "fe6b6f09c687fd46c05a2de4ca18378a"
00012 _type = "motion_planning_msgs/Constraints"
00013 _has_header = False
00014 _full_text = """# This message contains a list of motion planning constraints.
00015
00016 motion_planning_msgs/JointConstraint[] joint_constraints
00017 motion_planning_msgs/PositionConstraint[] position_constraints
00018 motion_planning_msgs/OrientationConstraint[] orientation_constraints
00019 motion_planning_msgs/VisibilityConstraint[] visibility_constraints
00020
00021 ================================================================================
00022 MSG: motion_planning_msgs/JointConstraint
00023 # Constrain the position of a joint to be within a certain bound
00024 string joint_name
00025
00026 # the bound to be achieved is [position - tolerance_below, position + tolerance_above]
00027 float64 position
00028 float64 tolerance_above
00029 float64 tolerance_below
00030
00031 # A weighting factor for this constraint
00032 float64 weight
00033 ================================================================================
00034 MSG: motion_planning_msgs/PositionConstraint
00035 # This message contains the definition of a position constraint.
00036 Header header
00037
00038 # The robot link this constraint refers to
00039 string link_name
00040
00041 # The offset (in the link frame) for the target point on the link we are planning for
00042 geometry_msgs/Point target_point_offset
00043
00044 # The nominal/target position for the point we are planning for
00045 geometry_msgs/Point position
00046
00047 # The shape of the bounded region that constrains the position of the end-effector
00048 # This region is always centered at the position defined above
00049 geometric_shapes_msgs/Shape constraint_region_shape
00050
00051 # The orientation of the bounded region that constrains the position of the end-effector.
00052 # This allows the specification of non-axis aligned constraints
00053 geometry_msgs/Quaternion constraint_region_orientation
00054
00055 # Constraint weighting factor - a weight for this constraint
00056 float64 weight
00057 ================================================================================
00058 MSG: std_msgs/Header
00059 # Standard metadata for higher-level stamped data types.
00060 # This is generally used to communicate timestamped data
00061 # in a particular coordinate frame.
00062 #
00063 # sequence ID: consecutively increasing ID
00064 uint32 seq
00065 #Two-integer timestamp that is expressed as:
00066 # * stamp.secs: seconds (stamp_secs) since epoch
00067 # * stamp.nsecs: nanoseconds since stamp_secs
00068 # time-handling sugar is provided by the client library
00069 time stamp
00070 #Frame this data is associated with
00071 # 0: no frame
00072 # 1: global frame
00073 string frame_id
00074
00075 ================================================================================
00076 MSG: geometry_msgs/Point
00077 # This contains the position of a point in free space
00078 float64 x
00079 float64 y
00080 float64 z
00081
00082 ================================================================================
00083 MSG: geometric_shapes_msgs/Shape
00084 byte SPHERE=0
00085 byte BOX=1
00086 byte CYLINDER=2
00087 byte MESH=3
00088
00089 byte type
00090
00091
00092 #### define sphere, box, cylinder ####
00093 # the origin of each shape is considered at the shape's center
00094
00095 # for sphere
00096 # radius := dimensions[0]
00097
00098 # for cylinder
00099 # radius := dimensions[0]
00100 # length := dimensions[1]
00101 # the length is along the Z axis
00102
00103 # for box
00104 # size_x := dimensions[0]
00105 # size_y := dimensions[1]
00106 # size_z := dimensions[2]
00107 float64[] dimensions
00108
00109
00110 #### define mesh ####
00111
00112 # list of triangles; triangle k is defined by tre vertices located
00113 # at indices triangles[3k], triangles[3k+1], triangles[3k+2]
00114 int32[] triangles
00115 geometry_msgs/Point[] vertices
00116
00117 ================================================================================
00118 MSG: geometry_msgs/Quaternion
00119 # This represents an orientation in free space in quaternion form.
00120
00121 float64 x
00122 float64 y
00123 float64 z
00124 float64 w
00125
00126 ================================================================================
00127 MSG: motion_planning_msgs/OrientationConstraint
00128 # This message contains the definition of an orientation constraint.
00129 Header header
00130
00131 # The robot link this constraint refers to
00132 string link_name
00133
00134 # The type of the constraint
00135 int32 type
00136 int32 LINK_FRAME=0
00137 int32 HEADER_FRAME=1
00138
00139 # The desired orientation of the robot link specified as a quaternion
00140 geometry_msgs/Quaternion orientation
00141
00142 # optional RPY error tolerances specified if
00143 float64 absolute_roll_tolerance
00144 float64 absolute_pitch_tolerance
00145 float64 absolute_yaw_tolerance
00146
00147 # Constraint weighting factor - a weight for this constraint
00148 float64 weight
00149
00150 ================================================================================
00151 MSG: motion_planning_msgs/VisibilityConstraint
00152 # This message contains the definition of a visibility constraint.
00153 Header header
00154
00155 # The point stamped target that needs to be kept within view of the sensor
00156 geometry_msgs/PointStamped target
00157
00158 # The local pose of the frame in which visibility is to be maintained
00159 # The frame id should represent the robot link to which the sensor is attached
00160 # The visual axis of the sensor is assumed to be along the X axis of this frame
00161 geometry_msgs/PoseStamped sensor_pose
00162
00163 # The deviation (in radians) that will be tolerated
00164 # Constraint error will be measured as the solid angle between the
00165 # X axis of the frame defined above and the vector between the origin
00166 # of the frame defined above and the target location
00167 float64 absolute_tolerance
00168
00169
00170 ================================================================================
00171 MSG: geometry_msgs/PointStamped
00172 # This represents a Point with reference coordinate frame and timestamp
00173 Header header
00174 Point point
00175
00176 ================================================================================
00177 MSG: geometry_msgs/PoseStamped
00178 # A Pose with reference coordinate frame and timestamp
00179 Header header
00180 Pose pose
00181
00182 ================================================================================
00183 MSG: geometry_msgs/Pose
00184 # A representation of pose in free space, composed of postion and orientation.
00185 Point position
00186 Quaternion orientation
00187
00188 """
00189 __slots__ = ['joint_constraints','position_constraints','orientation_constraints','visibility_constraints']
00190 _slot_types = ['motion_planning_msgs/JointConstraint[]','motion_planning_msgs/PositionConstraint[]','motion_planning_msgs/OrientationConstraint[]','motion_planning_msgs/VisibilityConstraint[]']
00191
00192 def __init__(self, *args, **kwds):
00193 """
00194 Constructor. Any message fields that are implicitly/explicitly
00195 set to None will be assigned a default value. The recommend
00196 use is keyword arguments as this is more robust to future message
00197 changes. You cannot mix in-order arguments and keyword arguments.
00198
00199 The available fields are:
00200 joint_constraints,position_constraints,orientation_constraints,visibility_constraints
00201
00202 @param args: complete set of field values, in .msg order
00203 @param kwds: use keyword arguments corresponding to message field names
00204 to set specific fields.
00205 """
00206 if args or kwds:
00207 super(Constraints, self).__init__(*args, **kwds)
00208
00209 if self.joint_constraints is None:
00210 self.joint_constraints = []
00211 if self.position_constraints is None:
00212 self.position_constraints = []
00213 if self.orientation_constraints is None:
00214 self.orientation_constraints = []
00215 if self.visibility_constraints is None:
00216 self.visibility_constraints = []
00217 else:
00218 self.joint_constraints = []
00219 self.position_constraints = []
00220 self.orientation_constraints = []
00221 self.visibility_constraints = []
00222
00223 def _get_types(self):
00224 """
00225 internal API method
00226 """
00227 return self._slot_types
00228
00229 def serialize(self, buff):
00230 """
00231 serialize message into buffer
00232 @param buff: buffer
00233 @type buff: StringIO
00234 """
00235 try:
00236 length = len(self.joint_constraints)
00237 buff.write(_struct_I.pack(length))
00238 for val1 in self.joint_constraints:
00239 _x = val1.joint_name
00240 length = len(_x)
00241 buff.write(struct.pack('<I%ss'%length, length, _x))
00242 _x = val1
00243 buff.write(_struct_4d.pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
00244 length = len(self.position_constraints)
00245 buff.write(_struct_I.pack(length))
00246 for val1 in self.position_constraints:
00247 _v1 = val1.header
00248 buff.write(_struct_I.pack(_v1.seq))
00249 _v2 = _v1.stamp
00250 _x = _v2
00251 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00252 _x = _v1.frame_id
00253 length = len(_x)
00254 buff.write(struct.pack('<I%ss'%length, length, _x))
00255 _x = val1.link_name
00256 length = len(_x)
00257 buff.write(struct.pack('<I%ss'%length, length, _x))
00258 _v3 = val1.target_point_offset
00259 _x = _v3
00260 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00261 _v4 = val1.position
00262 _x = _v4
00263 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00264 _v5 = val1.constraint_region_shape
00265 buff.write(_struct_b.pack(_v5.type))
00266 length = len(_v5.dimensions)
00267 buff.write(_struct_I.pack(length))
00268 pattern = '<%sd'%length
00269 buff.write(struct.pack(pattern, *_v5.dimensions))
00270 length = len(_v5.triangles)
00271 buff.write(_struct_I.pack(length))
00272 pattern = '<%si'%length
00273 buff.write(struct.pack(pattern, *_v5.triangles))
00274 length = len(_v5.vertices)
00275 buff.write(_struct_I.pack(length))
00276 for val3 in _v5.vertices:
00277 _x = val3
00278 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00279 _v6 = val1.constraint_region_orientation
00280 _x = _v6
00281 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00282 buff.write(_struct_d.pack(val1.weight))
00283 length = len(self.orientation_constraints)
00284 buff.write(_struct_I.pack(length))
00285 for val1 in self.orientation_constraints:
00286 _v7 = val1.header
00287 buff.write(_struct_I.pack(_v7.seq))
00288 _v8 = _v7.stamp
00289 _x = _v8
00290 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00291 _x = _v7.frame_id
00292 length = len(_x)
00293 buff.write(struct.pack('<I%ss'%length, length, _x))
00294 _x = val1.link_name
00295 length = len(_x)
00296 buff.write(struct.pack('<I%ss'%length, length, _x))
00297 buff.write(_struct_i.pack(val1.type))
00298 _v9 = val1.orientation
00299 _x = _v9
00300 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00301 _x = val1
00302 buff.write(_struct_4d.pack(_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight))
00303 length = len(self.visibility_constraints)
00304 buff.write(_struct_I.pack(length))
00305 for val1 in self.visibility_constraints:
00306 _v10 = val1.header
00307 buff.write(_struct_I.pack(_v10.seq))
00308 _v11 = _v10.stamp
00309 _x = _v11
00310 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00311 _x = _v10.frame_id
00312 length = len(_x)
00313 buff.write(struct.pack('<I%ss'%length, length, _x))
00314 _v12 = val1.target
00315 _v13 = _v12.header
00316 buff.write(_struct_I.pack(_v13.seq))
00317 _v14 = _v13.stamp
00318 _x = _v14
00319 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00320 _x = _v13.frame_id
00321 length = len(_x)
00322 buff.write(struct.pack('<I%ss'%length, length, _x))
00323 _v15 = _v12.point
00324 _x = _v15
00325 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00326 _v16 = val1.sensor_pose
00327 _v17 = _v16.header
00328 buff.write(_struct_I.pack(_v17.seq))
00329 _v18 = _v17.stamp
00330 _x = _v18
00331 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00332 _x = _v17.frame_id
00333 length = len(_x)
00334 buff.write(struct.pack('<I%ss'%length, length, _x))
00335 _v19 = _v16.pose
00336 _v20 = _v19.position
00337 _x = _v20
00338 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00339 _v21 = _v19.orientation
00340 _x = _v21
00341 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00342 buff.write(_struct_d.pack(val1.absolute_tolerance))
00343 except struct.error, se: self._check_types(se)
00344 except TypeError, te: self._check_types(te)
00345
00346 def deserialize(self, str):
00347 """
00348 unpack serialized message in str into this message instance
00349 @param str: byte array of serialized message
00350 @type str: str
00351 """
00352 try:
00353 end = 0
00354 start = end
00355 end += 4
00356 (length,) = _struct_I.unpack(str[start:end])
00357 self.joint_constraints = []
00358 for i in xrange(0, length):
00359 val1 = motion_planning_msgs.msg.JointConstraint()
00360 start = end
00361 end += 4
00362 (length,) = _struct_I.unpack(str[start:end])
00363 start = end
00364 end += length
00365 val1.joint_name = str[start:end]
00366 _x = val1
00367 start = end
00368 end += 32
00369 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _struct_4d.unpack(str[start:end])
00370 self.joint_constraints.append(val1)
00371 start = end
00372 end += 4
00373 (length,) = _struct_I.unpack(str[start:end])
00374 self.position_constraints = []
00375 for i in xrange(0, length):
00376 val1 = motion_planning_msgs.msg.PositionConstraint()
00377 _v22 = val1.header
00378 start = end
00379 end += 4
00380 (_v22.seq,) = _struct_I.unpack(str[start:end])
00381 _v23 = _v22.stamp
00382 _x = _v23
00383 start = end
00384 end += 8
00385 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00386 start = end
00387 end += 4
00388 (length,) = _struct_I.unpack(str[start:end])
00389 start = end
00390 end += length
00391 _v22.frame_id = str[start:end]
00392 start = end
00393 end += 4
00394 (length,) = _struct_I.unpack(str[start:end])
00395 start = end
00396 end += length
00397 val1.link_name = str[start:end]
00398 _v24 = val1.target_point_offset
00399 _x = _v24
00400 start = end
00401 end += 24
00402 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00403 _v25 = val1.position
00404 _x = _v25
00405 start = end
00406 end += 24
00407 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00408 _v26 = val1.constraint_region_shape
00409 start = end
00410 end += 1
00411 (_v26.type,) = _struct_b.unpack(str[start:end])
00412 start = end
00413 end += 4
00414 (length,) = _struct_I.unpack(str[start:end])
00415 pattern = '<%sd'%length
00416 start = end
00417 end += struct.calcsize(pattern)
00418 _v26.dimensions = struct.unpack(pattern, str[start:end])
00419 start = end
00420 end += 4
00421 (length,) = _struct_I.unpack(str[start:end])
00422 pattern = '<%si'%length
00423 start = end
00424 end += struct.calcsize(pattern)
00425 _v26.triangles = struct.unpack(pattern, str[start:end])
00426 start = end
00427 end += 4
00428 (length,) = _struct_I.unpack(str[start:end])
00429 _v26.vertices = []
00430 for i in xrange(0, length):
00431 val3 = geometry_msgs.msg.Point()
00432 _x = val3
00433 start = end
00434 end += 24
00435 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00436 _v26.vertices.append(val3)
00437 _v27 = val1.constraint_region_orientation
00438 _x = _v27
00439 start = end
00440 end += 32
00441 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00442 start = end
00443 end += 8
00444 (val1.weight,) = _struct_d.unpack(str[start:end])
00445 self.position_constraints.append(val1)
00446 start = end
00447 end += 4
00448 (length,) = _struct_I.unpack(str[start:end])
00449 self.orientation_constraints = []
00450 for i in xrange(0, length):
00451 val1 = motion_planning_msgs.msg.OrientationConstraint()
00452 _v28 = val1.header
00453 start = end
00454 end += 4
00455 (_v28.seq,) = _struct_I.unpack(str[start:end])
00456 _v29 = _v28.stamp
00457 _x = _v29
00458 start = end
00459 end += 8
00460 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00461 start = end
00462 end += 4
00463 (length,) = _struct_I.unpack(str[start:end])
00464 start = end
00465 end += length
00466 _v28.frame_id = str[start:end]
00467 start = end
00468 end += 4
00469 (length,) = _struct_I.unpack(str[start:end])
00470 start = end
00471 end += length
00472 val1.link_name = str[start:end]
00473 start = end
00474 end += 4
00475 (val1.type,) = _struct_i.unpack(str[start:end])
00476 _v30 = val1.orientation
00477 _x = _v30
00478 start = end
00479 end += 32
00480 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00481 _x = val1
00482 start = end
00483 end += 32
00484 (_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight,) = _struct_4d.unpack(str[start:end])
00485 self.orientation_constraints.append(val1)
00486 start = end
00487 end += 4
00488 (length,) = _struct_I.unpack(str[start:end])
00489 self.visibility_constraints = []
00490 for i in xrange(0, length):
00491 val1 = motion_planning_msgs.msg.VisibilityConstraint()
00492 _v31 = val1.header
00493 start = end
00494 end += 4
00495 (_v31.seq,) = _struct_I.unpack(str[start:end])
00496 _v32 = _v31.stamp
00497 _x = _v32
00498 start = end
00499 end += 8
00500 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00501 start = end
00502 end += 4
00503 (length,) = _struct_I.unpack(str[start:end])
00504 start = end
00505 end += length
00506 _v31.frame_id = str[start:end]
00507 _v33 = val1.target
00508 _v34 = _v33.header
00509 start = end
00510 end += 4
00511 (_v34.seq,) = _struct_I.unpack(str[start:end])
00512 _v35 = _v34.stamp
00513 _x = _v35
00514 start = end
00515 end += 8
00516 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00517 start = end
00518 end += 4
00519 (length,) = _struct_I.unpack(str[start:end])
00520 start = end
00521 end += length
00522 _v34.frame_id = str[start:end]
00523 _v36 = _v33.point
00524 _x = _v36
00525 start = end
00526 end += 24
00527 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00528 _v37 = val1.sensor_pose
00529 _v38 = _v37.header
00530 start = end
00531 end += 4
00532 (_v38.seq,) = _struct_I.unpack(str[start:end])
00533 _v39 = _v38.stamp
00534 _x = _v39
00535 start = end
00536 end += 8
00537 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00538 start = end
00539 end += 4
00540 (length,) = _struct_I.unpack(str[start:end])
00541 start = end
00542 end += length
00543 _v38.frame_id = str[start:end]
00544 _v40 = _v37.pose
00545 _v41 = _v40.position
00546 _x = _v41
00547 start = end
00548 end += 24
00549 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00550 _v42 = _v40.orientation
00551 _x = _v42
00552 start = end
00553 end += 32
00554 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00555 start = end
00556 end += 8
00557 (val1.absolute_tolerance,) = _struct_d.unpack(str[start:end])
00558 self.visibility_constraints.append(val1)
00559 return self
00560 except struct.error, e:
00561 raise roslib.message.DeserializationError(e)
00562
00563
00564 def serialize_numpy(self, buff, numpy):
00565 """
00566 serialize message with numpy array types into buffer
00567 @param buff: buffer
00568 @type buff: StringIO
00569 @param numpy: numpy python module
00570 @type numpy module
00571 """
00572 try:
00573 length = len(self.joint_constraints)
00574 buff.write(_struct_I.pack(length))
00575 for val1 in self.joint_constraints:
00576 _x = val1.joint_name
00577 length = len(_x)
00578 buff.write(struct.pack('<I%ss'%length, length, _x))
00579 _x = val1
00580 buff.write(_struct_4d.pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
00581 length = len(self.position_constraints)
00582 buff.write(_struct_I.pack(length))
00583 for val1 in self.position_constraints:
00584 _v43 = val1.header
00585 buff.write(_struct_I.pack(_v43.seq))
00586 _v44 = _v43.stamp
00587 _x = _v44
00588 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00589 _x = _v43.frame_id
00590 length = len(_x)
00591 buff.write(struct.pack('<I%ss'%length, length, _x))
00592 _x = val1.link_name
00593 length = len(_x)
00594 buff.write(struct.pack('<I%ss'%length, length, _x))
00595 _v45 = val1.target_point_offset
00596 _x = _v45
00597 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00598 _v46 = val1.position
00599 _x = _v46
00600 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00601 _v47 = val1.constraint_region_shape
00602 buff.write(_struct_b.pack(_v47.type))
00603 length = len(_v47.dimensions)
00604 buff.write(_struct_I.pack(length))
00605 pattern = '<%sd'%length
00606 buff.write(_v47.dimensions.tostring())
00607 length = len(_v47.triangles)
00608 buff.write(_struct_I.pack(length))
00609 pattern = '<%si'%length
00610 buff.write(_v47.triangles.tostring())
00611 length = len(_v47.vertices)
00612 buff.write(_struct_I.pack(length))
00613 for val3 in _v47.vertices:
00614 _x = val3
00615 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00616 _v48 = val1.constraint_region_orientation
00617 _x = _v48
00618 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00619 buff.write(_struct_d.pack(val1.weight))
00620 length = len(self.orientation_constraints)
00621 buff.write(_struct_I.pack(length))
00622 for val1 in self.orientation_constraints:
00623 _v49 = val1.header
00624 buff.write(_struct_I.pack(_v49.seq))
00625 _v50 = _v49.stamp
00626 _x = _v50
00627 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00628 _x = _v49.frame_id
00629 length = len(_x)
00630 buff.write(struct.pack('<I%ss'%length, length, _x))
00631 _x = val1.link_name
00632 length = len(_x)
00633 buff.write(struct.pack('<I%ss'%length, length, _x))
00634 buff.write(_struct_i.pack(val1.type))
00635 _v51 = val1.orientation
00636 _x = _v51
00637 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00638 _x = val1
00639 buff.write(_struct_4d.pack(_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight))
00640 length = len(self.visibility_constraints)
00641 buff.write(_struct_I.pack(length))
00642 for val1 in self.visibility_constraints:
00643 _v52 = val1.header
00644 buff.write(_struct_I.pack(_v52.seq))
00645 _v53 = _v52.stamp
00646 _x = _v53
00647 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00648 _x = _v52.frame_id
00649 length = len(_x)
00650 buff.write(struct.pack('<I%ss'%length, length, _x))
00651 _v54 = val1.target
00652 _v55 = _v54.header
00653 buff.write(_struct_I.pack(_v55.seq))
00654 _v56 = _v55.stamp
00655 _x = _v56
00656 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00657 _x = _v55.frame_id
00658 length = len(_x)
00659 buff.write(struct.pack('<I%ss'%length, length, _x))
00660 _v57 = _v54.point
00661 _x = _v57
00662 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00663 _v58 = val1.sensor_pose
00664 _v59 = _v58.header
00665 buff.write(_struct_I.pack(_v59.seq))
00666 _v60 = _v59.stamp
00667 _x = _v60
00668 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00669 _x = _v59.frame_id
00670 length = len(_x)
00671 buff.write(struct.pack('<I%ss'%length, length, _x))
00672 _v61 = _v58.pose
00673 _v62 = _v61.position
00674 _x = _v62
00675 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00676 _v63 = _v61.orientation
00677 _x = _v63
00678 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00679 buff.write(_struct_d.pack(val1.absolute_tolerance))
00680 except struct.error, se: self._check_types(se)
00681 except TypeError, te: self._check_types(te)
00682
00683 def deserialize_numpy(self, str, numpy):
00684 """
00685 unpack serialized message in str into this message instance using numpy for array types
00686 @param str: byte array of serialized message
00687 @type str: str
00688 @param numpy: numpy python module
00689 @type numpy: module
00690 """
00691 try:
00692 end = 0
00693 start = end
00694 end += 4
00695 (length,) = _struct_I.unpack(str[start:end])
00696 self.joint_constraints = []
00697 for i in xrange(0, length):
00698 val1 = motion_planning_msgs.msg.JointConstraint()
00699 start = end
00700 end += 4
00701 (length,) = _struct_I.unpack(str[start:end])
00702 start = end
00703 end += length
00704 val1.joint_name = str[start:end]
00705 _x = val1
00706 start = end
00707 end += 32
00708 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _struct_4d.unpack(str[start:end])
00709 self.joint_constraints.append(val1)
00710 start = end
00711 end += 4
00712 (length,) = _struct_I.unpack(str[start:end])
00713 self.position_constraints = []
00714 for i in xrange(0, length):
00715 val1 = motion_planning_msgs.msg.PositionConstraint()
00716 _v64 = val1.header
00717 start = end
00718 end += 4
00719 (_v64.seq,) = _struct_I.unpack(str[start:end])
00720 _v65 = _v64.stamp
00721 _x = _v65
00722 start = end
00723 end += 8
00724 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00725 start = end
00726 end += 4
00727 (length,) = _struct_I.unpack(str[start:end])
00728 start = end
00729 end += length
00730 _v64.frame_id = str[start:end]
00731 start = end
00732 end += 4
00733 (length,) = _struct_I.unpack(str[start:end])
00734 start = end
00735 end += length
00736 val1.link_name = str[start:end]
00737 _v66 = val1.target_point_offset
00738 _x = _v66
00739 start = end
00740 end += 24
00741 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00742 _v67 = val1.position
00743 _x = _v67
00744 start = end
00745 end += 24
00746 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00747 _v68 = val1.constraint_region_shape
00748 start = end
00749 end += 1
00750 (_v68.type,) = _struct_b.unpack(str[start:end])
00751 start = end
00752 end += 4
00753 (length,) = _struct_I.unpack(str[start:end])
00754 pattern = '<%sd'%length
00755 start = end
00756 end += struct.calcsize(pattern)
00757 _v68.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00758 start = end
00759 end += 4
00760 (length,) = _struct_I.unpack(str[start:end])
00761 pattern = '<%si'%length
00762 start = end
00763 end += struct.calcsize(pattern)
00764 _v68.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00765 start = end
00766 end += 4
00767 (length,) = _struct_I.unpack(str[start:end])
00768 _v68.vertices = []
00769 for i in xrange(0, length):
00770 val3 = geometry_msgs.msg.Point()
00771 _x = val3
00772 start = end
00773 end += 24
00774 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00775 _v68.vertices.append(val3)
00776 _v69 = val1.constraint_region_orientation
00777 _x = _v69
00778 start = end
00779 end += 32
00780 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00781 start = end
00782 end += 8
00783 (val1.weight,) = _struct_d.unpack(str[start:end])
00784 self.position_constraints.append(val1)
00785 start = end
00786 end += 4
00787 (length,) = _struct_I.unpack(str[start:end])
00788 self.orientation_constraints = []
00789 for i in xrange(0, length):
00790 val1 = motion_planning_msgs.msg.OrientationConstraint()
00791 _v70 = val1.header
00792 start = end
00793 end += 4
00794 (_v70.seq,) = _struct_I.unpack(str[start:end])
00795 _v71 = _v70.stamp
00796 _x = _v71
00797 start = end
00798 end += 8
00799 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00800 start = end
00801 end += 4
00802 (length,) = _struct_I.unpack(str[start:end])
00803 start = end
00804 end += length
00805 _v70.frame_id = str[start:end]
00806 start = end
00807 end += 4
00808 (length,) = _struct_I.unpack(str[start:end])
00809 start = end
00810 end += length
00811 val1.link_name = str[start:end]
00812 start = end
00813 end += 4
00814 (val1.type,) = _struct_i.unpack(str[start:end])
00815 _v72 = val1.orientation
00816 _x = _v72
00817 start = end
00818 end += 32
00819 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00820 _x = val1
00821 start = end
00822 end += 32
00823 (_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight,) = _struct_4d.unpack(str[start:end])
00824 self.orientation_constraints.append(val1)
00825 start = end
00826 end += 4
00827 (length,) = _struct_I.unpack(str[start:end])
00828 self.visibility_constraints = []
00829 for i in xrange(0, length):
00830 val1 = motion_planning_msgs.msg.VisibilityConstraint()
00831 _v73 = val1.header
00832 start = end
00833 end += 4
00834 (_v73.seq,) = _struct_I.unpack(str[start:end])
00835 _v74 = _v73.stamp
00836 _x = _v74
00837 start = end
00838 end += 8
00839 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00840 start = end
00841 end += 4
00842 (length,) = _struct_I.unpack(str[start:end])
00843 start = end
00844 end += length
00845 _v73.frame_id = str[start:end]
00846 _v75 = val1.target
00847 _v76 = _v75.header
00848 start = end
00849 end += 4
00850 (_v76.seq,) = _struct_I.unpack(str[start:end])
00851 _v77 = _v76.stamp
00852 _x = _v77
00853 start = end
00854 end += 8
00855 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00856 start = end
00857 end += 4
00858 (length,) = _struct_I.unpack(str[start:end])
00859 start = end
00860 end += length
00861 _v76.frame_id = str[start:end]
00862 _v78 = _v75.point
00863 _x = _v78
00864 start = end
00865 end += 24
00866 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00867 _v79 = val1.sensor_pose
00868 _v80 = _v79.header
00869 start = end
00870 end += 4
00871 (_v80.seq,) = _struct_I.unpack(str[start:end])
00872 _v81 = _v80.stamp
00873 _x = _v81
00874 start = end
00875 end += 8
00876 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00877 start = end
00878 end += 4
00879 (length,) = _struct_I.unpack(str[start:end])
00880 start = end
00881 end += length
00882 _v80.frame_id = str[start:end]
00883 _v82 = _v79.pose
00884 _v83 = _v82.position
00885 _x = _v83
00886 start = end
00887 end += 24
00888 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00889 _v84 = _v82.orientation
00890 _x = _v84
00891 start = end
00892 end += 32
00893 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00894 start = end
00895 end += 8
00896 (val1.absolute_tolerance,) = _struct_d.unpack(str[start:end])
00897 self.visibility_constraints.append(val1)
00898 return self
00899 except struct.error, e:
00900 raise roslib.message.DeserializationError(e)
00901
00902 _struct_I = roslib.message.struct_I
00903 _struct_b = struct.Struct("<b")
00904 _struct_d = struct.Struct("<d")
00905 _struct_i = struct.Struct("<i")
00906 _struct_4d = struct.Struct("<4d")
00907 _struct_2I = struct.Struct("<2I")
00908 _struct_3d = struct.Struct("<3d")