00001 """autogenerated by genmsg_py from GetRobotTrajectoryValidityRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import trajectory_msgs.msg
00006 import roslib.rostime
00007 import geometric_shapes_msgs.msg
00008 import geometry_msgs.msg
00009 import sensor_msgs.msg
00010 import motion_planning_msgs.msg
00011 import std_msgs.msg
00012
00013 class GetRobotTrajectoryValidityRequest(roslib.message.Message):
00014 _md5sum = "2cc927be2dfdeca7c58eb702418bca0b"
00015 _type = "planning_environment_msgs/GetRobotTrajectoryValidityRequest"
00016 _has_header = False
00017 _full_text = """
00018 motion_planning_msgs/RobotTrajectory trajectory
00019
00020
00021
00022
00023
00024
00025
00026 motion_planning_msgs/RobotState robot_state
00027
00028
00029 bool check_collisions
00030
00031
00032 bool check_path_constraints
00033
00034
00035 bool check_goal_constraints
00036
00037
00038 bool check_joint_limits
00039
00040
00041
00042
00043 bool check_full_trajectory
00044
00045
00046
00047
00048 motion_planning_msgs/OrderedCollisionOperations ordered_collision_operations
00049
00050
00051
00052 motion_planning_msgs/AllowedContactSpecification[] allowed_contacts
00053
00054
00055
00056
00057 motion_planning_msgs/Constraints path_constraints
00058
00059
00060
00061
00062 motion_planning_msgs/Constraints goal_constraints
00063
00064
00065
00066 motion_planning_msgs/LinkPadding[] link_padding
00067
00068
00069 ================================================================================
00070 MSG: motion_planning_msgs/RobotTrajectory
00071 trajectory_msgs/JointTrajectory joint_trajectory
00072 motion_planning_msgs/MultiDOFJointTrajectory multi_dof_joint_trajectory
00073 ================================================================================
00074 MSG: trajectory_msgs/JointTrajectory
00075 Header header
00076 string[] joint_names
00077 JointTrajectoryPoint[] points
00078 ================================================================================
00079 MSG: std_msgs/Header
00080 # Standard metadata for higher-level stamped data types.
00081 # This is generally used to communicate timestamped data
00082 # in a particular coordinate frame.
00083 #
00084 # sequence ID: consecutively increasing ID
00085 uint32 seq
00086 #Two-integer timestamp that is expressed as:
00087 # * stamp.secs: seconds (stamp_secs) since epoch
00088 # * stamp.nsecs: nanoseconds since stamp_secs
00089 # time-handling sugar is provided by the client library
00090 time stamp
00091 #Frame this data is associated with
00092 # 0: no frame
00093 # 1: global frame
00094 string frame_id
00095
00096 ================================================================================
00097 MSG: trajectory_msgs/JointTrajectoryPoint
00098 float64[] positions
00099 float64[] velocities
00100 float64[] accelerations
00101 duration time_from_start
00102 ================================================================================
00103 MSG: motion_planning_msgs/MultiDOFJointTrajectory
00104 #A representation of a multi-dof joint trajectory
00105 duration stamp
00106 string[] joint_names
00107 string[] frame_ids
00108 string[] child_frame_ids
00109 MultiDOFJointTrajectoryPoint[] points
00110
00111 ================================================================================
00112 MSG: motion_planning_msgs/MultiDOFJointTrajectoryPoint
00113 geometry_msgs/Pose[] poses
00114 duration time_from_start
00115 ================================================================================
00116 MSG: geometry_msgs/Pose
00117 # A representation of pose in free space, composed of postion and orientation.
00118 Point position
00119 Quaternion orientation
00120
00121 ================================================================================
00122 MSG: geometry_msgs/Point
00123 # This contains the position of a point in free space
00124 float64 x
00125 float64 y
00126 float64 z
00127
00128 ================================================================================
00129 MSG: geometry_msgs/Quaternion
00130 # This represents an orientation in free space in quaternion form.
00131
00132 float64 x
00133 float64 y
00134 float64 z
00135 float64 w
00136
00137 ================================================================================
00138 MSG: motion_planning_msgs/RobotState
00139 # This message contains information about the robot state, i.e. the positions of its joints and links
00140 sensor_msgs/JointState joint_state
00141 motion_planning_msgs/MultiDOFJointState multi_dof_joint_state
00142 ================================================================================
00143 MSG: sensor_msgs/JointState
00144 # This is a message that holds data to describe the state of a set of torque controlled joints.
00145 #
00146 # The state of each joint (revolute or prismatic) is defined by:
00147 # * the position of the joint (rad or m),
00148 # * the velocity of the joint (rad/s or m/s) and
00149 # * the effort that is applied in the joint (Nm or N).
00150 #
00151 # Each joint is uniquely identified by its name
00152 # The header specifies the time at which the joint states were recorded. All the joint states
00153 # in one message have to be recorded at the same time.
00154 #
00155 # This message consists of a multiple arrays, one for each part of the joint state.
00156 # The goal is to make each of the fields optional. When e.g. your joints have no
00157 # effort associated with them, you can leave the effort array empty.
00158 #
00159 # All arrays in this message should have the same size, or be empty.
00160 # This is the only way to uniquely associate the joint name with the correct
00161 # states.
00162
00163
00164 Header header
00165
00166 string[] name
00167 float64[] position
00168 float64[] velocity
00169 float64[] effort
00170
00171 ================================================================================
00172 MSG: motion_planning_msgs/MultiDOFJointState
00173 #A representation of a multi-dof joint state
00174 time stamp
00175 string[] joint_names
00176 string[] frame_ids
00177 string[] child_frame_ids
00178 geometry_msgs/Pose[] poses
00179
00180 ================================================================================
00181 MSG: motion_planning_msgs/OrderedCollisionOperations
00182 # A set of collision operations that will be performed in the order they are specified
00183 CollisionOperation[] collision_operations
00184 ================================================================================
00185 MSG: motion_planning_msgs/CollisionOperation
00186 # A definition of a collision operation
00187 # E.g. ("gripper",COLLISION_SET_ALL,ENABLE) will enable collisions
00188 # between the gripper and all objects in the collision space
00189
00190 string object1
00191 string object2
00192 string COLLISION_SET_ALL="all"
00193 string COLLISION_SET_OBJECTS="objects"
00194 string COLLISION_SET_ATTACHED_OBJECTS="attached"
00195
00196 # The penetration distance to which collisions are allowed. This is 0.0 by default.
00197 float64 penetration_distance
00198
00199 # Flag that determines whether collisions will be enabled or disabled for the pair of objects specified above
00200 int32 operation
00201 int32 DISABLE=0
00202 int32 ENABLE=1
00203
00204 ================================================================================
00205 MSG: motion_planning_msgs/AllowedContactSpecification
00206 # The names of the regions
00207 string name
00208
00209 # The shape of the region in the environment
00210 geometric_shapes_msgs/Shape shape
00211
00212 # The pose of the space defining the region
00213 geometry_msgs/PoseStamped pose_stamped
00214
00215 # The set of links that will be allowed to have penetration contact within this region
00216 string[] link_names
00217
00218 # The maximum penetration depth allowed for every link
00219 float64 penetration_depth
00220 ================================================================================
00221 MSG: geometric_shapes_msgs/Shape
00222 byte SPHERE=0
00223 byte BOX=1
00224 byte CYLINDER=2
00225 byte MESH=3
00226
00227 byte type
00228
00229
00230 #### define sphere, box, cylinder ####
00231 # the origin of each shape is considered at the shape's center
00232
00233 # for sphere
00234 # radius := dimensions[0]
00235
00236 # for cylinder
00237 # radius := dimensions[0]
00238 # length := dimensions[1]
00239 # the length is along the Z axis
00240
00241 # for box
00242 # size_x := dimensions[0]
00243 # size_y := dimensions[1]
00244 # size_z := dimensions[2]
00245 float64[] dimensions
00246
00247
00248 #### define mesh ####
00249
00250 # list of triangles; triangle k is defined by tre vertices located
00251 # at indices triangles[3k], triangles[3k+1], triangles[3k+2]
00252 int32[] triangles
00253 geometry_msgs/Point[] vertices
00254
00255 ================================================================================
00256 MSG: geometry_msgs/PoseStamped
00257 # A Pose with reference coordinate frame and timestamp
00258 Header header
00259 Pose pose
00260
00261 ================================================================================
00262 MSG: motion_planning_msgs/Constraints
00263 # This message contains a list of motion planning constraints.
00264
00265 motion_planning_msgs/JointConstraint[] joint_constraints
00266 motion_planning_msgs/PositionConstraint[] position_constraints
00267 motion_planning_msgs/OrientationConstraint[] orientation_constraints
00268 motion_planning_msgs/VisibilityConstraint[] visibility_constraints
00269
00270 ================================================================================
00271 MSG: motion_planning_msgs/JointConstraint
00272 # Constrain the position of a joint to be within a certain bound
00273 string joint_name
00274
00275 # the bound to be achieved is [position - tolerance_below, position + tolerance_above]
00276 float64 position
00277 float64 tolerance_above
00278 float64 tolerance_below
00279
00280 # A weighting factor for this constraint
00281 float64 weight
00282 ================================================================================
00283 MSG: motion_planning_msgs/PositionConstraint
00284 # This message contains the definition of a position constraint.
00285 Header header
00286
00287 # The robot link this constraint refers to
00288 string link_name
00289
00290 # The offset (in the link frame) for the target point on the link we are planning for
00291 geometry_msgs/Point target_point_offset
00292
00293 # The nominal/target position for the point we are planning for
00294 geometry_msgs/Point position
00295
00296 # The shape of the bounded region that constrains the position of the end-effector
00297 # This region is always centered at the position defined above
00298 geometric_shapes_msgs/Shape constraint_region_shape
00299
00300 # The orientation of the bounded region that constrains the position of the end-effector.
00301 # This allows the specification of non-axis aligned constraints
00302 geometry_msgs/Quaternion constraint_region_orientation
00303
00304 # Constraint weighting factor - a weight for this constraint
00305 float64 weight
00306 ================================================================================
00307 MSG: motion_planning_msgs/OrientationConstraint
00308 # This message contains the definition of an orientation constraint.
00309 Header header
00310
00311 # The robot link this constraint refers to
00312 string link_name
00313
00314 # The type of the constraint
00315 int32 type
00316 int32 LINK_FRAME=0
00317 int32 HEADER_FRAME=1
00318
00319 # The desired orientation of the robot link specified as a quaternion
00320 geometry_msgs/Quaternion orientation
00321
00322 # optional RPY error tolerances specified if
00323 float64 absolute_roll_tolerance
00324 float64 absolute_pitch_tolerance
00325 float64 absolute_yaw_tolerance
00326
00327 # Constraint weighting factor - a weight for this constraint
00328 float64 weight
00329
00330 ================================================================================
00331 MSG: motion_planning_msgs/VisibilityConstraint
00332 # This message contains the definition of a visibility constraint.
00333 Header header
00334
00335 # The point stamped target that needs to be kept within view of the sensor
00336 geometry_msgs/PointStamped target
00337
00338 # The local pose of the frame in which visibility is to be maintained
00339 # The frame id should represent the robot link to which the sensor is attached
00340 # The visual axis of the sensor is assumed to be along the X axis of this frame
00341 geometry_msgs/PoseStamped sensor_pose
00342
00343 # The deviation (in radians) that will be tolerated
00344 # Constraint error will be measured as the solid angle between the
00345 # X axis of the frame defined above and the vector between the origin
00346 # of the frame defined above and the target location
00347 float64 absolute_tolerance
00348
00349
00350 ================================================================================
00351 MSG: geometry_msgs/PointStamped
00352 # This represents a Point with reference coordinate frame and timestamp
00353 Header header
00354 Point point
00355
00356 ================================================================================
00357 MSG: motion_planning_msgs/LinkPadding
00358 #name for the link
00359 string link_name
00360
00361 # padding to apply to the link
00362 float64 padding
00363
00364 """
00365 __slots__ = ['trajectory','robot_state','check_collisions','check_path_constraints','check_goal_constraints','check_joint_limits','check_full_trajectory','ordered_collision_operations','allowed_contacts','path_constraints','goal_constraints','link_padding']
00366 _slot_types = ['motion_planning_msgs/RobotTrajectory','motion_planning_msgs/RobotState','bool','bool','bool','bool','bool','motion_planning_msgs/OrderedCollisionOperations','motion_planning_msgs/AllowedContactSpecification[]','motion_planning_msgs/Constraints','motion_planning_msgs/Constraints','motion_planning_msgs/LinkPadding[]']
00367
00368 def __init__(self, *args, **kwds):
00369 """
00370 Constructor. Any message fields that are implicitly/explicitly
00371 set to None will be assigned a default value. The recommend
00372 use is keyword arguments as this is more robust to future message
00373 changes. You cannot mix in-order arguments and keyword arguments.
00374
00375 The available fields are:
00376 trajectory,robot_state,check_collisions,check_path_constraints,check_goal_constraints,check_joint_limits,check_full_trajectory,ordered_collision_operations,allowed_contacts,path_constraints,goal_constraints,link_padding
00377
00378 @param args: complete set of field values, in .msg order
00379 @param kwds: use keyword arguments corresponding to message field names
00380 to set specific fields.
00381 """
00382 if args or kwds:
00383 super(GetRobotTrajectoryValidityRequest, self).__init__(*args, **kwds)
00384
00385 if self.trajectory is None:
00386 self.trajectory = motion_planning_msgs.msg.RobotTrajectory()
00387 if self.robot_state is None:
00388 self.robot_state = motion_planning_msgs.msg.RobotState()
00389 if self.check_collisions is None:
00390 self.check_collisions = False
00391 if self.check_path_constraints is None:
00392 self.check_path_constraints = False
00393 if self.check_goal_constraints is None:
00394 self.check_goal_constraints = False
00395 if self.check_joint_limits is None:
00396 self.check_joint_limits = False
00397 if self.check_full_trajectory is None:
00398 self.check_full_trajectory = False
00399 if self.ordered_collision_operations is None:
00400 self.ordered_collision_operations = motion_planning_msgs.msg.OrderedCollisionOperations()
00401 if self.allowed_contacts is None:
00402 self.allowed_contacts = []
00403 if self.path_constraints is None:
00404 self.path_constraints = motion_planning_msgs.msg.Constraints()
00405 if self.goal_constraints is None:
00406 self.goal_constraints = motion_planning_msgs.msg.Constraints()
00407 if self.link_padding is None:
00408 self.link_padding = []
00409 else:
00410 self.trajectory = motion_planning_msgs.msg.RobotTrajectory()
00411 self.robot_state = motion_planning_msgs.msg.RobotState()
00412 self.check_collisions = False
00413 self.check_path_constraints = False
00414 self.check_goal_constraints = False
00415 self.check_joint_limits = False
00416 self.check_full_trajectory = False
00417 self.ordered_collision_operations = motion_planning_msgs.msg.OrderedCollisionOperations()
00418 self.allowed_contacts = []
00419 self.path_constraints = motion_planning_msgs.msg.Constraints()
00420 self.goal_constraints = motion_planning_msgs.msg.Constraints()
00421 self.link_padding = []
00422
00423 def _get_types(self):
00424 """
00425 internal API method
00426 """
00427 return self._slot_types
00428
00429 def serialize(self, buff):
00430 """
00431 serialize message into buffer
00432 @param buff: buffer
00433 @type buff: StringIO
00434 """
00435 try:
00436 _x = self
00437 buff.write(_struct_3I.pack(_x.trajectory.joint_trajectory.header.seq, _x.trajectory.joint_trajectory.header.stamp.secs, _x.trajectory.joint_trajectory.header.stamp.nsecs))
00438 _x = self.trajectory.joint_trajectory.header.frame_id
00439 length = len(_x)
00440 buff.write(struct.pack('<I%ss'%length, length, _x))
00441 length = len(self.trajectory.joint_trajectory.joint_names)
00442 buff.write(_struct_I.pack(length))
00443 for val1 in self.trajectory.joint_trajectory.joint_names:
00444 length = len(val1)
00445 buff.write(struct.pack('<I%ss'%length, length, val1))
00446 length = len(self.trajectory.joint_trajectory.points)
00447 buff.write(_struct_I.pack(length))
00448 for val1 in self.trajectory.joint_trajectory.points:
00449 length = len(val1.positions)
00450 buff.write(_struct_I.pack(length))
00451 pattern = '<%sd'%length
00452 buff.write(struct.pack(pattern, *val1.positions))
00453 length = len(val1.velocities)
00454 buff.write(_struct_I.pack(length))
00455 pattern = '<%sd'%length
00456 buff.write(struct.pack(pattern, *val1.velocities))
00457 length = len(val1.accelerations)
00458 buff.write(_struct_I.pack(length))
00459 pattern = '<%sd'%length
00460 buff.write(struct.pack(pattern, *val1.accelerations))
00461 _v1 = val1.time_from_start
00462 _x = _v1
00463 buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00464 _x = self
00465 buff.write(_struct_2i.pack(_x.trajectory.multi_dof_joint_trajectory.stamp.secs, _x.trajectory.multi_dof_joint_trajectory.stamp.nsecs))
00466 length = len(self.trajectory.multi_dof_joint_trajectory.joint_names)
00467 buff.write(_struct_I.pack(length))
00468 for val1 in self.trajectory.multi_dof_joint_trajectory.joint_names:
00469 length = len(val1)
00470 buff.write(struct.pack('<I%ss'%length, length, val1))
00471 length = len(self.trajectory.multi_dof_joint_trajectory.frame_ids)
00472 buff.write(_struct_I.pack(length))
00473 for val1 in self.trajectory.multi_dof_joint_trajectory.frame_ids:
00474 length = len(val1)
00475 buff.write(struct.pack('<I%ss'%length, length, val1))
00476 length = len(self.trajectory.multi_dof_joint_trajectory.child_frame_ids)
00477 buff.write(_struct_I.pack(length))
00478 for val1 in self.trajectory.multi_dof_joint_trajectory.child_frame_ids:
00479 length = len(val1)
00480 buff.write(struct.pack('<I%ss'%length, length, val1))
00481 length = len(self.trajectory.multi_dof_joint_trajectory.points)
00482 buff.write(_struct_I.pack(length))
00483 for val1 in self.trajectory.multi_dof_joint_trajectory.points:
00484 length = len(val1.poses)
00485 buff.write(_struct_I.pack(length))
00486 for val2 in val1.poses:
00487 _v2 = val2.position
00488 _x = _v2
00489 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00490 _v3 = val2.orientation
00491 _x = _v3
00492 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00493 _v4 = val1.time_from_start
00494 _x = _v4
00495 buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00496 _x = self
00497 buff.write(_struct_3I.pack(_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs))
00498 _x = self.robot_state.joint_state.header.frame_id
00499 length = len(_x)
00500 buff.write(struct.pack('<I%ss'%length, length, _x))
00501 length = len(self.robot_state.joint_state.name)
00502 buff.write(_struct_I.pack(length))
00503 for val1 in self.robot_state.joint_state.name:
00504 length = len(val1)
00505 buff.write(struct.pack('<I%ss'%length, length, val1))
00506 length = len(self.robot_state.joint_state.position)
00507 buff.write(_struct_I.pack(length))
00508 pattern = '<%sd'%length
00509 buff.write(struct.pack(pattern, *self.robot_state.joint_state.position))
00510 length = len(self.robot_state.joint_state.velocity)
00511 buff.write(_struct_I.pack(length))
00512 pattern = '<%sd'%length
00513 buff.write(struct.pack(pattern, *self.robot_state.joint_state.velocity))
00514 length = len(self.robot_state.joint_state.effort)
00515 buff.write(_struct_I.pack(length))
00516 pattern = '<%sd'%length
00517 buff.write(struct.pack(pattern, *self.robot_state.joint_state.effort))
00518 _x = self
00519 buff.write(_struct_2I.pack(_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs))
00520 length = len(self.robot_state.multi_dof_joint_state.joint_names)
00521 buff.write(_struct_I.pack(length))
00522 for val1 in self.robot_state.multi_dof_joint_state.joint_names:
00523 length = len(val1)
00524 buff.write(struct.pack('<I%ss'%length, length, val1))
00525 length = len(self.robot_state.multi_dof_joint_state.frame_ids)
00526 buff.write(_struct_I.pack(length))
00527 for val1 in self.robot_state.multi_dof_joint_state.frame_ids:
00528 length = len(val1)
00529 buff.write(struct.pack('<I%ss'%length, length, val1))
00530 length = len(self.robot_state.multi_dof_joint_state.child_frame_ids)
00531 buff.write(_struct_I.pack(length))
00532 for val1 in self.robot_state.multi_dof_joint_state.child_frame_ids:
00533 length = len(val1)
00534 buff.write(struct.pack('<I%ss'%length, length, val1))
00535 length = len(self.robot_state.multi_dof_joint_state.poses)
00536 buff.write(_struct_I.pack(length))
00537 for val1 in self.robot_state.multi_dof_joint_state.poses:
00538 _v5 = val1.position
00539 _x = _v5
00540 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00541 _v6 = val1.orientation
00542 _x = _v6
00543 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00544 _x = self
00545 buff.write(_struct_5B.pack(_x.check_collisions, _x.check_path_constraints, _x.check_goal_constraints, _x.check_joint_limits, _x.check_full_trajectory))
00546 length = len(self.ordered_collision_operations.collision_operations)
00547 buff.write(_struct_I.pack(length))
00548 for val1 in self.ordered_collision_operations.collision_operations:
00549 _x = val1.object1
00550 length = len(_x)
00551 buff.write(struct.pack('<I%ss'%length, length, _x))
00552 _x = val1.object2
00553 length = len(_x)
00554 buff.write(struct.pack('<I%ss'%length, length, _x))
00555 _x = val1
00556 buff.write(_struct_di.pack(_x.penetration_distance, _x.operation))
00557 length = len(self.allowed_contacts)
00558 buff.write(_struct_I.pack(length))
00559 for val1 in self.allowed_contacts:
00560 _x = val1.name
00561 length = len(_x)
00562 buff.write(struct.pack('<I%ss'%length, length, _x))
00563 _v7 = val1.shape
00564 buff.write(_struct_b.pack(_v7.type))
00565 length = len(_v7.dimensions)
00566 buff.write(_struct_I.pack(length))
00567 pattern = '<%sd'%length
00568 buff.write(struct.pack(pattern, *_v7.dimensions))
00569 length = len(_v7.triangles)
00570 buff.write(_struct_I.pack(length))
00571 pattern = '<%si'%length
00572 buff.write(struct.pack(pattern, *_v7.triangles))
00573 length = len(_v7.vertices)
00574 buff.write(_struct_I.pack(length))
00575 for val3 in _v7.vertices:
00576 _x = val3
00577 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00578 _v8 = val1.pose_stamped
00579 _v9 = _v8.header
00580 buff.write(_struct_I.pack(_v9.seq))
00581 _v10 = _v9.stamp
00582 _x = _v10
00583 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00584 _x = _v9.frame_id
00585 length = len(_x)
00586 buff.write(struct.pack('<I%ss'%length, length, _x))
00587 _v11 = _v8.pose
00588 _v12 = _v11.position
00589 _x = _v12
00590 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00591 _v13 = _v11.orientation
00592 _x = _v13
00593 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00594 length = len(val1.link_names)
00595 buff.write(_struct_I.pack(length))
00596 for val2 in val1.link_names:
00597 length = len(val2)
00598 buff.write(struct.pack('<I%ss'%length, length, val2))
00599 buff.write(_struct_d.pack(val1.penetration_depth))
00600 length = len(self.path_constraints.joint_constraints)
00601 buff.write(_struct_I.pack(length))
00602 for val1 in self.path_constraints.joint_constraints:
00603 _x = val1.joint_name
00604 length = len(_x)
00605 buff.write(struct.pack('<I%ss'%length, length, _x))
00606 _x = val1
00607 buff.write(_struct_4d.pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
00608 length = len(self.path_constraints.position_constraints)
00609 buff.write(_struct_I.pack(length))
00610 for val1 in self.path_constraints.position_constraints:
00611 _v14 = val1.header
00612 buff.write(_struct_I.pack(_v14.seq))
00613 _v15 = _v14.stamp
00614 _x = _v15
00615 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00616 _x = _v14.frame_id
00617 length = len(_x)
00618 buff.write(struct.pack('<I%ss'%length, length, _x))
00619 _x = val1.link_name
00620 length = len(_x)
00621 buff.write(struct.pack('<I%ss'%length, length, _x))
00622 _v16 = val1.target_point_offset
00623 _x = _v16
00624 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00625 _v17 = val1.position
00626 _x = _v17
00627 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00628 _v18 = val1.constraint_region_shape
00629 buff.write(_struct_b.pack(_v18.type))
00630 length = len(_v18.dimensions)
00631 buff.write(_struct_I.pack(length))
00632 pattern = '<%sd'%length
00633 buff.write(struct.pack(pattern, *_v18.dimensions))
00634 length = len(_v18.triangles)
00635 buff.write(_struct_I.pack(length))
00636 pattern = '<%si'%length
00637 buff.write(struct.pack(pattern, *_v18.triangles))
00638 length = len(_v18.vertices)
00639 buff.write(_struct_I.pack(length))
00640 for val3 in _v18.vertices:
00641 _x = val3
00642 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00643 _v19 = val1.constraint_region_orientation
00644 _x = _v19
00645 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00646 buff.write(_struct_d.pack(val1.weight))
00647 length = len(self.path_constraints.orientation_constraints)
00648 buff.write(_struct_I.pack(length))
00649 for val1 in self.path_constraints.orientation_constraints:
00650 _v20 = val1.header
00651 buff.write(_struct_I.pack(_v20.seq))
00652 _v21 = _v20.stamp
00653 _x = _v21
00654 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00655 _x = _v20.frame_id
00656 length = len(_x)
00657 buff.write(struct.pack('<I%ss'%length, length, _x))
00658 _x = val1.link_name
00659 length = len(_x)
00660 buff.write(struct.pack('<I%ss'%length, length, _x))
00661 buff.write(_struct_i.pack(val1.type))
00662 _v22 = val1.orientation
00663 _x = _v22
00664 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00665 _x = val1
00666 buff.write(_struct_4d.pack(_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight))
00667 length = len(self.path_constraints.visibility_constraints)
00668 buff.write(_struct_I.pack(length))
00669 for val1 in self.path_constraints.visibility_constraints:
00670 _v23 = val1.header
00671 buff.write(_struct_I.pack(_v23.seq))
00672 _v24 = _v23.stamp
00673 _x = _v24
00674 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00675 _x = _v23.frame_id
00676 length = len(_x)
00677 buff.write(struct.pack('<I%ss'%length, length, _x))
00678 _v25 = val1.target
00679 _v26 = _v25.header
00680 buff.write(_struct_I.pack(_v26.seq))
00681 _v27 = _v26.stamp
00682 _x = _v27
00683 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00684 _x = _v26.frame_id
00685 length = len(_x)
00686 buff.write(struct.pack('<I%ss'%length, length, _x))
00687 _v28 = _v25.point
00688 _x = _v28
00689 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00690 _v29 = val1.sensor_pose
00691 _v30 = _v29.header
00692 buff.write(_struct_I.pack(_v30.seq))
00693 _v31 = _v30.stamp
00694 _x = _v31
00695 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00696 _x = _v30.frame_id
00697 length = len(_x)
00698 buff.write(struct.pack('<I%ss'%length, length, _x))
00699 _v32 = _v29.pose
00700 _v33 = _v32.position
00701 _x = _v33
00702 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00703 _v34 = _v32.orientation
00704 _x = _v34
00705 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00706 buff.write(_struct_d.pack(val1.absolute_tolerance))
00707 length = len(self.goal_constraints.joint_constraints)
00708 buff.write(_struct_I.pack(length))
00709 for val1 in self.goal_constraints.joint_constraints:
00710 _x = val1.joint_name
00711 length = len(_x)
00712 buff.write(struct.pack('<I%ss'%length, length, _x))
00713 _x = val1
00714 buff.write(_struct_4d.pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
00715 length = len(self.goal_constraints.position_constraints)
00716 buff.write(_struct_I.pack(length))
00717 for val1 in self.goal_constraints.position_constraints:
00718 _v35 = val1.header
00719 buff.write(_struct_I.pack(_v35.seq))
00720 _v36 = _v35.stamp
00721 _x = _v36
00722 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00723 _x = _v35.frame_id
00724 length = len(_x)
00725 buff.write(struct.pack('<I%ss'%length, length, _x))
00726 _x = val1.link_name
00727 length = len(_x)
00728 buff.write(struct.pack('<I%ss'%length, length, _x))
00729 _v37 = val1.target_point_offset
00730 _x = _v37
00731 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00732 _v38 = val1.position
00733 _x = _v38
00734 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00735 _v39 = val1.constraint_region_shape
00736 buff.write(_struct_b.pack(_v39.type))
00737 length = len(_v39.dimensions)
00738 buff.write(_struct_I.pack(length))
00739 pattern = '<%sd'%length
00740 buff.write(struct.pack(pattern, *_v39.dimensions))
00741 length = len(_v39.triangles)
00742 buff.write(_struct_I.pack(length))
00743 pattern = '<%si'%length
00744 buff.write(struct.pack(pattern, *_v39.triangles))
00745 length = len(_v39.vertices)
00746 buff.write(_struct_I.pack(length))
00747 for val3 in _v39.vertices:
00748 _x = val3
00749 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00750 _v40 = val1.constraint_region_orientation
00751 _x = _v40
00752 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00753 buff.write(_struct_d.pack(val1.weight))
00754 length = len(self.goal_constraints.orientation_constraints)
00755 buff.write(_struct_I.pack(length))
00756 for val1 in self.goal_constraints.orientation_constraints:
00757 _v41 = val1.header
00758 buff.write(_struct_I.pack(_v41.seq))
00759 _v42 = _v41.stamp
00760 _x = _v42
00761 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00762 _x = _v41.frame_id
00763 length = len(_x)
00764 buff.write(struct.pack('<I%ss'%length, length, _x))
00765 _x = val1.link_name
00766 length = len(_x)
00767 buff.write(struct.pack('<I%ss'%length, length, _x))
00768 buff.write(_struct_i.pack(val1.type))
00769 _v43 = val1.orientation
00770 _x = _v43
00771 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00772 _x = val1
00773 buff.write(_struct_4d.pack(_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight))
00774 length = len(self.goal_constraints.visibility_constraints)
00775 buff.write(_struct_I.pack(length))
00776 for val1 in self.goal_constraints.visibility_constraints:
00777 _v44 = val1.header
00778 buff.write(_struct_I.pack(_v44.seq))
00779 _v45 = _v44.stamp
00780 _x = _v45
00781 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00782 _x = _v44.frame_id
00783 length = len(_x)
00784 buff.write(struct.pack('<I%ss'%length, length, _x))
00785 _v46 = val1.target
00786 _v47 = _v46.header
00787 buff.write(_struct_I.pack(_v47.seq))
00788 _v48 = _v47.stamp
00789 _x = _v48
00790 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00791 _x = _v47.frame_id
00792 length = len(_x)
00793 buff.write(struct.pack('<I%ss'%length, length, _x))
00794 _v49 = _v46.point
00795 _x = _v49
00796 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00797 _v50 = val1.sensor_pose
00798 _v51 = _v50.header
00799 buff.write(_struct_I.pack(_v51.seq))
00800 _v52 = _v51.stamp
00801 _x = _v52
00802 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00803 _x = _v51.frame_id
00804 length = len(_x)
00805 buff.write(struct.pack('<I%ss'%length, length, _x))
00806 _v53 = _v50.pose
00807 _v54 = _v53.position
00808 _x = _v54
00809 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00810 _v55 = _v53.orientation
00811 _x = _v55
00812 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00813 buff.write(_struct_d.pack(val1.absolute_tolerance))
00814 length = len(self.link_padding)
00815 buff.write(_struct_I.pack(length))
00816 for val1 in self.link_padding:
00817 _x = val1.link_name
00818 length = len(_x)
00819 buff.write(struct.pack('<I%ss'%length, length, _x))
00820 buff.write(_struct_d.pack(val1.padding))
00821 except struct.error, se: self._check_types(se)
00822 except TypeError, te: self._check_types(te)
00823
00824 def deserialize(self, str):
00825 """
00826 unpack serialized message in str into this message instance
00827 @param str: byte array of serialized message
00828 @type str: str
00829 """
00830 try:
00831 if self.trajectory is None:
00832 self.trajectory = motion_planning_msgs.msg.RobotTrajectory()
00833 if self.robot_state is None:
00834 self.robot_state = motion_planning_msgs.msg.RobotState()
00835 if self.ordered_collision_operations is None:
00836 self.ordered_collision_operations = motion_planning_msgs.msg.OrderedCollisionOperations()
00837 if self.path_constraints is None:
00838 self.path_constraints = motion_planning_msgs.msg.Constraints()
00839 if self.goal_constraints is None:
00840 self.goal_constraints = motion_planning_msgs.msg.Constraints()
00841 end = 0
00842 _x = self
00843 start = end
00844 end += 12
00845 (_x.trajectory.joint_trajectory.header.seq, _x.trajectory.joint_trajectory.header.stamp.secs, _x.trajectory.joint_trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00846 start = end
00847 end += 4
00848 (length,) = _struct_I.unpack(str[start:end])
00849 start = end
00850 end += length
00851 self.trajectory.joint_trajectory.header.frame_id = str[start:end]
00852 start = end
00853 end += 4
00854 (length,) = _struct_I.unpack(str[start:end])
00855 self.trajectory.joint_trajectory.joint_names = []
00856 for i in xrange(0, length):
00857 start = end
00858 end += 4
00859 (length,) = _struct_I.unpack(str[start:end])
00860 start = end
00861 end += length
00862 val1 = str[start:end]
00863 self.trajectory.joint_trajectory.joint_names.append(val1)
00864 start = end
00865 end += 4
00866 (length,) = _struct_I.unpack(str[start:end])
00867 self.trajectory.joint_trajectory.points = []
00868 for i in xrange(0, length):
00869 val1 = trajectory_msgs.msg.JointTrajectoryPoint()
00870 start = end
00871 end += 4
00872 (length,) = _struct_I.unpack(str[start:end])
00873 pattern = '<%sd'%length
00874 start = end
00875 end += struct.calcsize(pattern)
00876 val1.positions = struct.unpack(pattern, str[start:end])
00877 start = end
00878 end += 4
00879 (length,) = _struct_I.unpack(str[start:end])
00880 pattern = '<%sd'%length
00881 start = end
00882 end += struct.calcsize(pattern)
00883 val1.velocities = struct.unpack(pattern, str[start:end])
00884 start = end
00885 end += 4
00886 (length,) = _struct_I.unpack(str[start:end])
00887 pattern = '<%sd'%length
00888 start = end
00889 end += struct.calcsize(pattern)
00890 val1.accelerations = struct.unpack(pattern, str[start:end])
00891 _v56 = val1.time_from_start
00892 _x = _v56
00893 start = end
00894 end += 8
00895 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00896 self.trajectory.joint_trajectory.points.append(val1)
00897 _x = self
00898 start = end
00899 end += 8
00900 (_x.trajectory.multi_dof_joint_trajectory.stamp.secs, _x.trajectory.multi_dof_joint_trajectory.stamp.nsecs,) = _struct_2i.unpack(str[start:end])
00901 start = end
00902 end += 4
00903 (length,) = _struct_I.unpack(str[start:end])
00904 self.trajectory.multi_dof_joint_trajectory.joint_names = []
00905 for i in xrange(0, length):
00906 start = end
00907 end += 4
00908 (length,) = _struct_I.unpack(str[start:end])
00909 start = end
00910 end += length
00911 val1 = str[start:end]
00912 self.trajectory.multi_dof_joint_trajectory.joint_names.append(val1)
00913 start = end
00914 end += 4
00915 (length,) = _struct_I.unpack(str[start:end])
00916 self.trajectory.multi_dof_joint_trajectory.frame_ids = []
00917 for i in xrange(0, length):
00918 start = end
00919 end += 4
00920 (length,) = _struct_I.unpack(str[start:end])
00921 start = end
00922 end += length
00923 val1 = str[start:end]
00924 self.trajectory.multi_dof_joint_trajectory.frame_ids.append(val1)
00925 start = end
00926 end += 4
00927 (length,) = _struct_I.unpack(str[start:end])
00928 self.trajectory.multi_dof_joint_trajectory.child_frame_ids = []
00929 for i in xrange(0, length):
00930 start = end
00931 end += 4
00932 (length,) = _struct_I.unpack(str[start:end])
00933 start = end
00934 end += length
00935 val1 = str[start:end]
00936 self.trajectory.multi_dof_joint_trajectory.child_frame_ids.append(val1)
00937 start = end
00938 end += 4
00939 (length,) = _struct_I.unpack(str[start:end])
00940 self.trajectory.multi_dof_joint_trajectory.points = []
00941 for i in xrange(0, length):
00942 val1 = motion_planning_msgs.msg.MultiDOFJointTrajectoryPoint()
00943 start = end
00944 end += 4
00945 (length,) = _struct_I.unpack(str[start:end])
00946 val1.poses = []
00947 for i in xrange(0, length):
00948 val2 = geometry_msgs.msg.Pose()
00949 _v57 = val2.position
00950 _x = _v57
00951 start = end
00952 end += 24
00953 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00954 _v58 = val2.orientation
00955 _x = _v58
00956 start = end
00957 end += 32
00958 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00959 val1.poses.append(val2)
00960 _v59 = val1.time_from_start
00961 _x = _v59
00962 start = end
00963 end += 8
00964 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00965 self.trajectory.multi_dof_joint_trajectory.points.append(val1)
00966 _x = self
00967 start = end
00968 end += 12
00969 (_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00970 start = end
00971 end += 4
00972 (length,) = _struct_I.unpack(str[start:end])
00973 start = end
00974 end += length
00975 self.robot_state.joint_state.header.frame_id = str[start:end]
00976 start = end
00977 end += 4
00978 (length,) = _struct_I.unpack(str[start:end])
00979 self.robot_state.joint_state.name = []
00980 for i in xrange(0, length):
00981 start = end
00982 end += 4
00983 (length,) = _struct_I.unpack(str[start:end])
00984 start = end
00985 end += length
00986 val1 = str[start:end]
00987 self.robot_state.joint_state.name.append(val1)
00988 start = end
00989 end += 4
00990 (length,) = _struct_I.unpack(str[start:end])
00991 pattern = '<%sd'%length
00992 start = end
00993 end += struct.calcsize(pattern)
00994 self.robot_state.joint_state.position = struct.unpack(pattern, 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 self.robot_state.joint_state.velocity = struct.unpack(pattern, str[start:end])
01002 start = end
01003 end += 4
01004 (length,) = _struct_I.unpack(str[start:end])
01005 pattern = '<%sd'%length
01006 start = end
01007 end += struct.calcsize(pattern)
01008 self.robot_state.joint_state.effort = struct.unpack(pattern, str[start:end])
01009 _x = self
01010 start = end
01011 end += 8
01012 (_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
01013 start = end
01014 end += 4
01015 (length,) = _struct_I.unpack(str[start:end])
01016 self.robot_state.multi_dof_joint_state.joint_names = []
01017 for i in xrange(0, length):
01018 start = end
01019 end += 4
01020 (length,) = _struct_I.unpack(str[start:end])
01021 start = end
01022 end += length
01023 val1 = str[start:end]
01024 self.robot_state.multi_dof_joint_state.joint_names.append(val1)
01025 start = end
01026 end += 4
01027 (length,) = _struct_I.unpack(str[start:end])
01028 self.robot_state.multi_dof_joint_state.frame_ids = []
01029 for i in xrange(0, length):
01030 start = end
01031 end += 4
01032 (length,) = _struct_I.unpack(str[start:end])
01033 start = end
01034 end += length
01035 val1 = str[start:end]
01036 self.robot_state.multi_dof_joint_state.frame_ids.append(val1)
01037 start = end
01038 end += 4
01039 (length,) = _struct_I.unpack(str[start:end])
01040 self.robot_state.multi_dof_joint_state.child_frame_ids = []
01041 for i in xrange(0, length):
01042 start = end
01043 end += 4
01044 (length,) = _struct_I.unpack(str[start:end])
01045 start = end
01046 end += length
01047 val1 = str[start:end]
01048 self.robot_state.multi_dof_joint_state.child_frame_ids.append(val1)
01049 start = end
01050 end += 4
01051 (length,) = _struct_I.unpack(str[start:end])
01052 self.robot_state.multi_dof_joint_state.poses = []
01053 for i in xrange(0, length):
01054 val1 = geometry_msgs.msg.Pose()
01055 _v60 = val1.position
01056 _x = _v60
01057 start = end
01058 end += 24
01059 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01060 _v61 = val1.orientation
01061 _x = _v61
01062 start = end
01063 end += 32
01064 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01065 self.robot_state.multi_dof_joint_state.poses.append(val1)
01066 _x = self
01067 start = end
01068 end += 5
01069 (_x.check_collisions, _x.check_path_constraints, _x.check_goal_constraints, _x.check_joint_limits, _x.check_full_trajectory,) = _struct_5B.unpack(str[start:end])
01070 self.check_collisions = bool(self.check_collisions)
01071 self.check_path_constraints = bool(self.check_path_constraints)
01072 self.check_goal_constraints = bool(self.check_goal_constraints)
01073 self.check_joint_limits = bool(self.check_joint_limits)
01074 self.check_full_trajectory = bool(self.check_full_trajectory)
01075 start = end
01076 end += 4
01077 (length,) = _struct_I.unpack(str[start:end])
01078 self.ordered_collision_operations.collision_operations = []
01079 for i in xrange(0, length):
01080 val1 = motion_planning_msgs.msg.CollisionOperation()
01081 start = end
01082 end += 4
01083 (length,) = _struct_I.unpack(str[start:end])
01084 start = end
01085 end += length
01086 val1.object1 = str[start:end]
01087 start = end
01088 end += 4
01089 (length,) = _struct_I.unpack(str[start:end])
01090 start = end
01091 end += length
01092 val1.object2 = str[start:end]
01093 _x = val1
01094 start = end
01095 end += 12
01096 (_x.penetration_distance, _x.operation,) = _struct_di.unpack(str[start:end])
01097 self.ordered_collision_operations.collision_operations.append(val1)
01098 start = end
01099 end += 4
01100 (length,) = _struct_I.unpack(str[start:end])
01101 self.allowed_contacts = []
01102 for i in xrange(0, length):
01103 val1 = motion_planning_msgs.msg.AllowedContactSpecification()
01104 start = end
01105 end += 4
01106 (length,) = _struct_I.unpack(str[start:end])
01107 start = end
01108 end += length
01109 val1.name = str[start:end]
01110 _v62 = val1.shape
01111 start = end
01112 end += 1
01113 (_v62.type,) = _struct_b.unpack(str[start:end])
01114 start = end
01115 end += 4
01116 (length,) = _struct_I.unpack(str[start:end])
01117 pattern = '<%sd'%length
01118 start = end
01119 end += struct.calcsize(pattern)
01120 _v62.dimensions = struct.unpack(pattern, str[start:end])
01121 start = end
01122 end += 4
01123 (length,) = _struct_I.unpack(str[start:end])
01124 pattern = '<%si'%length
01125 start = end
01126 end += struct.calcsize(pattern)
01127 _v62.triangles = struct.unpack(pattern, str[start:end])
01128 start = end
01129 end += 4
01130 (length,) = _struct_I.unpack(str[start:end])
01131 _v62.vertices = []
01132 for i in xrange(0, length):
01133 val3 = geometry_msgs.msg.Point()
01134 _x = val3
01135 start = end
01136 end += 24
01137 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01138 _v62.vertices.append(val3)
01139 _v63 = val1.pose_stamped
01140 _v64 = _v63.header
01141 start = end
01142 end += 4
01143 (_v64.seq,) = _struct_I.unpack(str[start:end])
01144 _v65 = _v64.stamp
01145 _x = _v65
01146 start = end
01147 end += 8
01148 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01149 start = end
01150 end += 4
01151 (length,) = _struct_I.unpack(str[start:end])
01152 start = end
01153 end += length
01154 _v64.frame_id = str[start:end]
01155 _v66 = _v63.pose
01156 _v67 = _v66.position
01157 _x = _v67
01158 start = end
01159 end += 24
01160 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01161 _v68 = _v66.orientation
01162 _x = _v68
01163 start = end
01164 end += 32
01165 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01166 start = end
01167 end += 4
01168 (length,) = _struct_I.unpack(str[start:end])
01169 val1.link_names = []
01170 for i in xrange(0, length):
01171 start = end
01172 end += 4
01173 (length,) = _struct_I.unpack(str[start:end])
01174 start = end
01175 end += length
01176 val2 = str[start:end]
01177 val1.link_names.append(val2)
01178 start = end
01179 end += 8
01180 (val1.penetration_depth,) = _struct_d.unpack(str[start:end])
01181 self.allowed_contacts.append(val1)
01182 start = end
01183 end += 4
01184 (length,) = _struct_I.unpack(str[start:end])
01185 self.path_constraints.joint_constraints = []
01186 for i in xrange(0, length):
01187 val1 = motion_planning_msgs.msg.JointConstraint()
01188 start = end
01189 end += 4
01190 (length,) = _struct_I.unpack(str[start:end])
01191 start = end
01192 end += length
01193 val1.joint_name = str[start:end]
01194 _x = val1
01195 start = end
01196 end += 32
01197 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _struct_4d.unpack(str[start:end])
01198 self.path_constraints.joint_constraints.append(val1)
01199 start = end
01200 end += 4
01201 (length,) = _struct_I.unpack(str[start:end])
01202 self.path_constraints.position_constraints = []
01203 for i in xrange(0, length):
01204 val1 = motion_planning_msgs.msg.PositionConstraint()
01205 _v69 = val1.header
01206 start = end
01207 end += 4
01208 (_v69.seq,) = _struct_I.unpack(str[start:end])
01209 _v70 = _v69.stamp
01210 _x = _v70
01211 start = end
01212 end += 8
01213 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01214 start = end
01215 end += 4
01216 (length,) = _struct_I.unpack(str[start:end])
01217 start = end
01218 end += length
01219 _v69.frame_id = str[start:end]
01220 start = end
01221 end += 4
01222 (length,) = _struct_I.unpack(str[start:end])
01223 start = end
01224 end += length
01225 val1.link_name = str[start:end]
01226 _v71 = val1.target_point_offset
01227 _x = _v71
01228 start = end
01229 end += 24
01230 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01231 _v72 = val1.position
01232 _x = _v72
01233 start = end
01234 end += 24
01235 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01236 _v73 = val1.constraint_region_shape
01237 start = end
01238 end += 1
01239 (_v73.type,) = _struct_b.unpack(str[start:end])
01240 start = end
01241 end += 4
01242 (length,) = _struct_I.unpack(str[start:end])
01243 pattern = '<%sd'%length
01244 start = end
01245 end += struct.calcsize(pattern)
01246 _v73.dimensions = struct.unpack(pattern, str[start:end])
01247 start = end
01248 end += 4
01249 (length,) = _struct_I.unpack(str[start:end])
01250 pattern = '<%si'%length
01251 start = end
01252 end += struct.calcsize(pattern)
01253 _v73.triangles = struct.unpack(pattern, str[start:end])
01254 start = end
01255 end += 4
01256 (length,) = _struct_I.unpack(str[start:end])
01257 _v73.vertices = []
01258 for i in xrange(0, length):
01259 val3 = geometry_msgs.msg.Point()
01260 _x = val3
01261 start = end
01262 end += 24
01263 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01264 _v73.vertices.append(val3)
01265 _v74 = val1.constraint_region_orientation
01266 _x = _v74
01267 start = end
01268 end += 32
01269 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01270 start = end
01271 end += 8
01272 (val1.weight,) = _struct_d.unpack(str[start:end])
01273 self.path_constraints.position_constraints.append(val1)
01274 start = end
01275 end += 4
01276 (length,) = _struct_I.unpack(str[start:end])
01277 self.path_constraints.orientation_constraints = []
01278 for i in xrange(0, length):
01279 val1 = motion_planning_msgs.msg.OrientationConstraint()
01280 _v75 = val1.header
01281 start = end
01282 end += 4
01283 (_v75.seq,) = _struct_I.unpack(str[start:end])
01284 _v76 = _v75.stamp
01285 _x = _v76
01286 start = end
01287 end += 8
01288 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01289 start = end
01290 end += 4
01291 (length,) = _struct_I.unpack(str[start:end])
01292 start = end
01293 end += length
01294 _v75.frame_id = str[start:end]
01295 start = end
01296 end += 4
01297 (length,) = _struct_I.unpack(str[start:end])
01298 start = end
01299 end += length
01300 val1.link_name = str[start:end]
01301 start = end
01302 end += 4
01303 (val1.type,) = _struct_i.unpack(str[start:end])
01304 _v77 = val1.orientation
01305 _x = _v77
01306 start = end
01307 end += 32
01308 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01309 _x = val1
01310 start = end
01311 end += 32
01312 (_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight,) = _struct_4d.unpack(str[start:end])
01313 self.path_constraints.orientation_constraints.append(val1)
01314 start = end
01315 end += 4
01316 (length,) = _struct_I.unpack(str[start:end])
01317 self.path_constraints.visibility_constraints = []
01318 for i in xrange(0, length):
01319 val1 = motion_planning_msgs.msg.VisibilityConstraint()
01320 _v78 = val1.header
01321 start = end
01322 end += 4
01323 (_v78.seq,) = _struct_I.unpack(str[start:end])
01324 _v79 = _v78.stamp
01325 _x = _v79
01326 start = end
01327 end += 8
01328 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01329 start = end
01330 end += 4
01331 (length,) = _struct_I.unpack(str[start:end])
01332 start = end
01333 end += length
01334 _v78.frame_id = str[start:end]
01335 _v80 = val1.target
01336 _v81 = _v80.header
01337 start = end
01338 end += 4
01339 (_v81.seq,) = _struct_I.unpack(str[start:end])
01340 _v82 = _v81.stamp
01341 _x = _v82
01342 start = end
01343 end += 8
01344 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01345 start = end
01346 end += 4
01347 (length,) = _struct_I.unpack(str[start:end])
01348 start = end
01349 end += length
01350 _v81.frame_id = str[start:end]
01351 _v83 = _v80.point
01352 _x = _v83
01353 start = end
01354 end += 24
01355 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01356 _v84 = val1.sensor_pose
01357 _v85 = _v84.header
01358 start = end
01359 end += 4
01360 (_v85.seq,) = _struct_I.unpack(str[start:end])
01361 _v86 = _v85.stamp
01362 _x = _v86
01363 start = end
01364 end += 8
01365 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01366 start = end
01367 end += 4
01368 (length,) = _struct_I.unpack(str[start:end])
01369 start = end
01370 end += length
01371 _v85.frame_id = str[start:end]
01372 _v87 = _v84.pose
01373 _v88 = _v87.position
01374 _x = _v88
01375 start = end
01376 end += 24
01377 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01378 _v89 = _v87.orientation
01379 _x = _v89
01380 start = end
01381 end += 32
01382 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01383 start = end
01384 end += 8
01385 (val1.absolute_tolerance,) = _struct_d.unpack(str[start:end])
01386 self.path_constraints.visibility_constraints.append(val1)
01387 start = end
01388 end += 4
01389 (length,) = _struct_I.unpack(str[start:end])
01390 self.goal_constraints.joint_constraints = []
01391 for i in xrange(0, length):
01392 val1 = motion_planning_msgs.msg.JointConstraint()
01393 start = end
01394 end += 4
01395 (length,) = _struct_I.unpack(str[start:end])
01396 start = end
01397 end += length
01398 val1.joint_name = str[start:end]
01399 _x = val1
01400 start = end
01401 end += 32
01402 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _struct_4d.unpack(str[start:end])
01403 self.goal_constraints.joint_constraints.append(val1)
01404 start = end
01405 end += 4
01406 (length,) = _struct_I.unpack(str[start:end])
01407 self.goal_constraints.position_constraints = []
01408 for i in xrange(0, length):
01409 val1 = motion_planning_msgs.msg.PositionConstraint()
01410 _v90 = val1.header
01411 start = end
01412 end += 4
01413 (_v90.seq,) = _struct_I.unpack(str[start:end])
01414 _v91 = _v90.stamp
01415 _x = _v91
01416 start = end
01417 end += 8
01418 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01419 start = end
01420 end += 4
01421 (length,) = _struct_I.unpack(str[start:end])
01422 start = end
01423 end += length
01424 _v90.frame_id = str[start:end]
01425 start = end
01426 end += 4
01427 (length,) = _struct_I.unpack(str[start:end])
01428 start = end
01429 end += length
01430 val1.link_name = str[start:end]
01431 _v92 = val1.target_point_offset
01432 _x = _v92
01433 start = end
01434 end += 24
01435 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01436 _v93 = val1.position
01437 _x = _v93
01438 start = end
01439 end += 24
01440 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01441 _v94 = val1.constraint_region_shape
01442 start = end
01443 end += 1
01444 (_v94.type,) = _struct_b.unpack(str[start:end])
01445 start = end
01446 end += 4
01447 (length,) = _struct_I.unpack(str[start:end])
01448 pattern = '<%sd'%length
01449 start = end
01450 end += struct.calcsize(pattern)
01451 _v94.dimensions = struct.unpack(pattern, str[start:end])
01452 start = end
01453 end += 4
01454 (length,) = _struct_I.unpack(str[start:end])
01455 pattern = '<%si'%length
01456 start = end
01457 end += struct.calcsize(pattern)
01458 _v94.triangles = struct.unpack(pattern, str[start:end])
01459 start = end
01460 end += 4
01461 (length,) = _struct_I.unpack(str[start:end])
01462 _v94.vertices = []
01463 for i in xrange(0, length):
01464 val3 = geometry_msgs.msg.Point()
01465 _x = val3
01466 start = end
01467 end += 24
01468 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01469 _v94.vertices.append(val3)
01470 _v95 = val1.constraint_region_orientation
01471 _x = _v95
01472 start = end
01473 end += 32
01474 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01475 start = end
01476 end += 8
01477 (val1.weight,) = _struct_d.unpack(str[start:end])
01478 self.goal_constraints.position_constraints.append(val1)
01479 start = end
01480 end += 4
01481 (length,) = _struct_I.unpack(str[start:end])
01482 self.goal_constraints.orientation_constraints = []
01483 for i in xrange(0, length):
01484 val1 = motion_planning_msgs.msg.OrientationConstraint()
01485 _v96 = val1.header
01486 start = end
01487 end += 4
01488 (_v96.seq,) = _struct_I.unpack(str[start:end])
01489 _v97 = _v96.stamp
01490 _x = _v97
01491 start = end
01492 end += 8
01493 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01494 start = end
01495 end += 4
01496 (length,) = _struct_I.unpack(str[start:end])
01497 start = end
01498 end += length
01499 _v96.frame_id = str[start:end]
01500 start = end
01501 end += 4
01502 (length,) = _struct_I.unpack(str[start:end])
01503 start = end
01504 end += length
01505 val1.link_name = str[start:end]
01506 start = end
01507 end += 4
01508 (val1.type,) = _struct_i.unpack(str[start:end])
01509 _v98 = val1.orientation
01510 _x = _v98
01511 start = end
01512 end += 32
01513 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01514 _x = val1
01515 start = end
01516 end += 32
01517 (_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight,) = _struct_4d.unpack(str[start:end])
01518 self.goal_constraints.orientation_constraints.append(val1)
01519 start = end
01520 end += 4
01521 (length,) = _struct_I.unpack(str[start:end])
01522 self.goal_constraints.visibility_constraints = []
01523 for i in xrange(0, length):
01524 val1 = motion_planning_msgs.msg.VisibilityConstraint()
01525 _v99 = val1.header
01526 start = end
01527 end += 4
01528 (_v99.seq,) = _struct_I.unpack(str[start:end])
01529 _v100 = _v99.stamp
01530 _x = _v100
01531 start = end
01532 end += 8
01533 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01534 start = end
01535 end += 4
01536 (length,) = _struct_I.unpack(str[start:end])
01537 start = end
01538 end += length
01539 _v99.frame_id = str[start:end]
01540 _v101 = val1.target
01541 _v102 = _v101.header
01542 start = end
01543 end += 4
01544 (_v102.seq,) = _struct_I.unpack(str[start:end])
01545 _v103 = _v102.stamp
01546 _x = _v103
01547 start = end
01548 end += 8
01549 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01550 start = end
01551 end += 4
01552 (length,) = _struct_I.unpack(str[start:end])
01553 start = end
01554 end += length
01555 _v102.frame_id = str[start:end]
01556 _v104 = _v101.point
01557 _x = _v104
01558 start = end
01559 end += 24
01560 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01561 _v105 = val1.sensor_pose
01562 _v106 = _v105.header
01563 start = end
01564 end += 4
01565 (_v106.seq,) = _struct_I.unpack(str[start:end])
01566 _v107 = _v106.stamp
01567 _x = _v107
01568 start = end
01569 end += 8
01570 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
01571 start = end
01572 end += 4
01573 (length,) = _struct_I.unpack(str[start:end])
01574 start = end
01575 end += length
01576 _v106.frame_id = str[start:end]
01577 _v108 = _v105.pose
01578 _v109 = _v108.position
01579 _x = _v109
01580 start = end
01581 end += 24
01582 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
01583 _v110 = _v108.orientation
01584 _x = _v110
01585 start = end
01586 end += 32
01587 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01588 start = end
01589 end += 8
01590 (val1.absolute_tolerance,) = _struct_d.unpack(str[start:end])
01591 self.goal_constraints.visibility_constraints.append(val1)
01592 start = end
01593 end += 4
01594 (length,) = _struct_I.unpack(str[start:end])
01595 self.link_padding = []
01596 for i in xrange(0, length):
01597 val1 = motion_planning_msgs.msg.LinkPadding()
01598 start = end
01599 end += 4
01600 (length,) = _struct_I.unpack(str[start:end])
01601 start = end
01602 end += length
01603 val1.link_name = str[start:end]
01604 start = end
01605 end += 8
01606 (val1.padding,) = _struct_d.unpack(str[start:end])
01607 self.link_padding.append(val1)
01608 return self
01609 except struct.error, e:
01610 raise roslib.message.DeserializationError(e)
01611
01612
01613 def serialize_numpy(self, buff, numpy):
01614 """
01615 serialize message with numpy array types into buffer
01616 @param buff: buffer
01617 @type buff: StringIO
01618 @param numpy: numpy python module
01619 @type numpy module
01620 """
01621 try:
01622 _x = self
01623 buff.write(_struct_3I.pack(_x.trajectory.joint_trajectory.header.seq, _x.trajectory.joint_trajectory.header.stamp.secs, _x.trajectory.joint_trajectory.header.stamp.nsecs))
01624 _x = self.trajectory.joint_trajectory.header.frame_id
01625 length = len(_x)
01626 buff.write(struct.pack('<I%ss'%length, length, _x))
01627 length = len(self.trajectory.joint_trajectory.joint_names)
01628 buff.write(_struct_I.pack(length))
01629 for val1 in self.trajectory.joint_trajectory.joint_names:
01630 length = len(val1)
01631 buff.write(struct.pack('<I%ss'%length, length, val1))
01632 length = len(self.trajectory.joint_trajectory.points)
01633 buff.write(_struct_I.pack(length))
01634 for val1 in self.trajectory.joint_trajectory.points:
01635 length = len(val1.positions)
01636 buff.write(_struct_I.pack(length))
01637 pattern = '<%sd'%length
01638 buff.write(val1.positions.tostring())
01639 length = len(val1.velocities)
01640 buff.write(_struct_I.pack(length))
01641 pattern = '<%sd'%length
01642 buff.write(val1.velocities.tostring())
01643 length = len(val1.accelerations)
01644 buff.write(_struct_I.pack(length))
01645 pattern = '<%sd'%length
01646 buff.write(val1.accelerations.tostring())
01647 _v111 = val1.time_from_start
01648 _x = _v111
01649 buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
01650 _x = self
01651 buff.write(_struct_2i.pack(_x.trajectory.multi_dof_joint_trajectory.stamp.secs, _x.trajectory.multi_dof_joint_trajectory.stamp.nsecs))
01652 length = len(self.trajectory.multi_dof_joint_trajectory.joint_names)
01653 buff.write(_struct_I.pack(length))
01654 for val1 in self.trajectory.multi_dof_joint_trajectory.joint_names:
01655 length = len(val1)
01656 buff.write(struct.pack('<I%ss'%length, length, val1))
01657 length = len(self.trajectory.multi_dof_joint_trajectory.frame_ids)
01658 buff.write(_struct_I.pack(length))
01659 for val1 in self.trajectory.multi_dof_joint_trajectory.frame_ids:
01660 length = len(val1)
01661 buff.write(struct.pack('<I%ss'%length, length, val1))
01662 length = len(self.trajectory.multi_dof_joint_trajectory.child_frame_ids)
01663 buff.write(_struct_I.pack(length))
01664 for val1 in self.trajectory.multi_dof_joint_trajectory.child_frame_ids:
01665 length = len(val1)
01666 buff.write(struct.pack('<I%ss'%length, length, val1))
01667 length = len(self.trajectory.multi_dof_joint_trajectory.points)
01668 buff.write(_struct_I.pack(length))
01669 for val1 in self.trajectory.multi_dof_joint_trajectory.points:
01670 length = len(val1.poses)
01671 buff.write(_struct_I.pack(length))
01672 for val2 in val1.poses:
01673 _v112 = val2.position
01674 _x = _v112
01675 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01676 _v113 = val2.orientation
01677 _x = _v113
01678 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01679 _v114 = val1.time_from_start
01680 _x = _v114
01681 buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
01682 _x = self
01683 buff.write(_struct_3I.pack(_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs))
01684 _x = self.robot_state.joint_state.header.frame_id
01685 length = len(_x)
01686 buff.write(struct.pack('<I%ss'%length, length, _x))
01687 length = len(self.robot_state.joint_state.name)
01688 buff.write(_struct_I.pack(length))
01689 for val1 in self.robot_state.joint_state.name:
01690 length = len(val1)
01691 buff.write(struct.pack('<I%ss'%length, length, val1))
01692 length = len(self.robot_state.joint_state.position)
01693 buff.write(_struct_I.pack(length))
01694 pattern = '<%sd'%length
01695 buff.write(self.robot_state.joint_state.position.tostring())
01696 length = len(self.robot_state.joint_state.velocity)
01697 buff.write(_struct_I.pack(length))
01698 pattern = '<%sd'%length
01699 buff.write(self.robot_state.joint_state.velocity.tostring())
01700 length = len(self.robot_state.joint_state.effort)
01701 buff.write(_struct_I.pack(length))
01702 pattern = '<%sd'%length
01703 buff.write(self.robot_state.joint_state.effort.tostring())
01704 _x = self
01705 buff.write(_struct_2I.pack(_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs))
01706 length = len(self.robot_state.multi_dof_joint_state.joint_names)
01707 buff.write(_struct_I.pack(length))
01708 for val1 in self.robot_state.multi_dof_joint_state.joint_names:
01709 length = len(val1)
01710 buff.write(struct.pack('<I%ss'%length, length, val1))
01711 length = len(self.robot_state.multi_dof_joint_state.frame_ids)
01712 buff.write(_struct_I.pack(length))
01713 for val1 in self.robot_state.multi_dof_joint_state.frame_ids:
01714 length = len(val1)
01715 buff.write(struct.pack('<I%ss'%length, length, val1))
01716 length = len(self.robot_state.multi_dof_joint_state.child_frame_ids)
01717 buff.write(_struct_I.pack(length))
01718 for val1 in self.robot_state.multi_dof_joint_state.child_frame_ids:
01719 length = len(val1)
01720 buff.write(struct.pack('<I%ss'%length, length, val1))
01721 length = len(self.robot_state.multi_dof_joint_state.poses)
01722 buff.write(_struct_I.pack(length))
01723 for val1 in self.robot_state.multi_dof_joint_state.poses:
01724 _v115 = val1.position
01725 _x = _v115
01726 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01727 _v116 = val1.orientation
01728 _x = _v116
01729 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01730 _x = self
01731 buff.write(_struct_5B.pack(_x.check_collisions, _x.check_path_constraints, _x.check_goal_constraints, _x.check_joint_limits, _x.check_full_trajectory))
01732 length = len(self.ordered_collision_operations.collision_operations)
01733 buff.write(_struct_I.pack(length))
01734 for val1 in self.ordered_collision_operations.collision_operations:
01735 _x = val1.object1
01736 length = len(_x)
01737 buff.write(struct.pack('<I%ss'%length, length, _x))
01738 _x = val1.object2
01739 length = len(_x)
01740 buff.write(struct.pack('<I%ss'%length, length, _x))
01741 _x = val1
01742 buff.write(_struct_di.pack(_x.penetration_distance, _x.operation))
01743 length = len(self.allowed_contacts)
01744 buff.write(_struct_I.pack(length))
01745 for val1 in self.allowed_contacts:
01746 _x = val1.name
01747 length = len(_x)
01748 buff.write(struct.pack('<I%ss'%length, length, _x))
01749 _v117 = val1.shape
01750 buff.write(_struct_b.pack(_v117.type))
01751 length = len(_v117.dimensions)
01752 buff.write(_struct_I.pack(length))
01753 pattern = '<%sd'%length
01754 buff.write(_v117.dimensions.tostring())
01755 length = len(_v117.triangles)
01756 buff.write(_struct_I.pack(length))
01757 pattern = '<%si'%length
01758 buff.write(_v117.triangles.tostring())
01759 length = len(_v117.vertices)
01760 buff.write(_struct_I.pack(length))
01761 for val3 in _v117.vertices:
01762 _x = val3
01763 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01764 _v118 = val1.pose_stamped
01765 _v119 = _v118.header
01766 buff.write(_struct_I.pack(_v119.seq))
01767 _v120 = _v119.stamp
01768 _x = _v120
01769 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01770 _x = _v119.frame_id
01771 length = len(_x)
01772 buff.write(struct.pack('<I%ss'%length, length, _x))
01773 _v121 = _v118.pose
01774 _v122 = _v121.position
01775 _x = _v122
01776 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01777 _v123 = _v121.orientation
01778 _x = _v123
01779 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01780 length = len(val1.link_names)
01781 buff.write(_struct_I.pack(length))
01782 for val2 in val1.link_names:
01783 length = len(val2)
01784 buff.write(struct.pack('<I%ss'%length, length, val2))
01785 buff.write(_struct_d.pack(val1.penetration_depth))
01786 length = len(self.path_constraints.joint_constraints)
01787 buff.write(_struct_I.pack(length))
01788 for val1 in self.path_constraints.joint_constraints:
01789 _x = val1.joint_name
01790 length = len(_x)
01791 buff.write(struct.pack('<I%ss'%length, length, _x))
01792 _x = val1
01793 buff.write(_struct_4d.pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
01794 length = len(self.path_constraints.position_constraints)
01795 buff.write(_struct_I.pack(length))
01796 for val1 in self.path_constraints.position_constraints:
01797 _v124 = val1.header
01798 buff.write(_struct_I.pack(_v124.seq))
01799 _v125 = _v124.stamp
01800 _x = _v125
01801 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01802 _x = _v124.frame_id
01803 length = len(_x)
01804 buff.write(struct.pack('<I%ss'%length, length, _x))
01805 _x = val1.link_name
01806 length = len(_x)
01807 buff.write(struct.pack('<I%ss'%length, length, _x))
01808 _v126 = val1.target_point_offset
01809 _x = _v126
01810 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01811 _v127 = val1.position
01812 _x = _v127
01813 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01814 _v128 = val1.constraint_region_shape
01815 buff.write(_struct_b.pack(_v128.type))
01816 length = len(_v128.dimensions)
01817 buff.write(_struct_I.pack(length))
01818 pattern = '<%sd'%length
01819 buff.write(_v128.dimensions.tostring())
01820 length = len(_v128.triangles)
01821 buff.write(_struct_I.pack(length))
01822 pattern = '<%si'%length
01823 buff.write(_v128.triangles.tostring())
01824 length = len(_v128.vertices)
01825 buff.write(_struct_I.pack(length))
01826 for val3 in _v128.vertices:
01827 _x = val3
01828 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01829 _v129 = val1.constraint_region_orientation
01830 _x = _v129
01831 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01832 buff.write(_struct_d.pack(val1.weight))
01833 length = len(self.path_constraints.orientation_constraints)
01834 buff.write(_struct_I.pack(length))
01835 for val1 in self.path_constraints.orientation_constraints:
01836 _v130 = val1.header
01837 buff.write(_struct_I.pack(_v130.seq))
01838 _v131 = _v130.stamp
01839 _x = _v131
01840 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01841 _x = _v130.frame_id
01842 length = len(_x)
01843 buff.write(struct.pack('<I%ss'%length, length, _x))
01844 _x = val1.link_name
01845 length = len(_x)
01846 buff.write(struct.pack('<I%ss'%length, length, _x))
01847 buff.write(_struct_i.pack(val1.type))
01848 _v132 = val1.orientation
01849 _x = _v132
01850 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01851 _x = val1
01852 buff.write(_struct_4d.pack(_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight))
01853 length = len(self.path_constraints.visibility_constraints)
01854 buff.write(_struct_I.pack(length))
01855 for val1 in self.path_constraints.visibility_constraints:
01856 _v133 = val1.header
01857 buff.write(_struct_I.pack(_v133.seq))
01858 _v134 = _v133.stamp
01859 _x = _v134
01860 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01861 _x = _v133.frame_id
01862 length = len(_x)
01863 buff.write(struct.pack('<I%ss'%length, length, _x))
01864 _v135 = val1.target
01865 _v136 = _v135.header
01866 buff.write(_struct_I.pack(_v136.seq))
01867 _v137 = _v136.stamp
01868 _x = _v137
01869 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01870 _x = _v136.frame_id
01871 length = len(_x)
01872 buff.write(struct.pack('<I%ss'%length, length, _x))
01873 _v138 = _v135.point
01874 _x = _v138
01875 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01876 _v139 = val1.sensor_pose
01877 _v140 = _v139.header
01878 buff.write(_struct_I.pack(_v140.seq))
01879 _v141 = _v140.stamp
01880 _x = _v141
01881 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01882 _x = _v140.frame_id
01883 length = len(_x)
01884 buff.write(struct.pack('<I%ss'%length, length, _x))
01885 _v142 = _v139.pose
01886 _v143 = _v142.position
01887 _x = _v143
01888 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01889 _v144 = _v142.orientation
01890 _x = _v144
01891 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01892 buff.write(_struct_d.pack(val1.absolute_tolerance))
01893 length = len(self.goal_constraints.joint_constraints)
01894 buff.write(_struct_I.pack(length))
01895 for val1 in self.goal_constraints.joint_constraints:
01896 _x = val1.joint_name
01897 length = len(_x)
01898 buff.write(struct.pack('<I%ss'%length, length, _x))
01899 _x = val1
01900 buff.write(_struct_4d.pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
01901 length = len(self.goal_constraints.position_constraints)
01902 buff.write(_struct_I.pack(length))
01903 for val1 in self.goal_constraints.position_constraints:
01904 _v145 = val1.header
01905 buff.write(_struct_I.pack(_v145.seq))
01906 _v146 = _v145.stamp
01907 _x = _v146
01908 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01909 _x = _v145.frame_id
01910 length = len(_x)
01911 buff.write(struct.pack('<I%ss'%length, length, _x))
01912 _x = val1.link_name
01913 length = len(_x)
01914 buff.write(struct.pack('<I%ss'%length, length, _x))
01915 _v147 = val1.target_point_offset
01916 _x = _v147
01917 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01918 _v148 = val1.position
01919 _x = _v148
01920 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01921 _v149 = val1.constraint_region_shape
01922 buff.write(_struct_b.pack(_v149.type))
01923 length = len(_v149.dimensions)
01924 buff.write(_struct_I.pack(length))
01925 pattern = '<%sd'%length
01926 buff.write(_v149.dimensions.tostring())
01927 length = len(_v149.triangles)
01928 buff.write(_struct_I.pack(length))
01929 pattern = '<%si'%length
01930 buff.write(_v149.triangles.tostring())
01931 length = len(_v149.vertices)
01932 buff.write(_struct_I.pack(length))
01933 for val3 in _v149.vertices:
01934 _x = val3
01935 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01936 _v150 = val1.constraint_region_orientation
01937 _x = _v150
01938 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01939 buff.write(_struct_d.pack(val1.weight))
01940 length = len(self.goal_constraints.orientation_constraints)
01941 buff.write(_struct_I.pack(length))
01942 for val1 in self.goal_constraints.orientation_constraints:
01943 _v151 = val1.header
01944 buff.write(_struct_I.pack(_v151.seq))
01945 _v152 = _v151.stamp
01946 _x = _v152
01947 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01948 _x = _v151.frame_id
01949 length = len(_x)
01950 buff.write(struct.pack('<I%ss'%length, length, _x))
01951 _x = val1.link_name
01952 length = len(_x)
01953 buff.write(struct.pack('<I%ss'%length, length, _x))
01954 buff.write(_struct_i.pack(val1.type))
01955 _v153 = val1.orientation
01956 _x = _v153
01957 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01958 _x = val1
01959 buff.write(_struct_4d.pack(_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight))
01960 length = len(self.goal_constraints.visibility_constraints)
01961 buff.write(_struct_I.pack(length))
01962 for val1 in self.goal_constraints.visibility_constraints:
01963 _v154 = val1.header
01964 buff.write(_struct_I.pack(_v154.seq))
01965 _v155 = _v154.stamp
01966 _x = _v155
01967 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01968 _x = _v154.frame_id
01969 length = len(_x)
01970 buff.write(struct.pack('<I%ss'%length, length, _x))
01971 _v156 = val1.target
01972 _v157 = _v156.header
01973 buff.write(_struct_I.pack(_v157.seq))
01974 _v158 = _v157.stamp
01975 _x = _v158
01976 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01977 _x = _v157.frame_id
01978 length = len(_x)
01979 buff.write(struct.pack('<I%ss'%length, length, _x))
01980 _v159 = _v156.point
01981 _x = _v159
01982 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01983 _v160 = val1.sensor_pose
01984 _v161 = _v160.header
01985 buff.write(_struct_I.pack(_v161.seq))
01986 _v162 = _v161.stamp
01987 _x = _v162
01988 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
01989 _x = _v161.frame_id
01990 length = len(_x)
01991 buff.write(struct.pack('<I%ss'%length, length, _x))
01992 _v163 = _v160.pose
01993 _v164 = _v163.position
01994 _x = _v164
01995 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
01996 _v165 = _v163.orientation
01997 _x = _v165
01998 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
01999 buff.write(_struct_d.pack(val1.absolute_tolerance))
02000 length = len(self.link_padding)
02001 buff.write(_struct_I.pack(length))
02002 for val1 in self.link_padding:
02003 _x = val1.link_name
02004 length = len(_x)
02005 buff.write(struct.pack('<I%ss'%length, length, _x))
02006 buff.write(_struct_d.pack(val1.padding))
02007 except struct.error, se: self._check_types(se)
02008 except TypeError, te: self._check_types(te)
02009
02010 def deserialize_numpy(self, str, numpy):
02011 """
02012 unpack serialized message in str into this message instance using numpy for array types
02013 @param str: byte array of serialized message
02014 @type str: str
02015 @param numpy: numpy python module
02016 @type numpy: module
02017 """
02018 try:
02019 if self.trajectory is None:
02020 self.trajectory = motion_planning_msgs.msg.RobotTrajectory()
02021 if self.robot_state is None:
02022 self.robot_state = motion_planning_msgs.msg.RobotState()
02023 if self.ordered_collision_operations is None:
02024 self.ordered_collision_operations = motion_planning_msgs.msg.OrderedCollisionOperations()
02025 if self.path_constraints is None:
02026 self.path_constraints = motion_planning_msgs.msg.Constraints()
02027 if self.goal_constraints is None:
02028 self.goal_constraints = motion_planning_msgs.msg.Constraints()
02029 end = 0
02030 _x = self
02031 start = end
02032 end += 12
02033 (_x.trajectory.joint_trajectory.header.seq, _x.trajectory.joint_trajectory.header.stamp.secs, _x.trajectory.joint_trajectory.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
02034 start = end
02035 end += 4
02036 (length,) = _struct_I.unpack(str[start:end])
02037 start = end
02038 end += length
02039 self.trajectory.joint_trajectory.header.frame_id = str[start:end]
02040 start = end
02041 end += 4
02042 (length,) = _struct_I.unpack(str[start:end])
02043 self.trajectory.joint_trajectory.joint_names = []
02044 for i in xrange(0, length):
02045 start = end
02046 end += 4
02047 (length,) = _struct_I.unpack(str[start:end])
02048 start = end
02049 end += length
02050 val1 = str[start:end]
02051 self.trajectory.joint_trajectory.joint_names.append(val1)
02052 start = end
02053 end += 4
02054 (length,) = _struct_I.unpack(str[start:end])
02055 self.trajectory.joint_trajectory.points = []
02056 for i in xrange(0, length):
02057 val1 = trajectory_msgs.msg.JointTrajectoryPoint()
02058 start = end
02059 end += 4
02060 (length,) = _struct_I.unpack(str[start:end])
02061 pattern = '<%sd'%length
02062 start = end
02063 end += struct.calcsize(pattern)
02064 val1.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
02065 start = end
02066 end += 4
02067 (length,) = _struct_I.unpack(str[start:end])
02068 pattern = '<%sd'%length
02069 start = end
02070 end += struct.calcsize(pattern)
02071 val1.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
02072 start = end
02073 end += 4
02074 (length,) = _struct_I.unpack(str[start:end])
02075 pattern = '<%sd'%length
02076 start = end
02077 end += struct.calcsize(pattern)
02078 val1.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
02079 _v166 = val1.time_from_start
02080 _x = _v166
02081 start = end
02082 end += 8
02083 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
02084 self.trajectory.joint_trajectory.points.append(val1)
02085 _x = self
02086 start = end
02087 end += 8
02088 (_x.trajectory.multi_dof_joint_trajectory.stamp.secs, _x.trajectory.multi_dof_joint_trajectory.stamp.nsecs,) = _struct_2i.unpack(str[start:end])
02089 start = end
02090 end += 4
02091 (length,) = _struct_I.unpack(str[start:end])
02092 self.trajectory.multi_dof_joint_trajectory.joint_names = []
02093 for i in xrange(0, length):
02094 start = end
02095 end += 4
02096 (length,) = _struct_I.unpack(str[start:end])
02097 start = end
02098 end += length
02099 val1 = str[start:end]
02100 self.trajectory.multi_dof_joint_trajectory.joint_names.append(val1)
02101 start = end
02102 end += 4
02103 (length,) = _struct_I.unpack(str[start:end])
02104 self.trajectory.multi_dof_joint_trajectory.frame_ids = []
02105 for i in xrange(0, length):
02106 start = end
02107 end += 4
02108 (length,) = _struct_I.unpack(str[start:end])
02109 start = end
02110 end += length
02111 val1 = str[start:end]
02112 self.trajectory.multi_dof_joint_trajectory.frame_ids.append(val1)
02113 start = end
02114 end += 4
02115 (length,) = _struct_I.unpack(str[start:end])
02116 self.trajectory.multi_dof_joint_trajectory.child_frame_ids = []
02117 for i in xrange(0, length):
02118 start = end
02119 end += 4
02120 (length,) = _struct_I.unpack(str[start:end])
02121 start = end
02122 end += length
02123 val1 = str[start:end]
02124 self.trajectory.multi_dof_joint_trajectory.child_frame_ids.append(val1)
02125 start = end
02126 end += 4
02127 (length,) = _struct_I.unpack(str[start:end])
02128 self.trajectory.multi_dof_joint_trajectory.points = []
02129 for i in xrange(0, length):
02130 val1 = motion_planning_msgs.msg.MultiDOFJointTrajectoryPoint()
02131 start = end
02132 end += 4
02133 (length,) = _struct_I.unpack(str[start:end])
02134 val1.poses = []
02135 for i in xrange(0, length):
02136 val2 = geometry_msgs.msg.Pose()
02137 _v167 = val2.position
02138 _x = _v167
02139 start = end
02140 end += 24
02141 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02142 _v168 = val2.orientation
02143 _x = _v168
02144 start = end
02145 end += 32
02146 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
02147 val1.poses.append(val2)
02148 _v169 = val1.time_from_start
02149 _x = _v169
02150 start = end
02151 end += 8
02152 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
02153 self.trajectory.multi_dof_joint_trajectory.points.append(val1)
02154 _x = self
02155 start = end
02156 end += 12
02157 (_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
02158 start = end
02159 end += 4
02160 (length,) = _struct_I.unpack(str[start:end])
02161 start = end
02162 end += length
02163 self.robot_state.joint_state.header.frame_id = str[start:end]
02164 start = end
02165 end += 4
02166 (length,) = _struct_I.unpack(str[start:end])
02167 self.robot_state.joint_state.name = []
02168 for i in xrange(0, length):
02169 start = end
02170 end += 4
02171 (length,) = _struct_I.unpack(str[start:end])
02172 start = end
02173 end += length
02174 val1 = str[start:end]
02175 self.robot_state.joint_state.name.append(val1)
02176 start = end
02177 end += 4
02178 (length,) = _struct_I.unpack(str[start:end])
02179 pattern = '<%sd'%length
02180 start = end
02181 end += struct.calcsize(pattern)
02182 self.robot_state.joint_state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
02183 start = end
02184 end += 4
02185 (length,) = _struct_I.unpack(str[start:end])
02186 pattern = '<%sd'%length
02187 start = end
02188 end += struct.calcsize(pattern)
02189 self.robot_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
02190 start = end
02191 end += 4
02192 (length,) = _struct_I.unpack(str[start:end])
02193 pattern = '<%sd'%length
02194 start = end
02195 end += struct.calcsize(pattern)
02196 self.robot_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
02197 _x = self
02198 start = end
02199 end += 8
02200 (_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
02201 start = end
02202 end += 4
02203 (length,) = _struct_I.unpack(str[start:end])
02204 self.robot_state.multi_dof_joint_state.joint_names = []
02205 for i in xrange(0, length):
02206 start = end
02207 end += 4
02208 (length,) = _struct_I.unpack(str[start:end])
02209 start = end
02210 end += length
02211 val1 = str[start:end]
02212 self.robot_state.multi_dof_joint_state.joint_names.append(val1)
02213 start = end
02214 end += 4
02215 (length,) = _struct_I.unpack(str[start:end])
02216 self.robot_state.multi_dof_joint_state.frame_ids = []
02217 for i in xrange(0, length):
02218 start = end
02219 end += 4
02220 (length,) = _struct_I.unpack(str[start:end])
02221 start = end
02222 end += length
02223 val1 = str[start:end]
02224 self.robot_state.multi_dof_joint_state.frame_ids.append(val1)
02225 start = end
02226 end += 4
02227 (length,) = _struct_I.unpack(str[start:end])
02228 self.robot_state.multi_dof_joint_state.child_frame_ids = []
02229 for i in xrange(0, length):
02230 start = end
02231 end += 4
02232 (length,) = _struct_I.unpack(str[start:end])
02233 start = end
02234 end += length
02235 val1 = str[start:end]
02236 self.robot_state.multi_dof_joint_state.child_frame_ids.append(val1)
02237 start = end
02238 end += 4
02239 (length,) = _struct_I.unpack(str[start:end])
02240 self.robot_state.multi_dof_joint_state.poses = []
02241 for i in xrange(0, length):
02242 val1 = geometry_msgs.msg.Pose()
02243 _v170 = val1.position
02244 _x = _v170
02245 start = end
02246 end += 24
02247 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02248 _v171 = val1.orientation
02249 _x = _v171
02250 start = end
02251 end += 32
02252 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
02253 self.robot_state.multi_dof_joint_state.poses.append(val1)
02254 _x = self
02255 start = end
02256 end += 5
02257 (_x.check_collisions, _x.check_path_constraints, _x.check_goal_constraints, _x.check_joint_limits, _x.check_full_trajectory,) = _struct_5B.unpack(str[start:end])
02258 self.check_collisions = bool(self.check_collisions)
02259 self.check_path_constraints = bool(self.check_path_constraints)
02260 self.check_goal_constraints = bool(self.check_goal_constraints)
02261 self.check_joint_limits = bool(self.check_joint_limits)
02262 self.check_full_trajectory = bool(self.check_full_trajectory)
02263 start = end
02264 end += 4
02265 (length,) = _struct_I.unpack(str[start:end])
02266 self.ordered_collision_operations.collision_operations = []
02267 for i in xrange(0, length):
02268 val1 = motion_planning_msgs.msg.CollisionOperation()
02269 start = end
02270 end += 4
02271 (length,) = _struct_I.unpack(str[start:end])
02272 start = end
02273 end += length
02274 val1.object1 = str[start:end]
02275 start = end
02276 end += 4
02277 (length,) = _struct_I.unpack(str[start:end])
02278 start = end
02279 end += length
02280 val1.object2 = str[start:end]
02281 _x = val1
02282 start = end
02283 end += 12
02284 (_x.penetration_distance, _x.operation,) = _struct_di.unpack(str[start:end])
02285 self.ordered_collision_operations.collision_operations.append(val1)
02286 start = end
02287 end += 4
02288 (length,) = _struct_I.unpack(str[start:end])
02289 self.allowed_contacts = []
02290 for i in xrange(0, length):
02291 val1 = motion_planning_msgs.msg.AllowedContactSpecification()
02292 start = end
02293 end += 4
02294 (length,) = _struct_I.unpack(str[start:end])
02295 start = end
02296 end += length
02297 val1.name = str[start:end]
02298 _v172 = val1.shape
02299 start = end
02300 end += 1
02301 (_v172.type,) = _struct_b.unpack(str[start:end])
02302 start = end
02303 end += 4
02304 (length,) = _struct_I.unpack(str[start:end])
02305 pattern = '<%sd'%length
02306 start = end
02307 end += struct.calcsize(pattern)
02308 _v172.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
02309 start = end
02310 end += 4
02311 (length,) = _struct_I.unpack(str[start:end])
02312 pattern = '<%si'%length
02313 start = end
02314 end += struct.calcsize(pattern)
02315 _v172.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
02316 start = end
02317 end += 4
02318 (length,) = _struct_I.unpack(str[start:end])
02319 _v172.vertices = []
02320 for i in xrange(0, length):
02321 val3 = geometry_msgs.msg.Point()
02322 _x = val3
02323 start = end
02324 end += 24
02325 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02326 _v172.vertices.append(val3)
02327 _v173 = val1.pose_stamped
02328 _v174 = _v173.header
02329 start = end
02330 end += 4
02331 (_v174.seq,) = _struct_I.unpack(str[start:end])
02332 _v175 = _v174.stamp
02333 _x = _v175
02334 start = end
02335 end += 8
02336 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02337 start = end
02338 end += 4
02339 (length,) = _struct_I.unpack(str[start:end])
02340 start = end
02341 end += length
02342 _v174.frame_id = str[start:end]
02343 _v176 = _v173.pose
02344 _v177 = _v176.position
02345 _x = _v177
02346 start = end
02347 end += 24
02348 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02349 _v178 = _v176.orientation
02350 _x = _v178
02351 start = end
02352 end += 32
02353 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
02354 start = end
02355 end += 4
02356 (length,) = _struct_I.unpack(str[start:end])
02357 val1.link_names = []
02358 for i in xrange(0, length):
02359 start = end
02360 end += 4
02361 (length,) = _struct_I.unpack(str[start:end])
02362 start = end
02363 end += length
02364 val2 = str[start:end]
02365 val1.link_names.append(val2)
02366 start = end
02367 end += 8
02368 (val1.penetration_depth,) = _struct_d.unpack(str[start:end])
02369 self.allowed_contacts.append(val1)
02370 start = end
02371 end += 4
02372 (length,) = _struct_I.unpack(str[start:end])
02373 self.path_constraints.joint_constraints = []
02374 for i in xrange(0, length):
02375 val1 = motion_planning_msgs.msg.JointConstraint()
02376 start = end
02377 end += 4
02378 (length,) = _struct_I.unpack(str[start:end])
02379 start = end
02380 end += length
02381 val1.joint_name = str[start:end]
02382 _x = val1
02383 start = end
02384 end += 32
02385 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _struct_4d.unpack(str[start:end])
02386 self.path_constraints.joint_constraints.append(val1)
02387 start = end
02388 end += 4
02389 (length,) = _struct_I.unpack(str[start:end])
02390 self.path_constraints.position_constraints = []
02391 for i in xrange(0, length):
02392 val1 = motion_planning_msgs.msg.PositionConstraint()
02393 _v179 = val1.header
02394 start = end
02395 end += 4
02396 (_v179.seq,) = _struct_I.unpack(str[start:end])
02397 _v180 = _v179.stamp
02398 _x = _v180
02399 start = end
02400 end += 8
02401 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02402 start = end
02403 end += 4
02404 (length,) = _struct_I.unpack(str[start:end])
02405 start = end
02406 end += length
02407 _v179.frame_id = str[start:end]
02408 start = end
02409 end += 4
02410 (length,) = _struct_I.unpack(str[start:end])
02411 start = end
02412 end += length
02413 val1.link_name = str[start:end]
02414 _v181 = val1.target_point_offset
02415 _x = _v181
02416 start = end
02417 end += 24
02418 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02419 _v182 = val1.position
02420 _x = _v182
02421 start = end
02422 end += 24
02423 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02424 _v183 = val1.constraint_region_shape
02425 start = end
02426 end += 1
02427 (_v183.type,) = _struct_b.unpack(str[start:end])
02428 start = end
02429 end += 4
02430 (length,) = _struct_I.unpack(str[start:end])
02431 pattern = '<%sd'%length
02432 start = end
02433 end += struct.calcsize(pattern)
02434 _v183.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
02435 start = end
02436 end += 4
02437 (length,) = _struct_I.unpack(str[start:end])
02438 pattern = '<%si'%length
02439 start = end
02440 end += struct.calcsize(pattern)
02441 _v183.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
02442 start = end
02443 end += 4
02444 (length,) = _struct_I.unpack(str[start:end])
02445 _v183.vertices = []
02446 for i in xrange(0, length):
02447 val3 = geometry_msgs.msg.Point()
02448 _x = val3
02449 start = end
02450 end += 24
02451 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02452 _v183.vertices.append(val3)
02453 _v184 = val1.constraint_region_orientation
02454 _x = _v184
02455 start = end
02456 end += 32
02457 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
02458 start = end
02459 end += 8
02460 (val1.weight,) = _struct_d.unpack(str[start:end])
02461 self.path_constraints.position_constraints.append(val1)
02462 start = end
02463 end += 4
02464 (length,) = _struct_I.unpack(str[start:end])
02465 self.path_constraints.orientation_constraints = []
02466 for i in xrange(0, length):
02467 val1 = motion_planning_msgs.msg.OrientationConstraint()
02468 _v185 = val1.header
02469 start = end
02470 end += 4
02471 (_v185.seq,) = _struct_I.unpack(str[start:end])
02472 _v186 = _v185.stamp
02473 _x = _v186
02474 start = end
02475 end += 8
02476 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02477 start = end
02478 end += 4
02479 (length,) = _struct_I.unpack(str[start:end])
02480 start = end
02481 end += length
02482 _v185.frame_id = str[start:end]
02483 start = end
02484 end += 4
02485 (length,) = _struct_I.unpack(str[start:end])
02486 start = end
02487 end += length
02488 val1.link_name = str[start:end]
02489 start = end
02490 end += 4
02491 (val1.type,) = _struct_i.unpack(str[start:end])
02492 _v187 = val1.orientation
02493 _x = _v187
02494 start = end
02495 end += 32
02496 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
02497 _x = val1
02498 start = end
02499 end += 32
02500 (_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight,) = _struct_4d.unpack(str[start:end])
02501 self.path_constraints.orientation_constraints.append(val1)
02502 start = end
02503 end += 4
02504 (length,) = _struct_I.unpack(str[start:end])
02505 self.path_constraints.visibility_constraints = []
02506 for i in xrange(0, length):
02507 val1 = motion_planning_msgs.msg.VisibilityConstraint()
02508 _v188 = val1.header
02509 start = end
02510 end += 4
02511 (_v188.seq,) = _struct_I.unpack(str[start:end])
02512 _v189 = _v188.stamp
02513 _x = _v189
02514 start = end
02515 end += 8
02516 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02517 start = end
02518 end += 4
02519 (length,) = _struct_I.unpack(str[start:end])
02520 start = end
02521 end += length
02522 _v188.frame_id = str[start:end]
02523 _v190 = val1.target
02524 _v191 = _v190.header
02525 start = end
02526 end += 4
02527 (_v191.seq,) = _struct_I.unpack(str[start:end])
02528 _v192 = _v191.stamp
02529 _x = _v192
02530 start = end
02531 end += 8
02532 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02533 start = end
02534 end += 4
02535 (length,) = _struct_I.unpack(str[start:end])
02536 start = end
02537 end += length
02538 _v191.frame_id = str[start:end]
02539 _v193 = _v190.point
02540 _x = _v193
02541 start = end
02542 end += 24
02543 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02544 _v194 = val1.sensor_pose
02545 _v195 = _v194.header
02546 start = end
02547 end += 4
02548 (_v195.seq,) = _struct_I.unpack(str[start:end])
02549 _v196 = _v195.stamp
02550 _x = _v196
02551 start = end
02552 end += 8
02553 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02554 start = end
02555 end += 4
02556 (length,) = _struct_I.unpack(str[start:end])
02557 start = end
02558 end += length
02559 _v195.frame_id = str[start:end]
02560 _v197 = _v194.pose
02561 _v198 = _v197.position
02562 _x = _v198
02563 start = end
02564 end += 24
02565 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02566 _v199 = _v197.orientation
02567 _x = _v199
02568 start = end
02569 end += 32
02570 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
02571 start = end
02572 end += 8
02573 (val1.absolute_tolerance,) = _struct_d.unpack(str[start:end])
02574 self.path_constraints.visibility_constraints.append(val1)
02575 start = end
02576 end += 4
02577 (length,) = _struct_I.unpack(str[start:end])
02578 self.goal_constraints.joint_constraints = []
02579 for i in xrange(0, length):
02580 val1 = motion_planning_msgs.msg.JointConstraint()
02581 start = end
02582 end += 4
02583 (length,) = _struct_I.unpack(str[start:end])
02584 start = end
02585 end += length
02586 val1.joint_name = str[start:end]
02587 _x = val1
02588 start = end
02589 end += 32
02590 (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _struct_4d.unpack(str[start:end])
02591 self.goal_constraints.joint_constraints.append(val1)
02592 start = end
02593 end += 4
02594 (length,) = _struct_I.unpack(str[start:end])
02595 self.goal_constraints.position_constraints = []
02596 for i in xrange(0, length):
02597 val1 = motion_planning_msgs.msg.PositionConstraint()
02598 _v200 = val1.header
02599 start = end
02600 end += 4
02601 (_v200.seq,) = _struct_I.unpack(str[start:end])
02602 _v201 = _v200.stamp
02603 _x = _v201
02604 start = end
02605 end += 8
02606 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02607 start = end
02608 end += 4
02609 (length,) = _struct_I.unpack(str[start:end])
02610 start = end
02611 end += length
02612 _v200.frame_id = str[start:end]
02613 start = end
02614 end += 4
02615 (length,) = _struct_I.unpack(str[start:end])
02616 start = end
02617 end += length
02618 val1.link_name = str[start:end]
02619 _v202 = val1.target_point_offset
02620 _x = _v202
02621 start = end
02622 end += 24
02623 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02624 _v203 = val1.position
02625 _x = _v203
02626 start = end
02627 end += 24
02628 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02629 _v204 = val1.constraint_region_shape
02630 start = end
02631 end += 1
02632 (_v204.type,) = _struct_b.unpack(str[start:end])
02633 start = end
02634 end += 4
02635 (length,) = _struct_I.unpack(str[start:end])
02636 pattern = '<%sd'%length
02637 start = end
02638 end += struct.calcsize(pattern)
02639 _v204.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
02640 start = end
02641 end += 4
02642 (length,) = _struct_I.unpack(str[start:end])
02643 pattern = '<%si'%length
02644 start = end
02645 end += struct.calcsize(pattern)
02646 _v204.triangles = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
02647 start = end
02648 end += 4
02649 (length,) = _struct_I.unpack(str[start:end])
02650 _v204.vertices = []
02651 for i in xrange(0, length):
02652 val3 = geometry_msgs.msg.Point()
02653 _x = val3
02654 start = end
02655 end += 24
02656 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02657 _v204.vertices.append(val3)
02658 _v205 = val1.constraint_region_orientation
02659 _x = _v205
02660 start = end
02661 end += 32
02662 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
02663 start = end
02664 end += 8
02665 (val1.weight,) = _struct_d.unpack(str[start:end])
02666 self.goal_constraints.position_constraints.append(val1)
02667 start = end
02668 end += 4
02669 (length,) = _struct_I.unpack(str[start:end])
02670 self.goal_constraints.orientation_constraints = []
02671 for i in xrange(0, length):
02672 val1 = motion_planning_msgs.msg.OrientationConstraint()
02673 _v206 = val1.header
02674 start = end
02675 end += 4
02676 (_v206.seq,) = _struct_I.unpack(str[start:end])
02677 _v207 = _v206.stamp
02678 _x = _v207
02679 start = end
02680 end += 8
02681 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02682 start = end
02683 end += 4
02684 (length,) = _struct_I.unpack(str[start:end])
02685 start = end
02686 end += length
02687 _v206.frame_id = str[start:end]
02688 start = end
02689 end += 4
02690 (length,) = _struct_I.unpack(str[start:end])
02691 start = end
02692 end += length
02693 val1.link_name = str[start:end]
02694 start = end
02695 end += 4
02696 (val1.type,) = _struct_i.unpack(str[start:end])
02697 _v208 = val1.orientation
02698 _x = _v208
02699 start = end
02700 end += 32
02701 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
02702 _x = val1
02703 start = end
02704 end += 32
02705 (_x.absolute_roll_tolerance, _x.absolute_pitch_tolerance, _x.absolute_yaw_tolerance, _x.weight,) = _struct_4d.unpack(str[start:end])
02706 self.goal_constraints.orientation_constraints.append(val1)
02707 start = end
02708 end += 4
02709 (length,) = _struct_I.unpack(str[start:end])
02710 self.goal_constraints.visibility_constraints = []
02711 for i in xrange(0, length):
02712 val1 = motion_planning_msgs.msg.VisibilityConstraint()
02713 _v209 = val1.header
02714 start = end
02715 end += 4
02716 (_v209.seq,) = _struct_I.unpack(str[start:end])
02717 _v210 = _v209.stamp
02718 _x = _v210
02719 start = end
02720 end += 8
02721 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02722 start = end
02723 end += 4
02724 (length,) = _struct_I.unpack(str[start:end])
02725 start = end
02726 end += length
02727 _v209.frame_id = str[start:end]
02728 _v211 = val1.target
02729 _v212 = _v211.header
02730 start = end
02731 end += 4
02732 (_v212.seq,) = _struct_I.unpack(str[start:end])
02733 _v213 = _v212.stamp
02734 _x = _v213
02735 start = end
02736 end += 8
02737 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02738 start = end
02739 end += 4
02740 (length,) = _struct_I.unpack(str[start:end])
02741 start = end
02742 end += length
02743 _v212.frame_id = str[start:end]
02744 _v214 = _v211.point
02745 _x = _v214
02746 start = end
02747 end += 24
02748 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02749 _v215 = val1.sensor_pose
02750 _v216 = _v215.header
02751 start = end
02752 end += 4
02753 (_v216.seq,) = _struct_I.unpack(str[start:end])
02754 _v217 = _v216.stamp
02755 _x = _v217
02756 start = end
02757 end += 8
02758 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
02759 start = end
02760 end += 4
02761 (length,) = _struct_I.unpack(str[start:end])
02762 start = end
02763 end += length
02764 _v216.frame_id = str[start:end]
02765 _v218 = _v215.pose
02766 _v219 = _v218.position
02767 _x = _v219
02768 start = end
02769 end += 24
02770 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
02771 _v220 = _v218.orientation
02772 _x = _v220
02773 start = end
02774 end += 32
02775 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
02776 start = end
02777 end += 8
02778 (val1.absolute_tolerance,) = _struct_d.unpack(str[start:end])
02779 self.goal_constraints.visibility_constraints.append(val1)
02780 start = end
02781 end += 4
02782 (length,) = _struct_I.unpack(str[start:end])
02783 self.link_padding = []
02784 for i in xrange(0, length):
02785 val1 = motion_planning_msgs.msg.LinkPadding()
02786 start = end
02787 end += 4
02788 (length,) = _struct_I.unpack(str[start:end])
02789 start = end
02790 end += length
02791 val1.link_name = str[start:end]
02792 start = end
02793 end += 8
02794 (val1.padding,) = _struct_d.unpack(str[start:end])
02795 self.link_padding.append(val1)
02796 return self
02797 except struct.error, e:
02798 raise roslib.message.DeserializationError(e)
02799
02800 _struct_I = roslib.message.struct_I
02801 _struct_b = struct.Struct("<b")
02802 _struct_d = struct.Struct("<d")
02803 _struct_di = struct.Struct("<di")
02804 _struct_2I = struct.Struct("<2I")
02805 _struct_i = struct.Struct("<i")
02806 _struct_3I = struct.Struct("<3I")
02807 _struct_4d = struct.Struct("<4d")
02808 _struct_3d = struct.Struct("<3d")
02809 _struct_2i = struct.Struct("<2i")
02810 _struct_5B = struct.Struct("<5B")
02811 """autogenerated by genmsg_py from GetRobotTrajectoryValidityResponse.msg. Do not edit."""
02812 import roslib.message
02813 import struct
02814
02815 import motion_planning_msgs.msg
02816
02817 class GetRobotTrajectoryValidityResponse(roslib.message.Message):
02818 _md5sum = "6316c11e993d068a87f32bc2109e7658"
02819 _type = "planning_environment_msgs/GetRobotTrajectoryValidityResponse"
02820 _has_header = False
02821 _full_text = """
02822
02823
02824
02825 motion_planning_msgs/ArmNavigationErrorCodes error_code
02826
02827
02828
02829
02830 motion_planning_msgs/ArmNavigationErrorCodes[] trajectory_error_codes
02831
02832
02833 ================================================================================
02834 MSG: motion_planning_msgs/ArmNavigationErrorCodes
02835 int32 val
02836
02837 # overall behavior
02838 int32 PLANNING_FAILED=-1
02839 int32 SUCCESS=1
02840 int32 TIMED_OUT=-2
02841
02842 # start state errors
02843 int32 START_STATE_IN_COLLISION=-3
02844 int32 START_STATE_VIOLATES_PATH_CONSTRAINTS=-4
02845
02846 # goal errors
02847 int32 GOAL_IN_COLLISION=-5
02848 int32 GOAL_VIOLATES_PATH_CONSTRAINTS=-6
02849
02850 # robot state
02851 int32 INVALID_ROBOT_STATE=-7
02852 int32 INCOMPLETE_ROBOT_STATE=-8
02853
02854 # planning request errors
02855 int32 INVALID_PLANNER_ID=-9
02856 int32 INVALID_NUM_PLANNING_ATTEMPTS=-10
02857 int32 INVALID_ALLOWED_PLANNING_TIME=-11
02858 int32 INVALID_GROUP_NAME=-12
02859 int32 INVALID_GOAL_JOINT_CONSTRAINTS=-13
02860 int32 INVALID_GOAL_POSITION_CONSTRAINTS=-14
02861 int32 INVALID_GOAL_ORIENTATION_CONSTRAINTS=-15
02862 int32 INVALID_PATH_JOINT_CONSTRAINTS=-16
02863 int32 INVALID_PATH_POSITION_CONSTRAINTS=-17
02864 int32 INVALID_PATH_ORIENTATION_CONSTRAINTS=-18
02865
02866 # state/trajectory monitor errors
02867 int32 INVALID_TRAJECTORY=-19
02868 int32 INVALID_INDEX=-20
02869 int32 JOINT_LIMITS_VIOLATED=-21
02870 int32 PATH_CONSTRAINTS_VIOLATED=-22
02871 int32 COLLISION_CONSTRAINTS_VIOLATED=-23
02872 int32 GOAL_CONSTRAINTS_VIOLATED=-24
02873 int32 JOINTS_NOT_MOVING=-25
02874 int32 TRAJECTORY_CONTROLLER_FAILED=-26
02875
02876 # system errors
02877 int32 FRAME_TRANSFORM_FAILURE=-27
02878 int32 COLLISION_CHECKING_UNAVAILABLE=-28
02879 int32 ROBOT_STATE_STALE=-29
02880 int32 SENSOR_INFO_STALE=-30
02881
02882 # kinematics errors
02883 int32 NO_IK_SOLUTION=-31
02884 int32 INVALID_LINK_NAME=-32
02885 int32 IK_LINK_IN_COLLISION=-33
02886 int32 NO_FK_SOLUTION=-34
02887 int32 KINEMATICS_STATE_IN_COLLISION=-35
02888
02889 # general errors
02890 int32 INVALID_TIMEOUT=-36
02891
02892
02893 """
02894 __slots__ = ['error_code','trajectory_error_codes']
02895 _slot_types = ['motion_planning_msgs/ArmNavigationErrorCodes','motion_planning_msgs/ArmNavigationErrorCodes[]']
02896
02897 def __init__(self, *args, **kwds):
02898 """
02899 Constructor. Any message fields that are implicitly/explicitly
02900 set to None will be assigned a default value. The recommend
02901 use is keyword arguments as this is more robust to future message
02902 changes. You cannot mix in-order arguments and keyword arguments.
02903
02904 The available fields are:
02905 error_code,trajectory_error_codes
02906
02907 @param args: complete set of field values, in .msg order
02908 @param kwds: use keyword arguments corresponding to message field names
02909 to set specific fields.
02910 """
02911 if args or kwds:
02912 super(GetRobotTrajectoryValidityResponse, self).__init__(*args, **kwds)
02913
02914 if self.error_code is None:
02915 self.error_code = motion_planning_msgs.msg.ArmNavigationErrorCodes()
02916 if self.trajectory_error_codes is None:
02917 self.trajectory_error_codes = []
02918 else:
02919 self.error_code = motion_planning_msgs.msg.ArmNavigationErrorCodes()
02920 self.trajectory_error_codes = []
02921
02922 def _get_types(self):
02923 """
02924 internal API method
02925 """
02926 return self._slot_types
02927
02928 def serialize(self, buff):
02929 """
02930 serialize message into buffer
02931 @param buff: buffer
02932 @type buff: StringIO
02933 """
02934 try:
02935 buff.write(_struct_i.pack(self.error_code.val))
02936 length = len(self.trajectory_error_codes)
02937 buff.write(_struct_I.pack(length))
02938 for val1 in self.trajectory_error_codes:
02939 buff.write(_struct_i.pack(val1.val))
02940 except struct.error, se: self._check_types(se)
02941 except TypeError, te: self._check_types(te)
02942
02943 def deserialize(self, str):
02944 """
02945 unpack serialized message in str into this message instance
02946 @param str: byte array of serialized message
02947 @type str: str
02948 """
02949 try:
02950 if self.error_code is None:
02951 self.error_code = motion_planning_msgs.msg.ArmNavigationErrorCodes()
02952 end = 0
02953 start = end
02954 end += 4
02955 (self.error_code.val,) = _struct_i.unpack(str[start:end])
02956 start = end
02957 end += 4
02958 (length,) = _struct_I.unpack(str[start:end])
02959 self.trajectory_error_codes = []
02960 for i in xrange(0, length):
02961 val1 = motion_planning_msgs.msg.ArmNavigationErrorCodes()
02962 start = end
02963 end += 4
02964 (val1.val,) = _struct_i.unpack(str[start:end])
02965 self.trajectory_error_codes.append(val1)
02966 return self
02967 except struct.error, e:
02968 raise roslib.message.DeserializationError(e)
02969
02970
02971 def serialize_numpy(self, buff, numpy):
02972 """
02973 serialize message with numpy array types into buffer
02974 @param buff: buffer
02975 @type buff: StringIO
02976 @param numpy: numpy python module
02977 @type numpy module
02978 """
02979 try:
02980 buff.write(_struct_i.pack(self.error_code.val))
02981 length = len(self.trajectory_error_codes)
02982 buff.write(_struct_I.pack(length))
02983 for val1 in self.trajectory_error_codes:
02984 buff.write(_struct_i.pack(val1.val))
02985 except struct.error, se: self._check_types(se)
02986 except TypeError, te: self._check_types(te)
02987
02988 def deserialize_numpy(self, str, numpy):
02989 """
02990 unpack serialized message in str into this message instance using numpy for array types
02991 @param str: byte array of serialized message
02992 @type str: str
02993 @param numpy: numpy python module
02994 @type numpy: module
02995 """
02996 try:
02997 if self.error_code is None:
02998 self.error_code = motion_planning_msgs.msg.ArmNavigationErrorCodes()
02999 end = 0
03000 start = end
03001 end += 4
03002 (self.error_code.val,) = _struct_i.unpack(str[start:end])
03003 start = end
03004 end += 4
03005 (length,) = _struct_I.unpack(str[start:end])
03006 self.trajectory_error_codes = []
03007 for i in xrange(0, length):
03008 val1 = motion_planning_msgs.msg.ArmNavigationErrorCodes()
03009 start = end
03010 end += 4
03011 (val1.val,) = _struct_i.unpack(str[start:end])
03012 self.trajectory_error_codes.append(val1)
03013 return self
03014 except struct.error, e:
03015 raise roslib.message.DeserializationError(e)
03016
03017 _struct_I = roslib.message.struct_I
03018 _struct_i = struct.Struct("<i")
03019 class GetRobotTrajectoryValidity(roslib.message.ServiceDefinition):
03020 _type = 'planning_environment_msgs/GetRobotTrajectoryValidity'
03021 _md5sum = '5082255c931398177ed293899fa77288'
03022 _request_class = GetRobotTrajectoryValidityRequest
03023 _response_class = GetRobotTrajectoryValidityResponse