# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from moveit_msgs/MotionSequenceRequest.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct

import genpy
import geometry_msgs.msg
import moveit_msgs.msg
import object_recognition_msgs.msg
import sensor_msgs.msg
import shape_msgs.msg
import std_msgs.msg
import trajectory_msgs.msg

class MotionSequenceRequest(genpy.Message):
  _md5sum = "c89266756409bea218f39a7f05ef21a1"
  _type = "moveit_msgs/MotionSequenceRequest"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """# List of motion planning request with a blend_radius for each.
# In the response of the planner all of these will be executable as one sequence.
MotionSequenceItem[] items

================================================================================
MSG: moveit_msgs/MotionSequenceItem
# The plan request for this item.
# It is the planning request for this segment of the sequence, as if it were a solitary motion.
MotionPlanRequest req

# To blend between sequence items, the motion may be smoothed using a circular motion.
# The blend radius of the circle between this and the next command, where 0 means no blending.
float64 blend_radius

================================================================================
MSG: moveit_msgs/MotionPlanRequest
# This service contains the definition for a request to the motion
# planner and the output it provides

# Parameters for the workspace that the planner should work inside
WorkspaceParameters workspace_parameters

# Starting state updates. If certain joints should be considered
# at positions other than the current ones, these positions should
# be set here
RobotState start_state

# The possible goal states for the model to plan for. Each element of
# the array defines a goal region. The goal is achieved
# if the constraints for a particular region are satisfied
Constraints[] goal_constraints

# No state at any point along the path in the produced motion plan will violate these constraints (this applies to all points, not just waypoints)
Constraints path_constraints

# The constraints the resulting trajectory must satisfy
TrajectoryConstraints trajectory_constraints

# The name of the motion planner to use. If no name is specified,
# a default motion planner will be used
string planner_id

# The name of the group of joints on which this planner is operating
string group_name

# The number of times this plan is to be computed. Shortest solution
# will be reported.
int32 num_planning_attempts

# The maximum amount of time the motion planner is allowed to plan for (in seconds)
float64 allowed_planning_time

# Scaling factors for optionally reducing the maximum joint velocities and
# accelerations.  Allowed values are in (0,1].  The maximum joint velocity and
# acceleration specified in the robot model are multiplied by thier respective
# factors.  If either are outside their valid ranges (importantly, this
# includes being set to 0.0), the factor is set to the default value of 1.0
# internally (i.e., maximum joint velocity or maximum joint acceleration).
float64 max_velocity_scaling_factor
float64 max_acceleration_scaling_factor


================================================================================
MSG: moveit_msgs/WorkspaceParameters
# This message contains a set of parameters useful in
# setting up the volume (a box) in which the robot is allowed to move.
# This is useful only when planning for mobile parts of 
# the robot as well.

# Define the frame of reference for the box corners
Header header

# The minumum corner of the box, with respect to the robot starting pose
geometry_msgs/Vector3 min_corner

# The maximum corner of the box, with respect to the robot starting pose
geometry_msgs/Vector3 max_corner

================================================================================
MSG: std_msgs/Header
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data 
# in a particular coordinate frame.
# 
# sequence ID: consecutively increasing ID 
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
string frame_id

================================================================================
MSG: geometry_msgs/Vector3
# This represents a vector in free space. 
# It is only meant to represent a direction. Therefore, it does not
# make sense to apply a translation to it (e.g., when applying a 
# generic rigid transformation to a Vector3, tf2 will only apply the
# rotation). If you want your data to be translatable too, use the
# geometry_msgs/Point message instead.

float64 x
float64 y
float64 z
================================================================================
MSG: moveit_msgs/RobotState
# This message contains information about the robot state, i.e. the positions of its joints and links
sensor_msgs/JointState joint_state

# Joints that may have multiple DOF are specified here
sensor_msgs/MultiDOFJointState multi_dof_joint_state

# Attached collision objects (attached to some link on the robot)
AttachedCollisionObject[] attached_collision_objects

# Flag indicating whether this scene is to be interpreted as a diff with respect to some other scene
# This is mostly important for handling the attached bodies (whether or not to clear the attached bodies
# of a moveit::core::RobotState before updating it with this message)
bool is_diff

================================================================================
MSG: sensor_msgs/JointState
# This is a message that holds data to describe the state of a set of torque controlled joints. 
#
# The state of each joint (revolute or prismatic) is defined by:
#  * the position of the joint (rad or m),
#  * the velocity of the joint (rad/s or m/s) and 
#  * the effort that is applied in the joint (Nm or N).
#
# Each joint is uniquely identified by its name
# The header specifies the time at which the joint states were recorded. All the joint states
# in one message have to be recorded at the same time.
#
# This message consists of a multiple arrays, one for each part of the joint state. 
# The goal is to make each of the fields optional. When e.g. your joints have no
# effort associated with them, you can leave the effort array empty. 
#
# All arrays in this message should have the same size, or be empty.
# This is the only way to uniquely associate the joint name with the correct
# states.


Header header

string[] name
float64[] position
float64[] velocity
float64[] effort

================================================================================
MSG: sensor_msgs/MultiDOFJointState
# Representation of state for joints with multiple degrees of freedom, 
# following the structure of JointState.
#
# It is assumed that a joint in a system corresponds to a transform that gets applied 
# along the kinematic chain. For example, a planar joint (as in URDF) is 3DOF (x, y, yaw)
# and those 3DOF can be expressed as a transformation matrix, and that transformation
# matrix can be converted back to (x, y, yaw)
#
# Each joint is uniquely identified by its name
# The header specifies the time at which the joint states were recorded. All the joint states
# in one message have to be recorded at the same time.
#
# This message consists of a multiple arrays, one for each part of the joint state. 
# The goal is to make each of the fields optional. When e.g. your joints have no
# wrench associated with them, you can leave the wrench array empty. 
#
# All arrays in this message should have the same size, or be empty.
# This is the only way to uniquely associate the joint name with the correct
# states.

Header header

string[] joint_names
geometry_msgs/Transform[] transforms
geometry_msgs/Twist[] twist
geometry_msgs/Wrench[] wrench

================================================================================
MSG: geometry_msgs/Transform
# This represents the transform between two coordinate frames in free space.

Vector3 translation
Quaternion rotation

================================================================================
MSG: geometry_msgs/Quaternion
# This represents an orientation in free space in quaternion form.

float64 x
float64 y
float64 z
float64 w

================================================================================
MSG: geometry_msgs/Twist
# This expresses velocity in free space broken into its linear and angular parts.
Vector3  linear
Vector3  angular

================================================================================
MSG: geometry_msgs/Wrench
# This represents force in free space, separated into
# its linear and angular parts.
Vector3  force
Vector3  torque

================================================================================
MSG: moveit_msgs/AttachedCollisionObject
# The CollisionObject will be attached with a fixed joint to this link
string link_name

#This contains the actual shapes and poses for the CollisionObject
#to be attached to the link
#If action is remove and no object.id is set, all objects
#attached to the link indicated by link_name will be removed
CollisionObject object

# The set of links that the attached objects are allowed to touch
# by default - the link_name is already considered by default
string[] touch_links

# If certain links were placed in a particular posture for this object to remain attached 
# (e.g., an end effector closing around an object), the posture necessary for releasing
# the object is stored here
trajectory_msgs/JointTrajectory detach_posture

# The weight of the attached object, if known
float64 weight

================================================================================
MSG: moveit_msgs/CollisionObject
# A header, used for interpreting the poses
Header header

# The id of the object (name used in MoveIt)
string id

# The object type in a database of known objects
object_recognition_msgs/ObjectType type

# The collision geometries associated with the object.
# Their poses are with respect to the specified header

# Solid geometric primitives
shape_msgs/SolidPrimitive[] primitives
geometry_msgs/Pose[] primitive_poses

# Meshes
shape_msgs/Mesh[] meshes
geometry_msgs/Pose[] mesh_poses

# Bounding planes (equation is specified, but the plane can be oriented using an additional pose)
shape_msgs/Plane[] planes
geometry_msgs/Pose[] plane_poses

# Adds the object to the planning scene. If the object previously existed, it is replaced.
byte ADD=0

# Removes the object from the environment entirely (everything that matches the specified id)
byte REMOVE=1

# Append to an object that already exists in the planning scene. If the object does not exist, it is added.
byte APPEND=2

# If an object already exists in the scene, new poses can be sent (the geometry arrays must be left empty)
# if solely moving the object is desired
byte MOVE=3

# Operation to be performed
byte operation

================================================================================
MSG: object_recognition_msgs/ObjectType
################################################## OBJECT ID #########################################################

# Contains information about the type of a found object. Those two sets of parameters together uniquely define an
# object

# The key of the found object: the unique identifier in the given db
string key

# The db parameters stored as a JSON/compressed YAML string. An object id does not make sense without the corresponding
# database. E.g., in object_recognition, it can look like: "{'type':'CouchDB', 'root':'http://localhost'}"
# There is no conventional format for those parameters and it's nice to keep that flexibility.
# The object_recognition_core as a generic DB type that can read those fields
# Current examples:
# For CouchDB:
#   type: 'CouchDB'
#   root: 'http://localhost:5984'
#   collection: 'object_recognition'
# For SQL household database:
#   type: 'SqlHousehold'
#   host: 'wgs36'
#   port: 5432
#   user: 'willow'
#   password: 'willow'
#   name: 'household_objects'
#   module: 'tabletop'
string db

================================================================================
MSG: shape_msgs/SolidPrimitive
# Define box, sphere, cylinder, cone 
# All shapes are defined to have their bounding boxes centered around 0,0,0.

uint8 BOX=1
uint8 SPHERE=2
uint8 CYLINDER=3
uint8 CONE=4

# The type of the shape
uint8 type


# The dimensions of the shape
float64[] dimensions

# The meaning of the shape dimensions: each constant defines the index in the 'dimensions' array

# For the BOX type, the X, Y, and Z dimensions are the length of the corresponding
# sides of the box.
uint8 BOX_X=0
uint8 BOX_Y=1
uint8 BOX_Z=2


# For the SPHERE type, only one component is used, and it gives the radius of
# the sphere.
uint8 SPHERE_RADIUS=0


# For the CYLINDER and CONE types, the center line is oriented along
# the Z axis.  Therefore the CYLINDER_HEIGHT (CONE_HEIGHT) component
# of dimensions gives the height of the cylinder (cone).  The
# CYLINDER_RADIUS (CONE_RADIUS) component of dimensions gives the
# radius of the base of the cylinder (cone).  Cone and cylinder
# primitives are defined to be circular. The tip of the cone is
# pointing up, along +Z axis.

uint8 CYLINDER_HEIGHT=0
uint8 CYLINDER_RADIUS=1

uint8 CONE_HEIGHT=0
uint8 CONE_RADIUS=1

================================================================================
MSG: geometry_msgs/Pose
# A representation of pose in free space, composed of position and orientation. 
Point position
Quaternion orientation

================================================================================
MSG: geometry_msgs/Point
# This contains the position of a point in free space
float64 x
float64 y
float64 z

================================================================================
MSG: shape_msgs/Mesh
# Definition of a mesh

# list of triangles; the index values refer to positions in vertices[]
MeshTriangle[] triangles

# the actual vertices that make up the mesh
geometry_msgs/Point[] vertices

================================================================================
MSG: shape_msgs/MeshTriangle
# Definition of a triangle's vertices
uint32[3] vertex_indices

================================================================================
MSG: shape_msgs/Plane
# Representation of a plane, using the plane equation ax + by + cz + d = 0

# a := coef[0]
# b := coef[1]
# c := coef[2]
# d := coef[3]

float64[4] coef

================================================================================
MSG: trajectory_msgs/JointTrajectory
Header header
string[] joint_names
JointTrajectoryPoint[] points

================================================================================
MSG: trajectory_msgs/JointTrajectoryPoint
# Each trajectory point specifies either positions[, velocities[, accelerations]]
# or positions[, effort] for the trajectory to be executed.
# All specified values are in the same order as the joint names in JointTrajectory.msg

float64[] positions
float64[] velocities
float64[] accelerations
float64[] effort
duration time_from_start

================================================================================
MSG: moveit_msgs/Constraints
# This message contains a list of motion planning constraints.
# All constraints must be satisfied for a goal to be considered valid

string name

JointConstraint[] joint_constraints

PositionConstraint[] position_constraints

OrientationConstraint[] orientation_constraints

VisibilityConstraint[] visibility_constraints

================================================================================
MSG: moveit_msgs/JointConstraint
# Constrain the position of a joint to be within a certain bound
string joint_name

# the bound to be achieved is [position - tolerance_below, position + tolerance_above]
float64 position
float64 tolerance_above
float64 tolerance_below

# A weighting factor for this constraint (denotes relative importance to other constraints. Closer to zero means less important)
float64 weight
================================================================================
MSG: moveit_msgs/PositionConstraint
# This message contains the definition of a position constraint.

Header header

# The robot link this constraint refers to
string link_name

# The offset (in the link frame) for the target point on the link we are planning for
geometry_msgs/Vector3 target_point_offset

# The volume this constraint refers to 
BoundingVolume constraint_region

# A weighting factor for this constraint (denotes relative importance to other constraints. Closer to zero means less important)
float64 weight

================================================================================
MSG: moveit_msgs/BoundingVolume
# Define a volume in 3D

# A set of solid geometric primitives that make up the volume to define (as a union)
shape_msgs/SolidPrimitive[] primitives

# The poses at which the primitives are located
geometry_msgs/Pose[] primitive_poses

# In addition to primitives, meshes can be specified to add to the bounding volume (again, as union)
shape_msgs/Mesh[] meshes

# The poses at which the meshes are located
geometry_msgs/Pose[] mesh_poses

================================================================================
MSG: moveit_msgs/OrientationConstraint
# This message contains the definition of an orientation constraint.

Header header

# The desired orientation of the robot link specified as a quaternion
geometry_msgs/Quaternion orientation

# The robot link this constraint refers to
string link_name

# optional axis-angle error tolerances specified
float64 absolute_x_axis_tolerance
float64 absolute_y_axis_tolerance
float64 absolute_z_axis_tolerance

# A weighting factor for this constraint (denotes relative importance to other constraints. Closer to zero means less important)
float64 weight

================================================================================
MSG: moveit_msgs/VisibilityConstraint
# The constraint is useful to maintain visibility to a disc (the target) in a particular frame.
# This disc forms the base of a visibiliy cone whose tip is at the origin of the sensor.
# Maintaining visibility is done by ensuring the robot does not obstruct the visibility cone.
# Note:
# This constraint does NOT enforce minimum or maximum distances between the sensor
# and the target, nor does it enforce the target to be in the field of view of
# the sensor. A PositionConstraint can (and probably should) be used for such purposes.

# The radius of the disc that should be maintained visible 
float64 target_radius

# The pose of the disc; as the robot moves, the pose of the disc may change as well
# This can be in the frame of a particular robot link, for example
geometry_msgs/PoseStamped target_pose

# From the sensor origin towards the target, the disc forms a visibility cone
# This cone is approximated using many sides. For example, when using 4 sides, 
# that in fact makes the visibility region be a pyramid.
# This value should always be 3 or more.
int32 cone_sides

# The pose in which visibility is to be maintained.
# The frame id should represent the robot link to which the sensor is attached.
# It is assumed the sensor can look directly at the target, in any direction.
# This assumption is usually not true, but additional PositionConstraints
# can resolve this issue.
geometry_msgs/PoseStamped sensor_pose

# Even though the disc is maintained visible, the visibility cone can be very small
# because of the orientation of the disc with respect to the sensor. It is possible
# for example to view the disk almost from a side, in which case the visibility cone 
# can end up having close to 0 volume. The view angle is defined to be the angle between
# the normal to the visibility disc and the direction vector from the sensor origin.
# The value below represents the minimum desired view angle. For a perfect view,
# this value will be 0 (the two vectors are exact opposites). For a completely obstructed view
# this value will be Pi/2 (the vectors are perpendicular). This value defined below 
# is the maximum view angle to be maintained. This should be a value in the open interval
# (0, Pi/2). If 0 is set, the view angle is NOT enforced.
float64 max_view_angle

# This angle is used similarly to max_view_angle but limits the maximum angle
# between the sensor origin direction vector and the axis that connects the
# sensor origin to the target frame origin. The value is again in the range (0, Pi/2)
# and is NOT enforced if set to 0.
float64 max_range_angle

# The axis that is assumed to indicate the direction of view for the sensor
# X = 2, Y = 1, Z = 0
uint8 SENSOR_Z=0
uint8 SENSOR_Y=1
uint8 SENSOR_X=2
uint8 sensor_view_direction

# A weighting factor for this constraint (denotes relative importance to other constraints. Closer to zero means less important)
float64 weight

================================================================================
MSG: geometry_msgs/PoseStamped
# A Pose with reference coordinate frame and timestamp
Header header
Pose pose

================================================================================
MSG: moveit_msgs/TrajectoryConstraints
# The array of constraints to consider along the trajectory
Constraints[] constraints
"""
  __slots__ = ['items']
  _slot_types = ['moveit_msgs/MotionSequenceItem[]']

  def __init__(self, *args, **kwds):
    """
    Constructor. Any message fields that are implicitly/explicitly
    set to None will be assigned a default value. The recommend
    use is keyword arguments as this is more robust to future message
    changes.  You cannot mix in-order arguments and keyword arguments.

    The available fields are:
       items

    :param args: complete set of field values, in .msg order
    :param kwds: use keyword arguments corresponding to message field names
    to set specific fields.
    """
    if args or kwds:
      super(MotionSequenceRequest, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.items is None:
        self.items = []
    else:
      self.items = []

  def _get_types(self):
    """
    internal API method
    """
    return self._slot_types

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      length = len(self.items)
      buff.write(_struct_I.pack(length))
      for val1 in self.items:
        _v1 = val1.req
        _v2 = _v1.workspace_parameters
        _v3 = _v2.header
        _x = _v3.seq
        buff.write(_get_struct_I().pack(_x))
        _v4 = _v3.stamp
        _x = _v4
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v3.frame_id
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        _v5 = _v2.min_corner
        _x = _v5
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v6 = _v2.max_corner
        _x = _v6
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v7 = _v1.start_state
        _v8 = _v7.joint_state
        _v9 = _v8.header
        _x = _v9.seq
        buff.write(_get_struct_I().pack(_x))
        _v10 = _v9.stamp
        _x = _v10
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v9.frame_id
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        length = len(_v8.name)
        buff.write(_struct_I.pack(length))
        for val5 in _v8.name:
          length = len(val5)
          if python3 or type(val5) == unicode:
            val5 = val5.encode('utf-8')
            length = len(val5)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val5))
        length = len(_v8.position)
        buff.write(_struct_I.pack(length))
        pattern = '<%sd'%length
        buff.write(struct.Struct(pattern).pack(*_v8.position))
        length = len(_v8.velocity)
        buff.write(_struct_I.pack(length))
        pattern = '<%sd'%length
        buff.write(struct.Struct(pattern).pack(*_v8.velocity))
        length = len(_v8.effort)
        buff.write(_struct_I.pack(length))
        pattern = '<%sd'%length
        buff.write(struct.Struct(pattern).pack(*_v8.effort))
        _v11 = _v7.multi_dof_joint_state
        _v12 = _v11.header
        _x = _v12.seq
        buff.write(_get_struct_I().pack(_x))
        _v13 = _v12.stamp
        _x = _v13
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v12.frame_id
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        length = len(_v11.joint_names)
        buff.write(_struct_I.pack(length))
        for val5 in _v11.joint_names:
          length = len(val5)
          if python3 or type(val5) == unicode:
            val5 = val5.encode('utf-8')
            length = len(val5)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val5))
        length = len(_v11.transforms)
        buff.write(_struct_I.pack(length))
        for val5 in _v11.transforms:
          _v14 = val5.translation
          _x = _v14
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v15 = val5.rotation
          _x = _v15
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v11.twist)
        buff.write(_struct_I.pack(length))
        for val5 in _v11.twist:
          _v16 = val5.linear
          _x = _v16
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v17 = val5.angular
          _x = _v17
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        length = len(_v11.wrench)
        buff.write(_struct_I.pack(length))
        for val5 in _v11.wrench:
          _v18 = val5.force
          _x = _v18
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v19 = val5.torque
          _x = _v19
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        length = len(_v7.attached_collision_objects)
        buff.write(_struct_I.pack(length))
        for val4 in _v7.attached_collision_objects:
          _x = val4.link_name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v20 = val4.object
          _v21 = _v20.header
          _x = _v21.seq
          buff.write(_get_struct_I().pack(_x))
          _v22 = _v21.stamp
          _x = _v22
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v21.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _x = _v20.id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v23 = _v20.type
          _x = _v23.key
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _x = _v23.db
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          length = len(_v20.primitives)
          buff.write(_struct_I.pack(length))
          for val6 in _v20.primitives:
            _x = val6.type
            buff.write(_get_struct_B().pack(_x))
            length = len(val6.dimensions)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(struct.Struct(pattern).pack(*val6.dimensions))
          length = len(_v20.primitive_poses)
          buff.write(_struct_I.pack(length))
          for val6 in _v20.primitive_poses:
            _v24 = val6.position
            _x = _v24
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v25 = val6.orientation
            _x = _v25
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          length = len(_v20.meshes)
          buff.write(_struct_I.pack(length))
          for val6 in _v20.meshes:
            length = len(val6.triangles)
            buff.write(_struct_I.pack(length))
            for val7 in val6.triangles:
              buff.write(_get_struct_3I().pack(*val7.vertex_indices))
            length = len(val6.vertices)
            buff.write(_struct_I.pack(length))
            for val7 in val6.vertices:
              _x = val7
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          length = len(_v20.mesh_poses)
          buff.write(_struct_I.pack(length))
          for val6 in _v20.mesh_poses:
            _v26 = val6.position
            _x = _v26
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v27 = val6.orientation
            _x = _v27
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          length = len(_v20.planes)
          buff.write(_struct_I.pack(length))
          for val6 in _v20.planes:
            buff.write(_get_struct_4d().pack(*val6.coef))
          length = len(_v20.plane_poses)
          buff.write(_struct_I.pack(length))
          for val6 in _v20.plane_poses:
            _v28 = val6.position
            _x = _v28
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v29 = val6.orientation
            _x = _v29
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          _x = _v20.operation
          buff.write(_get_struct_b().pack(_x))
          length = len(val4.touch_links)
          buff.write(_struct_I.pack(length))
          for val5 in val4.touch_links:
            length = len(val5)
            if python3 or type(val5) == unicode:
              val5 = val5.encode('utf-8')
              length = len(val5)
            buff.write(struct.Struct('<I%ss'%length).pack(length, val5))
          _v30 = val4.detach_posture
          _v31 = _v30.header
          _x = _v31.seq
          buff.write(_get_struct_I().pack(_x))
          _v32 = _v31.stamp
          _x = _v32
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v31.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          length = len(_v30.joint_names)
          buff.write(_struct_I.pack(length))
          for val6 in _v30.joint_names:
            length = len(val6)
            if python3 or type(val6) == unicode:
              val6 = val6.encode('utf-8')
              length = len(val6)
            buff.write(struct.Struct('<I%ss'%length).pack(length, val6))
          length = len(_v30.points)
          buff.write(_struct_I.pack(length))
          for val6 in _v30.points:
            length = len(val6.positions)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(struct.Struct(pattern).pack(*val6.positions))
            length = len(val6.velocities)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(struct.Struct(pattern).pack(*val6.velocities))
            length = len(val6.accelerations)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(struct.Struct(pattern).pack(*val6.accelerations))
            length = len(val6.effort)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(struct.Struct(pattern).pack(*val6.effort))
            _v33 = val6.time_from_start
            _x = _v33
            buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs))
          _x = val4.weight
          buff.write(_get_struct_d().pack(_x))
        _x = _v7.is_diff
        buff.write(_get_struct_B().pack(_x))
        length = len(_v1.goal_constraints)
        buff.write(_struct_I.pack(length))
        for val3 in _v1.goal_constraints:
          _x = val3.name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          length = len(val3.joint_constraints)
          buff.write(_struct_I.pack(length))
          for val4 in val3.joint_constraints:
            _x = val4.joint_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val4
            buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
          length = len(val3.position_constraints)
          buff.write(_struct_I.pack(length))
          for val4 in val3.position_constraints:
            _v34 = val4.header
            _x = _v34.seq
            buff.write(_get_struct_I().pack(_x))
            _v35 = _v34.stamp
            _x = _v35
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v34.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val4.link_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v36 = val4.target_point_offset
            _x = _v36
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v37 = val4.constraint_region
            length = len(_v37.primitives)
            buff.write(_struct_I.pack(length))
            for val6 in _v37.primitives:
              _x = val6.type
              buff.write(_get_struct_B().pack(_x))
              length = len(val6.dimensions)
              buff.write(_struct_I.pack(length))
              pattern = '<%sd'%length
              buff.write(struct.Struct(pattern).pack(*val6.dimensions))
            length = len(_v37.primitive_poses)
            buff.write(_struct_I.pack(length))
            for val6 in _v37.primitive_poses:
              _v38 = val6.position
              _x = _v38
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
              _v39 = val6.orientation
              _x = _v39
              buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            length = len(_v37.meshes)
            buff.write(_struct_I.pack(length))
            for val6 in _v37.meshes:
              length = len(val6.triangles)
              buff.write(_struct_I.pack(length))
              for val7 in val6.triangles:
                buff.write(_get_struct_3I().pack(*val7.vertex_indices))
              length = len(val6.vertices)
              buff.write(_struct_I.pack(length))
              for val7 in val6.vertices:
                _x = val7
                buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            length = len(_v37.mesh_poses)
            buff.write(_struct_I.pack(length))
            for val6 in _v37.mesh_poses:
              _v40 = val6.position
              _x = _v40
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
              _v41 = val6.orientation
              _x = _v41
              buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val4.weight
            buff.write(_get_struct_d().pack(_x))
          length = len(val3.orientation_constraints)
          buff.write(_struct_I.pack(length))
          for val4 in val3.orientation_constraints:
            _v42 = val4.header
            _x = _v42.seq
            buff.write(_get_struct_I().pack(_x))
            _v43 = _v42.stamp
            _x = _v43
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v42.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v44 = val4.orientation
            _x = _v44
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val4.link_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val4
            buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight))
          length = len(val3.visibility_constraints)
          buff.write(_struct_I.pack(length))
          for val4 in val3.visibility_constraints:
            _x = val4.target_radius
            buff.write(_get_struct_d().pack(_x))
            _v45 = val4.target_pose
            _v46 = _v45.header
            _x = _v46.seq
            buff.write(_get_struct_I().pack(_x))
            _v47 = _v46.stamp
            _x = _v47
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v46.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v48 = _v45.pose
            _v49 = _v48.position
            _x = _v49
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v50 = _v48.orientation
            _x = _v50
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val4.cone_sides
            buff.write(_get_struct_i().pack(_x))
            _v51 = val4.sensor_pose
            _v52 = _v51.header
            _x = _v52.seq
            buff.write(_get_struct_I().pack(_x))
            _v53 = _v52.stamp
            _x = _v53
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v52.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v54 = _v51.pose
            _v55 = _v54.position
            _x = _v55
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v56 = _v54.orientation
            _x = _v56
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val4
            buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight))
        _v57 = _v1.path_constraints
        _x = _v57.name
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        length = len(_v57.joint_constraints)
        buff.write(_struct_I.pack(length))
        for val4 in _v57.joint_constraints:
          _x = val4.joint_name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _x = val4
          buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
        length = len(_v57.position_constraints)
        buff.write(_struct_I.pack(length))
        for val4 in _v57.position_constraints:
          _v58 = val4.header
          _x = _v58.seq
          buff.write(_get_struct_I().pack(_x))
          _v59 = _v58.stamp
          _x = _v59
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v58.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _x = val4.link_name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v60 = val4.target_point_offset
          _x = _v60
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v61 = val4.constraint_region
          length = len(_v61.primitives)
          buff.write(_struct_I.pack(length))
          for val6 in _v61.primitives:
            _x = val6.type
            buff.write(_get_struct_B().pack(_x))
            length = len(val6.dimensions)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(struct.Struct(pattern).pack(*val6.dimensions))
          length = len(_v61.primitive_poses)
          buff.write(_struct_I.pack(length))
          for val6 in _v61.primitive_poses:
            _v62 = val6.position
            _x = _v62
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v63 = val6.orientation
            _x = _v63
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          length = len(_v61.meshes)
          buff.write(_struct_I.pack(length))
          for val6 in _v61.meshes:
            length = len(val6.triangles)
            buff.write(_struct_I.pack(length))
            for val7 in val6.triangles:
              buff.write(_get_struct_3I().pack(*val7.vertex_indices))
            length = len(val6.vertices)
            buff.write(_struct_I.pack(length))
            for val7 in val6.vertices:
              _x = val7
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          length = len(_v61.mesh_poses)
          buff.write(_struct_I.pack(length))
          for val6 in _v61.mesh_poses:
            _v64 = val6.position
            _x = _v64
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v65 = val6.orientation
            _x = _v65
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          _x = val4.weight
          buff.write(_get_struct_d().pack(_x))
        length = len(_v57.orientation_constraints)
        buff.write(_struct_I.pack(length))
        for val4 in _v57.orientation_constraints:
          _v66 = val4.header
          _x = _v66.seq
          buff.write(_get_struct_I().pack(_x))
          _v67 = _v66.stamp
          _x = _v67
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v66.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v68 = val4.orientation
          _x = _v68
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          _x = val4.link_name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _x = val4
          buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight))
        length = len(_v57.visibility_constraints)
        buff.write(_struct_I.pack(length))
        for val4 in _v57.visibility_constraints:
          _x = val4.target_radius
          buff.write(_get_struct_d().pack(_x))
          _v69 = val4.target_pose
          _v70 = _v69.header
          _x = _v70.seq
          buff.write(_get_struct_I().pack(_x))
          _v71 = _v70.stamp
          _x = _v71
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v70.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v72 = _v69.pose
          _v73 = _v72.position
          _x = _v73
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v74 = _v72.orientation
          _x = _v74
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          _x = val4.cone_sides
          buff.write(_get_struct_i().pack(_x))
          _v75 = val4.sensor_pose
          _v76 = _v75.header
          _x = _v76.seq
          buff.write(_get_struct_I().pack(_x))
          _v77 = _v76.stamp
          _x = _v77
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v76.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v78 = _v75.pose
          _v79 = _v78.position
          _x = _v79
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v80 = _v78.orientation
          _x = _v80
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          _x = val4
          buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight))
        _v81 = _v1.trajectory_constraints
        length = len(_v81.constraints)
        buff.write(_struct_I.pack(length))
        for val4 in _v81.constraints:
          _x = val4.name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          length = len(val4.joint_constraints)
          buff.write(_struct_I.pack(length))
          for val5 in val4.joint_constraints:
            _x = val5.joint_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val5
            buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
          length = len(val4.position_constraints)
          buff.write(_struct_I.pack(length))
          for val5 in val4.position_constraints:
            _v82 = val5.header
            _x = _v82.seq
            buff.write(_get_struct_I().pack(_x))
            _v83 = _v82.stamp
            _x = _v83
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v82.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val5.link_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v84 = val5.target_point_offset
            _x = _v84
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v85 = val5.constraint_region
            length = len(_v85.primitives)
            buff.write(_struct_I.pack(length))
            for val7 in _v85.primitives:
              _x = val7.type
              buff.write(_get_struct_B().pack(_x))
              length = len(val7.dimensions)
              buff.write(_struct_I.pack(length))
              pattern = '<%sd'%length
              buff.write(struct.Struct(pattern).pack(*val7.dimensions))
            length = len(_v85.primitive_poses)
            buff.write(_struct_I.pack(length))
            for val7 in _v85.primitive_poses:
              _v86 = val7.position
              _x = _v86
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
              _v87 = val7.orientation
              _x = _v87
              buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            length = len(_v85.meshes)
            buff.write(_struct_I.pack(length))
            for val7 in _v85.meshes:
              length = len(val7.triangles)
              buff.write(_struct_I.pack(length))
              for val8 in val7.triangles:
                buff.write(_get_struct_3I().pack(*val8.vertex_indices))
              length = len(val7.vertices)
              buff.write(_struct_I.pack(length))
              for val8 in val7.vertices:
                _x = val8
                buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            length = len(_v85.mesh_poses)
            buff.write(_struct_I.pack(length))
            for val7 in _v85.mesh_poses:
              _v88 = val7.position
              _x = _v88
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
              _v89 = val7.orientation
              _x = _v89
              buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val5.weight
            buff.write(_get_struct_d().pack(_x))
          length = len(val4.orientation_constraints)
          buff.write(_struct_I.pack(length))
          for val5 in val4.orientation_constraints:
            _v90 = val5.header
            _x = _v90.seq
            buff.write(_get_struct_I().pack(_x))
            _v91 = _v90.stamp
            _x = _v91
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v90.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v92 = val5.orientation
            _x = _v92
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val5.link_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val5
            buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight))
          length = len(val4.visibility_constraints)
          buff.write(_struct_I.pack(length))
          for val5 in val4.visibility_constraints:
            _x = val5.target_radius
            buff.write(_get_struct_d().pack(_x))
            _v93 = val5.target_pose
            _v94 = _v93.header
            _x = _v94.seq
            buff.write(_get_struct_I().pack(_x))
            _v95 = _v94.stamp
            _x = _v95
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v94.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v96 = _v93.pose
            _v97 = _v96.position
            _x = _v97
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v98 = _v96.orientation
            _x = _v98
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val5.cone_sides
            buff.write(_get_struct_i().pack(_x))
            _v99 = val5.sensor_pose
            _v100 = _v99.header
            _x = _v100.seq
            buff.write(_get_struct_I().pack(_x))
            _v101 = _v100.stamp
            _x = _v101
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v100.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v102 = _v99.pose
            _v103 = _v102.position
            _x = _v103
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v104 = _v102.orientation
            _x = _v104
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val5
            buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight))
        _x = _v1.planner_id
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        _x = _v1.group_name
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        _x = _v1
        buff.write(_get_struct_i3d().pack(_x.num_planning_attempts, _x.allowed_planning_time, _x.max_velocity_scaling_factor, _x.max_acceleration_scaling_factor))
        _x = val1.blend_radius
        buff.write(_get_struct_d().pack(_x))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      if self.items is None:
        self.items = None
      end = 0
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.items = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.MotionSequenceItem()
        _v105 = val1.req
        _v106 = _v105.workspace_parameters
        _v107 = _v106.header
        start = end
        end += 4
        (_v107.seq,) = _get_struct_I().unpack(str[start:end])
        _v108 = _v107.stamp
        _x = _v108
        start = end
        end += 8
        (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v107.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v107.frame_id = str[start:end]
        _v109 = _v106.min_corner
        _x = _v109
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v110 = _v106.max_corner
        _x = _v110
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v111 = _v105.start_state
        _v112 = _v111.joint_state
        _v113 = _v112.header
        start = end
        end += 4
        (_v113.seq,) = _get_struct_I().unpack(str[start:end])
        _v114 = _v113.stamp
        _x = _v114
        start = end
        end += 8
        (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v113.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v113.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v112.name = []
        for i in range(0, length):
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val5 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val5 = str[start:end]
          _v112.name.append(val5)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        pattern = '<%sd'%length
        start = end
        s = struct.Struct(pattern)
        end += s.size
        _v112.position = s.unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        pattern = '<%sd'%length
        start = end
        s = struct.Struct(pattern)
        end += s.size
        _v112.velocity = s.unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        pattern = '<%sd'%length
        start = end
        s = struct.Struct(pattern)
        end += s.size
        _v112.effort = s.unpack(str[start:end])
        _v115 = _v111.multi_dof_joint_state
        _v116 = _v115.header
        start = end
        end += 4
        (_v116.seq,) = _get_struct_I().unpack(str[start:end])
        _v117 = _v116.stamp
        _x = _v117
        start = end
        end += 8
        (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v116.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v116.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v115.joint_names = []
        for i in range(0, length):
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val5 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val5 = str[start:end]
          _v115.joint_names.append(val5)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v115.transforms = []
        for i in range(0, length):
          val5 = geometry_msgs.msg.Transform()
          _v118 = val5.translation
          _x = _v118
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v119 = val5.rotation
          _x = _v119
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v115.transforms.append(val5)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v115.twist = []
        for i in range(0, length):
          val5 = geometry_msgs.msg.Twist()
          _v120 = val5.linear
          _x = _v120
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v121 = val5.angular
          _x = _v121
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v115.twist.append(val5)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v115.wrench = []
        for i in range(0, length):
          val5 = geometry_msgs.msg.Wrench()
          _v122 = val5.force
          _x = _v122
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v123 = val5.torque
          _x = _v123
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v115.wrench.append(val5)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v111.attached_collision_objects = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.AttachedCollisionObject()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val4.link_name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val4.link_name = str[start:end]
          _v124 = val4.object
          _v125 = _v124.header
          start = end
          end += 4
          (_v125.seq,) = _get_struct_I().unpack(str[start:end])
          _v126 = _v125.stamp
          _x = _v126
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v125.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v125.frame_id = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v124.id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v124.id = str[start:end]
          _v127 = _v124.type
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v127.key = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v127.key = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v127.db = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v127.db = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v124.primitives = []
          for i in range(0, length):
            val6 = shape_msgs.msg.SolidPrimitive()
            start = end
            end += 1
            (val6.type,) = _get_struct_B().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.dimensions = s.unpack(str[start:end])
            _v124.primitives.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v124.primitive_poses = []
          for i in range(0, length):
            val6 = geometry_msgs.msg.Pose()
            _v128 = val6.position
            _x = _v128
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v129 = val6.orientation
            _x = _v129
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _v124.primitive_poses.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v124.meshes = []
          for i in range(0, length):
            val6 = shape_msgs.msg.Mesh()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            val6.triangles = []
            for i in range(0, length):
              val7 = shape_msgs.msg.MeshTriangle()
              start = end
              end += 12
              val7.vertex_indices = _get_struct_3I().unpack(str[start:end])
              val6.triangles.append(val7)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            val6.vertices = []
            for i in range(0, length):
              val7 = geometry_msgs.msg.Point()
              _x = val7
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              val6.vertices.append(val7)
            _v124.meshes.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v124.mesh_poses = []
          for i in range(0, length):
            val6 = geometry_msgs.msg.Pose()
            _v130 = val6.position
            _x = _v130
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v131 = val6.orientation
            _x = _v131
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _v124.mesh_poses.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v124.planes = []
          for i in range(0, length):
            val6 = shape_msgs.msg.Plane()
            start = end
            end += 32
            val6.coef = _get_struct_4d().unpack(str[start:end])
            _v124.planes.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v124.plane_poses = []
          for i in range(0, length):
            val6 = geometry_msgs.msg.Pose()
            _v132 = val6.position
            _x = _v132
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v133 = val6.orientation
            _x = _v133
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _v124.plane_poses.append(val6)
          start = end
          end += 1
          (_v124.operation,) = _get_struct_b().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val4.touch_links = []
          for i in range(0, length):
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val5 = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val5 = str[start:end]
            val4.touch_links.append(val5)
          _v134 = val4.detach_posture
          _v135 = _v134.header
          start = end
          end += 4
          (_v135.seq,) = _get_struct_I().unpack(str[start:end])
          _v136 = _v135.stamp
          _x = _v136
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v135.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v135.frame_id = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v134.joint_names = []
          for i in range(0, length):
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val6 = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val6 = str[start:end]
            _v134.joint_names.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v134.points = []
          for i in range(0, length):
            val6 = trajectory_msgs.msg.JointTrajectoryPoint()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.positions = s.unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.velocities = s.unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.accelerations = s.unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.effort = s.unpack(str[start:end])
            _v137 = val6.time_from_start
            _x = _v137
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end])
            _v134.points.append(val6)
          start = end
          end += 8
          (val4.weight,) = _get_struct_d().unpack(str[start:end])
          _v111.attached_collision_objects.append(val4)
        start = end
        end += 1
        (_v111.is_diff,) = _get_struct_B().unpack(str[start:end])
        _v111.is_diff = bool(_v111.is_diff)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v105.goal_constraints = []
        for i in range(0, length):
          val3 = moveit_msgs.msg.Constraints()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val3.name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val3.name = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.joint_constraints = []
          for i in range(0, length):
            val4 = moveit_msgs.msg.JointConstraint()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val4.joint_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val4.joint_name = str[start:end]
            _x = val4
            start = end
            end += 32
            (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end])
            val3.joint_constraints.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.position_constraints = []
          for i in range(0, length):
            val4 = moveit_msgs.msg.PositionConstraint()
            _v138 = val4.header
            start = end
            end += 4
            (_v138.seq,) = _get_struct_I().unpack(str[start:end])
            _v139 = _v138.stamp
            _x = _v139
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v138.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v138.frame_id = str[start:end]
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val4.link_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val4.link_name = str[start:end]
            _v140 = val4.target_point_offset
            _x = _v140
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v141 = val4.constraint_region
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v141.primitives = []
            for i in range(0, length):
              val6 = shape_msgs.msg.SolidPrimitive()
              start = end
              end += 1
              (val6.type,) = _get_struct_B().unpack(str[start:end])
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              pattern = '<%sd'%length
              start = end
              s = struct.Struct(pattern)
              end += s.size
              val6.dimensions = s.unpack(str[start:end])
              _v141.primitives.append(val6)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v141.primitive_poses = []
            for i in range(0, length):
              val6 = geometry_msgs.msg.Pose()
              _v142 = val6.position
              _x = _v142
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              _v143 = val6.orientation
              _x = _v143
              start = end
              end += 32
              (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
              _v141.primitive_poses.append(val6)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v141.meshes = []
            for i in range(0, length):
              val6 = shape_msgs.msg.Mesh()
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              val6.triangles = []
              for i in range(0, length):
                val7 = shape_msgs.msg.MeshTriangle()
                start = end
                end += 12
                val7.vertex_indices = _get_struct_3I().unpack(str[start:end])
                val6.triangles.append(val7)
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              val6.vertices = []
              for i in range(0, length):
                val7 = geometry_msgs.msg.Point()
                _x = val7
                start = end
                end += 24
                (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
                val6.vertices.append(val7)
              _v141.meshes.append(val6)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v141.mesh_poses = []
            for i in range(0, length):
              val6 = geometry_msgs.msg.Pose()
              _v144 = val6.position
              _x = _v144
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              _v145 = val6.orientation
              _x = _v145
              start = end
              end += 32
              (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
              _v141.mesh_poses.append(val6)
            start = end
            end += 8
            (val4.weight,) = _get_struct_d().unpack(str[start:end])
            val3.position_constraints.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.orientation_constraints = []
          for i in range(0, length):
            val4 = moveit_msgs.msg.OrientationConstraint()
            _v146 = val4.header
            start = end
            end += 4
            (_v146.seq,) = _get_struct_I().unpack(str[start:end])
            _v147 = _v146.stamp
            _x = _v147
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v146.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v146.frame_id = str[start:end]
            _v148 = val4.orientation
            _x = _v148
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val4.link_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val4.link_name = str[start:end]
            _x = val4
            start = end
            end += 32
            (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end])
            val3.orientation_constraints.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.visibility_constraints = []
          for i in range(0, length):
            val4 = moveit_msgs.msg.VisibilityConstraint()
            start = end
            end += 8
            (val4.target_radius,) = _get_struct_d().unpack(str[start:end])
            _v149 = val4.target_pose
            _v150 = _v149.header
            start = end
            end += 4
            (_v150.seq,) = _get_struct_I().unpack(str[start:end])
            _v151 = _v150.stamp
            _x = _v151
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v150.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v150.frame_id = str[start:end]
            _v152 = _v149.pose
            _v153 = _v152.position
            _x = _v153
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v154 = _v152.orientation
            _x = _v154
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            start = end
            end += 4
            (val4.cone_sides,) = _get_struct_i().unpack(str[start:end])
            _v155 = val4.sensor_pose
            _v156 = _v155.header
            start = end
            end += 4
            (_v156.seq,) = _get_struct_I().unpack(str[start:end])
            _v157 = _v156.stamp
            _x = _v157
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v156.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v156.frame_id = str[start:end]
            _v158 = _v155.pose
            _v159 = _v158.position
            _x = _v159
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v160 = _v158.orientation
            _x = _v160
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _x = val4
            start = end
            end += 25
            (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end])
            val3.visibility_constraints.append(val4)
          _v105.goal_constraints.append(val3)
        _v161 = _v105.path_constraints
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v161.name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v161.name = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v161.joint_constraints = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.JointConstraint()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val4.joint_name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val4.joint_name = str[start:end]
          _x = val4
          start = end
          end += 32
          (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end])
          _v161.joint_constraints.append(val4)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v161.position_constraints = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.PositionConstraint()
          _v162 = val4.header
          start = end
          end += 4
          (_v162.seq,) = _get_struct_I().unpack(str[start:end])
          _v163 = _v162.stamp
          _x = _v163
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v162.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v162.frame_id = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val4.link_name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val4.link_name = str[start:end]
          _v164 = val4.target_point_offset
          _x = _v164
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v165 = val4.constraint_region
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v165.primitives = []
          for i in range(0, length):
            val6 = shape_msgs.msg.SolidPrimitive()
            start = end
            end += 1
            (val6.type,) = _get_struct_B().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.dimensions = s.unpack(str[start:end])
            _v165.primitives.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v165.primitive_poses = []
          for i in range(0, length):
            val6 = geometry_msgs.msg.Pose()
            _v166 = val6.position
            _x = _v166
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v167 = val6.orientation
            _x = _v167
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _v165.primitive_poses.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v165.meshes = []
          for i in range(0, length):
            val6 = shape_msgs.msg.Mesh()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            val6.triangles = []
            for i in range(0, length):
              val7 = shape_msgs.msg.MeshTriangle()
              start = end
              end += 12
              val7.vertex_indices = _get_struct_3I().unpack(str[start:end])
              val6.triangles.append(val7)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            val6.vertices = []
            for i in range(0, length):
              val7 = geometry_msgs.msg.Point()
              _x = val7
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              val6.vertices.append(val7)
            _v165.meshes.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v165.mesh_poses = []
          for i in range(0, length):
            val6 = geometry_msgs.msg.Pose()
            _v168 = val6.position
            _x = _v168
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v169 = val6.orientation
            _x = _v169
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _v165.mesh_poses.append(val6)
          start = end
          end += 8
          (val4.weight,) = _get_struct_d().unpack(str[start:end])
          _v161.position_constraints.append(val4)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v161.orientation_constraints = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.OrientationConstraint()
          _v170 = val4.header
          start = end
          end += 4
          (_v170.seq,) = _get_struct_I().unpack(str[start:end])
          _v171 = _v170.stamp
          _x = _v171
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v170.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v170.frame_id = str[start:end]
          _v172 = val4.orientation
          _x = _v172
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val4.link_name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val4.link_name = str[start:end]
          _x = val4
          start = end
          end += 32
          (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end])
          _v161.orientation_constraints.append(val4)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v161.visibility_constraints = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.VisibilityConstraint()
          start = end
          end += 8
          (val4.target_radius,) = _get_struct_d().unpack(str[start:end])
          _v173 = val4.target_pose
          _v174 = _v173.header
          start = end
          end += 4
          (_v174.seq,) = _get_struct_I().unpack(str[start:end])
          _v175 = _v174.stamp
          _x = _v175
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v174.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v174.frame_id = str[start:end]
          _v176 = _v173.pose
          _v177 = _v176.position
          _x = _v177
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v178 = _v176.orientation
          _x = _v178
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          start = end
          end += 4
          (val4.cone_sides,) = _get_struct_i().unpack(str[start:end])
          _v179 = val4.sensor_pose
          _v180 = _v179.header
          start = end
          end += 4
          (_v180.seq,) = _get_struct_I().unpack(str[start:end])
          _v181 = _v180.stamp
          _x = _v181
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v180.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v180.frame_id = str[start:end]
          _v182 = _v179.pose
          _v183 = _v182.position
          _x = _v183
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v184 = _v182.orientation
          _x = _v184
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _x = val4
          start = end
          end += 25
          (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end])
          _v161.visibility_constraints.append(val4)
        _v185 = _v105.trajectory_constraints
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v185.constraints = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.Constraints()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val4.name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val4.name = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val4.joint_constraints = []
          for i in range(0, length):
            val5 = moveit_msgs.msg.JointConstraint()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val5.joint_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val5.joint_name = str[start:end]
            _x = val5
            start = end
            end += 32
            (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end])
            val4.joint_constraints.append(val5)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val4.position_constraints = []
          for i in range(0, length):
            val5 = moveit_msgs.msg.PositionConstraint()
            _v186 = val5.header
            start = end
            end += 4
            (_v186.seq,) = _get_struct_I().unpack(str[start:end])
            _v187 = _v186.stamp
            _x = _v187
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v186.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v186.frame_id = str[start:end]
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val5.link_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val5.link_name = str[start:end]
            _v188 = val5.target_point_offset
            _x = _v188
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v189 = val5.constraint_region
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v189.primitives = []
            for i in range(0, length):
              val7 = shape_msgs.msg.SolidPrimitive()
              start = end
              end += 1
              (val7.type,) = _get_struct_B().unpack(str[start:end])
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              pattern = '<%sd'%length
              start = end
              s = struct.Struct(pattern)
              end += s.size
              val7.dimensions = s.unpack(str[start:end])
              _v189.primitives.append(val7)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v189.primitive_poses = []
            for i in range(0, length):
              val7 = geometry_msgs.msg.Pose()
              _v190 = val7.position
              _x = _v190
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              _v191 = val7.orientation
              _x = _v191
              start = end
              end += 32
              (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
              _v189.primitive_poses.append(val7)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v189.meshes = []
            for i in range(0, length):
              val7 = shape_msgs.msg.Mesh()
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              val7.triangles = []
              for i in range(0, length):
                val8 = shape_msgs.msg.MeshTriangle()
                start = end
                end += 12
                val8.vertex_indices = _get_struct_3I().unpack(str[start:end])
                val7.triangles.append(val8)
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              val7.vertices = []
              for i in range(0, length):
                val8 = geometry_msgs.msg.Point()
                _x = val8
                start = end
                end += 24
                (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
                val7.vertices.append(val8)
              _v189.meshes.append(val7)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v189.mesh_poses = []
            for i in range(0, length):
              val7 = geometry_msgs.msg.Pose()
              _v192 = val7.position
              _x = _v192
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              _v193 = val7.orientation
              _x = _v193
              start = end
              end += 32
              (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
              _v189.mesh_poses.append(val7)
            start = end
            end += 8
            (val5.weight,) = _get_struct_d().unpack(str[start:end])
            val4.position_constraints.append(val5)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val4.orientation_constraints = []
          for i in range(0, length):
            val5 = moveit_msgs.msg.OrientationConstraint()
            _v194 = val5.header
            start = end
            end += 4
            (_v194.seq,) = _get_struct_I().unpack(str[start:end])
            _v195 = _v194.stamp
            _x = _v195
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v194.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v194.frame_id = str[start:end]
            _v196 = val5.orientation
            _x = _v196
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val5.link_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val5.link_name = str[start:end]
            _x = val5
            start = end
            end += 32
            (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end])
            val4.orientation_constraints.append(val5)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val4.visibility_constraints = []
          for i in range(0, length):
            val5 = moveit_msgs.msg.VisibilityConstraint()
            start = end
            end += 8
            (val5.target_radius,) = _get_struct_d().unpack(str[start:end])
            _v197 = val5.target_pose
            _v198 = _v197.header
            start = end
            end += 4
            (_v198.seq,) = _get_struct_I().unpack(str[start:end])
            _v199 = _v198.stamp
            _x = _v199
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v198.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v198.frame_id = str[start:end]
            _v200 = _v197.pose
            _v201 = _v200.position
            _x = _v201
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v202 = _v200.orientation
            _x = _v202
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            start = end
            end += 4
            (val5.cone_sides,) = _get_struct_i().unpack(str[start:end])
            _v203 = val5.sensor_pose
            _v204 = _v203.header
            start = end
            end += 4
            (_v204.seq,) = _get_struct_I().unpack(str[start:end])
            _v205 = _v204.stamp
            _x = _v205
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v204.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v204.frame_id = str[start:end]
            _v206 = _v203.pose
            _v207 = _v206.position
            _x = _v207
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v208 = _v206.orientation
            _x = _v208
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _x = val5
            start = end
            end += 25
            (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end])
            val4.visibility_constraints.append(val5)
          _v185.constraints.append(val4)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v105.planner_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v105.planner_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v105.group_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v105.group_name = str[start:end]
        _x = _v105
        start = end
        end += 28
        (_x.num_planning_attempts, _x.allowed_planning_time, _x.max_velocity_scaling_factor, _x.max_acceleration_scaling_factor,) = _get_struct_i3d().unpack(str[start:end])
        start = end
        end += 8
        (val1.blend_radius,) = _get_struct_d().unpack(str[start:end])
        self.items.append(val1)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill


  def serialize_numpy(self, buff, numpy):
    """
    serialize message with numpy array types into buffer
    :param buff: buffer, ``StringIO``
    :param numpy: numpy python module
    """
    try:
      length = len(self.items)
      buff.write(_struct_I.pack(length))
      for val1 in self.items:
        _v209 = val1.req
        _v210 = _v209.workspace_parameters
        _v211 = _v210.header
        _x = _v211.seq
        buff.write(_get_struct_I().pack(_x))
        _v212 = _v211.stamp
        _x = _v212
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v211.frame_id
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        _v213 = _v210.min_corner
        _x = _v213
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v214 = _v210.max_corner
        _x = _v214
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v215 = _v209.start_state
        _v216 = _v215.joint_state
        _v217 = _v216.header
        _x = _v217.seq
        buff.write(_get_struct_I().pack(_x))
        _v218 = _v217.stamp
        _x = _v218
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v217.frame_id
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        length = len(_v216.name)
        buff.write(_struct_I.pack(length))
        for val5 in _v216.name:
          length = len(val5)
          if python3 or type(val5) == unicode:
            val5 = val5.encode('utf-8')
            length = len(val5)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val5))
        length = len(_v216.position)
        buff.write(_struct_I.pack(length))
        pattern = '<%sd'%length
        buff.write(_v216.position.tostring())
        length = len(_v216.velocity)
        buff.write(_struct_I.pack(length))
        pattern = '<%sd'%length
        buff.write(_v216.velocity.tostring())
        length = len(_v216.effort)
        buff.write(_struct_I.pack(length))
        pattern = '<%sd'%length
        buff.write(_v216.effort.tostring())
        _v219 = _v215.multi_dof_joint_state
        _v220 = _v219.header
        _x = _v220.seq
        buff.write(_get_struct_I().pack(_x))
        _v221 = _v220.stamp
        _x = _v221
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v220.frame_id
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        length = len(_v219.joint_names)
        buff.write(_struct_I.pack(length))
        for val5 in _v219.joint_names:
          length = len(val5)
          if python3 or type(val5) == unicode:
            val5 = val5.encode('utf-8')
            length = len(val5)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val5))
        length = len(_v219.transforms)
        buff.write(_struct_I.pack(length))
        for val5 in _v219.transforms:
          _v222 = val5.translation
          _x = _v222
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v223 = val5.rotation
          _x = _v223
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v219.twist)
        buff.write(_struct_I.pack(length))
        for val5 in _v219.twist:
          _v224 = val5.linear
          _x = _v224
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v225 = val5.angular
          _x = _v225
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        length = len(_v219.wrench)
        buff.write(_struct_I.pack(length))
        for val5 in _v219.wrench:
          _v226 = val5.force
          _x = _v226
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v227 = val5.torque
          _x = _v227
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        length = len(_v215.attached_collision_objects)
        buff.write(_struct_I.pack(length))
        for val4 in _v215.attached_collision_objects:
          _x = val4.link_name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v228 = val4.object
          _v229 = _v228.header
          _x = _v229.seq
          buff.write(_get_struct_I().pack(_x))
          _v230 = _v229.stamp
          _x = _v230
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v229.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _x = _v228.id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v231 = _v228.type
          _x = _v231.key
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _x = _v231.db
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          length = len(_v228.primitives)
          buff.write(_struct_I.pack(length))
          for val6 in _v228.primitives:
            _x = val6.type
            buff.write(_get_struct_B().pack(_x))
            length = len(val6.dimensions)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(val6.dimensions.tostring())
          length = len(_v228.primitive_poses)
          buff.write(_struct_I.pack(length))
          for val6 in _v228.primitive_poses:
            _v232 = val6.position
            _x = _v232
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v233 = val6.orientation
            _x = _v233
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          length = len(_v228.meshes)
          buff.write(_struct_I.pack(length))
          for val6 in _v228.meshes:
            length = len(val6.triangles)
            buff.write(_struct_I.pack(length))
            for val7 in val6.triangles:
              buff.write(val7.vertex_indices.tostring())
            length = len(val6.vertices)
            buff.write(_struct_I.pack(length))
            for val7 in val6.vertices:
              _x = val7
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          length = len(_v228.mesh_poses)
          buff.write(_struct_I.pack(length))
          for val6 in _v228.mesh_poses:
            _v234 = val6.position
            _x = _v234
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v235 = val6.orientation
            _x = _v235
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          length = len(_v228.planes)
          buff.write(_struct_I.pack(length))
          for val6 in _v228.planes:
            buff.write(val6.coef.tostring())
          length = len(_v228.plane_poses)
          buff.write(_struct_I.pack(length))
          for val6 in _v228.plane_poses:
            _v236 = val6.position
            _x = _v236
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v237 = val6.orientation
            _x = _v237
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          _x = _v228.operation
          buff.write(_get_struct_b().pack(_x))
          length = len(val4.touch_links)
          buff.write(_struct_I.pack(length))
          for val5 in val4.touch_links:
            length = len(val5)
            if python3 or type(val5) == unicode:
              val5 = val5.encode('utf-8')
              length = len(val5)
            buff.write(struct.Struct('<I%ss'%length).pack(length, val5))
          _v238 = val4.detach_posture
          _v239 = _v238.header
          _x = _v239.seq
          buff.write(_get_struct_I().pack(_x))
          _v240 = _v239.stamp
          _x = _v240
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v239.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          length = len(_v238.joint_names)
          buff.write(_struct_I.pack(length))
          for val6 in _v238.joint_names:
            length = len(val6)
            if python3 or type(val6) == unicode:
              val6 = val6.encode('utf-8')
              length = len(val6)
            buff.write(struct.Struct('<I%ss'%length).pack(length, val6))
          length = len(_v238.points)
          buff.write(_struct_I.pack(length))
          for val6 in _v238.points:
            length = len(val6.positions)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(val6.positions.tostring())
            length = len(val6.velocities)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(val6.velocities.tostring())
            length = len(val6.accelerations)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(val6.accelerations.tostring())
            length = len(val6.effort)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(val6.effort.tostring())
            _v241 = val6.time_from_start
            _x = _v241
            buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs))
          _x = val4.weight
          buff.write(_get_struct_d().pack(_x))
        _x = _v215.is_diff
        buff.write(_get_struct_B().pack(_x))
        length = len(_v209.goal_constraints)
        buff.write(_struct_I.pack(length))
        for val3 in _v209.goal_constraints:
          _x = val3.name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          length = len(val3.joint_constraints)
          buff.write(_struct_I.pack(length))
          for val4 in val3.joint_constraints:
            _x = val4.joint_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val4
            buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
          length = len(val3.position_constraints)
          buff.write(_struct_I.pack(length))
          for val4 in val3.position_constraints:
            _v242 = val4.header
            _x = _v242.seq
            buff.write(_get_struct_I().pack(_x))
            _v243 = _v242.stamp
            _x = _v243
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v242.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val4.link_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v244 = val4.target_point_offset
            _x = _v244
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v245 = val4.constraint_region
            length = len(_v245.primitives)
            buff.write(_struct_I.pack(length))
            for val6 in _v245.primitives:
              _x = val6.type
              buff.write(_get_struct_B().pack(_x))
              length = len(val6.dimensions)
              buff.write(_struct_I.pack(length))
              pattern = '<%sd'%length
              buff.write(val6.dimensions.tostring())
            length = len(_v245.primitive_poses)
            buff.write(_struct_I.pack(length))
            for val6 in _v245.primitive_poses:
              _v246 = val6.position
              _x = _v246
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
              _v247 = val6.orientation
              _x = _v247
              buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            length = len(_v245.meshes)
            buff.write(_struct_I.pack(length))
            for val6 in _v245.meshes:
              length = len(val6.triangles)
              buff.write(_struct_I.pack(length))
              for val7 in val6.triangles:
                buff.write(val7.vertex_indices.tostring())
              length = len(val6.vertices)
              buff.write(_struct_I.pack(length))
              for val7 in val6.vertices:
                _x = val7
                buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            length = len(_v245.mesh_poses)
            buff.write(_struct_I.pack(length))
            for val6 in _v245.mesh_poses:
              _v248 = val6.position
              _x = _v248
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
              _v249 = val6.orientation
              _x = _v249
              buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val4.weight
            buff.write(_get_struct_d().pack(_x))
          length = len(val3.orientation_constraints)
          buff.write(_struct_I.pack(length))
          for val4 in val3.orientation_constraints:
            _v250 = val4.header
            _x = _v250.seq
            buff.write(_get_struct_I().pack(_x))
            _v251 = _v250.stamp
            _x = _v251
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v250.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v252 = val4.orientation
            _x = _v252
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val4.link_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val4
            buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight))
          length = len(val3.visibility_constraints)
          buff.write(_struct_I.pack(length))
          for val4 in val3.visibility_constraints:
            _x = val4.target_radius
            buff.write(_get_struct_d().pack(_x))
            _v253 = val4.target_pose
            _v254 = _v253.header
            _x = _v254.seq
            buff.write(_get_struct_I().pack(_x))
            _v255 = _v254.stamp
            _x = _v255
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v254.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v256 = _v253.pose
            _v257 = _v256.position
            _x = _v257
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v258 = _v256.orientation
            _x = _v258
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val4.cone_sides
            buff.write(_get_struct_i().pack(_x))
            _v259 = val4.sensor_pose
            _v260 = _v259.header
            _x = _v260.seq
            buff.write(_get_struct_I().pack(_x))
            _v261 = _v260.stamp
            _x = _v261
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v260.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v262 = _v259.pose
            _v263 = _v262.position
            _x = _v263
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v264 = _v262.orientation
            _x = _v264
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val4
            buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight))
        _v265 = _v209.path_constraints
        _x = _v265.name
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        length = len(_v265.joint_constraints)
        buff.write(_struct_I.pack(length))
        for val4 in _v265.joint_constraints:
          _x = val4.joint_name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _x = val4
          buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
        length = len(_v265.position_constraints)
        buff.write(_struct_I.pack(length))
        for val4 in _v265.position_constraints:
          _v266 = val4.header
          _x = _v266.seq
          buff.write(_get_struct_I().pack(_x))
          _v267 = _v266.stamp
          _x = _v267
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v266.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _x = val4.link_name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v268 = val4.target_point_offset
          _x = _v268
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v269 = val4.constraint_region
          length = len(_v269.primitives)
          buff.write(_struct_I.pack(length))
          for val6 in _v269.primitives:
            _x = val6.type
            buff.write(_get_struct_B().pack(_x))
            length = len(val6.dimensions)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd'%length
            buff.write(val6.dimensions.tostring())
          length = len(_v269.primitive_poses)
          buff.write(_struct_I.pack(length))
          for val6 in _v269.primitive_poses:
            _v270 = val6.position
            _x = _v270
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v271 = val6.orientation
            _x = _v271
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          length = len(_v269.meshes)
          buff.write(_struct_I.pack(length))
          for val6 in _v269.meshes:
            length = len(val6.triangles)
            buff.write(_struct_I.pack(length))
            for val7 in val6.triangles:
              buff.write(val7.vertex_indices.tostring())
            length = len(val6.vertices)
            buff.write(_struct_I.pack(length))
            for val7 in val6.vertices:
              _x = val7
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          length = len(_v269.mesh_poses)
          buff.write(_struct_I.pack(length))
          for val6 in _v269.mesh_poses:
            _v272 = val6.position
            _x = _v272
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v273 = val6.orientation
            _x = _v273
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          _x = val4.weight
          buff.write(_get_struct_d().pack(_x))
        length = len(_v265.orientation_constraints)
        buff.write(_struct_I.pack(length))
        for val4 in _v265.orientation_constraints:
          _v274 = val4.header
          _x = _v274.seq
          buff.write(_get_struct_I().pack(_x))
          _v275 = _v274.stamp
          _x = _v275
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v274.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v276 = val4.orientation
          _x = _v276
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          _x = val4.link_name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _x = val4
          buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight))
        length = len(_v265.visibility_constraints)
        buff.write(_struct_I.pack(length))
        for val4 in _v265.visibility_constraints:
          _x = val4.target_radius
          buff.write(_get_struct_d().pack(_x))
          _v277 = val4.target_pose
          _v278 = _v277.header
          _x = _v278.seq
          buff.write(_get_struct_I().pack(_x))
          _v279 = _v278.stamp
          _x = _v279
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v278.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v280 = _v277.pose
          _v281 = _v280.position
          _x = _v281
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v282 = _v280.orientation
          _x = _v282
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          _x = val4.cone_sides
          buff.write(_get_struct_i().pack(_x))
          _v283 = val4.sensor_pose
          _v284 = _v283.header
          _x = _v284.seq
          buff.write(_get_struct_I().pack(_x))
          _v285 = _v284.stamp
          _x = _v285
          buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
          _x = _v284.frame_id
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          _v286 = _v283.pose
          _v287 = _v286.position
          _x = _v287
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v288 = _v286.orientation
          _x = _v288
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
          _x = val4
          buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight))
        _v289 = _v209.trajectory_constraints
        length = len(_v289.constraints)
        buff.write(_struct_I.pack(length))
        for val4 in _v289.constraints:
          _x = val4.name
          length = len(_x)
          if python3 or type(_x) == unicode:
            _x = _x.encode('utf-8')
            length = len(_x)
          buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
          length = len(val4.joint_constraints)
          buff.write(_struct_I.pack(length))
          for val5 in val4.joint_constraints:
            _x = val5.joint_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val5
            buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
          length = len(val4.position_constraints)
          buff.write(_struct_I.pack(length))
          for val5 in val4.position_constraints:
            _v290 = val5.header
            _x = _v290.seq
            buff.write(_get_struct_I().pack(_x))
            _v291 = _v290.stamp
            _x = _v291
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v290.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val5.link_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v292 = val5.target_point_offset
            _x = _v292
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v293 = val5.constraint_region
            length = len(_v293.primitives)
            buff.write(_struct_I.pack(length))
            for val7 in _v293.primitives:
              _x = val7.type
              buff.write(_get_struct_B().pack(_x))
              length = len(val7.dimensions)
              buff.write(_struct_I.pack(length))
              pattern = '<%sd'%length
              buff.write(val7.dimensions.tostring())
            length = len(_v293.primitive_poses)
            buff.write(_struct_I.pack(length))
            for val7 in _v293.primitive_poses:
              _v294 = val7.position
              _x = _v294
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
              _v295 = val7.orientation
              _x = _v295
              buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            length = len(_v293.meshes)
            buff.write(_struct_I.pack(length))
            for val7 in _v293.meshes:
              length = len(val7.triangles)
              buff.write(_struct_I.pack(length))
              for val8 in val7.triangles:
                buff.write(val8.vertex_indices.tostring())
              length = len(val7.vertices)
              buff.write(_struct_I.pack(length))
              for val8 in val7.vertices:
                _x = val8
                buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            length = len(_v293.mesh_poses)
            buff.write(_struct_I.pack(length))
            for val7 in _v293.mesh_poses:
              _v296 = val7.position
              _x = _v296
              buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
              _v297 = val7.orientation
              _x = _v297
              buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val5.weight
            buff.write(_get_struct_d().pack(_x))
          length = len(val4.orientation_constraints)
          buff.write(_struct_I.pack(length))
          for val5 in val4.orientation_constraints:
            _v298 = val5.header
            _x = _v298.seq
            buff.write(_get_struct_I().pack(_x))
            _v299 = _v298.stamp
            _x = _v299
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v298.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v300 = val5.orientation
            _x = _v300
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val5.link_name
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _x = val5
            buff.write(_get_struct_4d().pack(_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight))
          length = len(val4.visibility_constraints)
          buff.write(_struct_I.pack(length))
          for val5 in val4.visibility_constraints:
            _x = val5.target_radius
            buff.write(_get_struct_d().pack(_x))
            _v301 = val5.target_pose
            _v302 = _v301.header
            _x = _v302.seq
            buff.write(_get_struct_I().pack(_x))
            _v303 = _v302.stamp
            _x = _v303
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v302.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v304 = _v301.pose
            _v305 = _v304.position
            _x = _v305
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v306 = _v304.orientation
            _x = _v306
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val5.cone_sides
            buff.write(_get_struct_i().pack(_x))
            _v307 = val5.sensor_pose
            _v308 = _v307.header
            _x = _v308.seq
            buff.write(_get_struct_I().pack(_x))
            _v309 = _v308.stamp
            _x = _v309
            buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
            _x = _v308.frame_id
            length = len(_x)
            if python3 or type(_x) == unicode:
              _x = _x.encode('utf-8')
              length = len(_x)
            buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
            _v310 = _v307.pose
            _v311 = _v310.position
            _x = _v311
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
            _v312 = _v310.orientation
            _x = _v312
            buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
            _x = val5
            buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight))
        _x = _v209.planner_id
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        _x = _v209.group_name
        length = len(_x)
        if python3 or type(_x) == unicode:
          _x = _x.encode('utf-8')
          length = len(_x)
        buff.write(struct.Struct('<I%ss'%length).pack(length, _x))
        _x = _v209
        buff.write(_get_struct_i3d().pack(_x.num_planning_attempts, _x.allowed_planning_time, _x.max_velocity_scaling_factor, _x.max_acceleration_scaling_factor))
        _x = val1.blend_radius
        buff.write(_get_struct_d().pack(_x))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize_numpy(self, str, numpy):
    """
    unpack serialized message in str into this message instance using numpy for array types
    :param str: byte array of serialized message, ``str``
    :param numpy: numpy python module
    """
    codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      if self.items is None:
        self.items = None
      end = 0
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.items = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.MotionSequenceItem()
        _v313 = val1.req
        _v314 = _v313.workspace_parameters
        _v315 = _v314.header
        start = end
        end += 4
        (_v315.seq,) = _get_struct_I().unpack(str[start:end])
        _v316 = _v315.stamp
        _x = _v316
        start = end
        end += 8
        (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v315.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v315.frame_id = str[start:end]
        _v317 = _v314.min_corner
        _x = _v317
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v318 = _v314.max_corner
        _x = _v318
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v319 = _v313.start_state
        _v320 = _v319.joint_state
        _v321 = _v320.header
        start = end
        end += 4
        (_v321.seq,) = _get_struct_I().unpack(str[start:end])
        _v322 = _v321.stamp
        _x = _v322
        start = end
        end += 8
        (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v321.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v321.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v320.name = []
        for i in range(0, length):
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val5 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val5 = str[start:end]
          _v320.name.append(val5)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        pattern = '<%sd'%length
        start = end
        s = struct.Struct(pattern)
        end += s.size
        _v320.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        pattern = '<%sd'%length
        start = end
        s = struct.Struct(pattern)
        end += s.size
        _v320.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        pattern = '<%sd'%length
        start = end
        s = struct.Struct(pattern)
        end += s.size
        _v320.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
        _v323 = _v319.multi_dof_joint_state
        _v324 = _v323.header
        start = end
        end += 4
        (_v324.seq,) = _get_struct_I().unpack(str[start:end])
        _v325 = _v324.stamp
        _x = _v325
        start = end
        end += 8
        (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v324.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v324.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v323.joint_names = []
        for i in range(0, length):
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val5 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val5 = str[start:end]
          _v323.joint_names.append(val5)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v323.transforms = []
        for i in range(0, length):
          val5 = geometry_msgs.msg.Transform()
          _v326 = val5.translation
          _x = _v326
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v327 = val5.rotation
          _x = _v327
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v323.transforms.append(val5)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v323.twist = []
        for i in range(0, length):
          val5 = geometry_msgs.msg.Twist()
          _v328 = val5.linear
          _x = _v328
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v329 = val5.angular
          _x = _v329
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v323.twist.append(val5)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v323.wrench = []
        for i in range(0, length):
          val5 = geometry_msgs.msg.Wrench()
          _v330 = val5.force
          _x = _v330
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v331 = val5.torque
          _x = _v331
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v323.wrench.append(val5)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v319.attached_collision_objects = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.AttachedCollisionObject()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val4.link_name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val4.link_name = str[start:end]
          _v332 = val4.object
          _v333 = _v332.header
          start = end
          end += 4
          (_v333.seq,) = _get_struct_I().unpack(str[start:end])
          _v334 = _v333.stamp
          _x = _v334
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v333.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v333.frame_id = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v332.id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v332.id = str[start:end]
          _v335 = _v332.type
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v335.key = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v335.key = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v335.db = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v335.db = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v332.primitives = []
          for i in range(0, length):
            val6 = shape_msgs.msg.SolidPrimitive()
            start = end
            end += 1
            (val6.type,) = _get_struct_B().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
            _v332.primitives.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v332.primitive_poses = []
          for i in range(0, length):
            val6 = geometry_msgs.msg.Pose()
            _v336 = val6.position
            _x = _v336
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v337 = val6.orientation
            _x = _v337
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _v332.primitive_poses.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v332.meshes = []
          for i in range(0, length):
            val6 = shape_msgs.msg.Mesh()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            val6.triangles = []
            for i in range(0, length):
              val7 = shape_msgs.msg.MeshTriangle()
              start = end
              end += 12
              val7.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3)
              val6.triangles.append(val7)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            val6.vertices = []
            for i in range(0, length):
              val7 = geometry_msgs.msg.Point()
              _x = val7
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              val6.vertices.append(val7)
            _v332.meshes.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v332.mesh_poses = []
          for i in range(0, length):
            val6 = geometry_msgs.msg.Pose()
            _v338 = val6.position
            _x = _v338
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v339 = val6.orientation
            _x = _v339
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _v332.mesh_poses.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v332.planes = []
          for i in range(0, length):
            val6 = shape_msgs.msg.Plane()
            start = end
            end += 32
            val6.coef = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
            _v332.planes.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v332.plane_poses = []
          for i in range(0, length):
            val6 = geometry_msgs.msg.Pose()
            _v340 = val6.position
            _x = _v340
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v341 = val6.orientation
            _x = _v341
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _v332.plane_poses.append(val6)
          start = end
          end += 1
          (_v332.operation,) = _get_struct_b().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val4.touch_links = []
          for i in range(0, length):
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val5 = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val5 = str[start:end]
            val4.touch_links.append(val5)
          _v342 = val4.detach_posture
          _v343 = _v342.header
          start = end
          end += 4
          (_v343.seq,) = _get_struct_I().unpack(str[start:end])
          _v344 = _v343.stamp
          _x = _v344
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v343.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v343.frame_id = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v342.joint_names = []
          for i in range(0, length):
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val6 = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val6 = str[start:end]
            _v342.joint_names.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v342.points = []
          for i in range(0, length):
            val6 = trajectory_msgs.msg.JointTrajectoryPoint()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
            _v345 = val6.time_from_start
            _x = _v345
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end])
            _v342.points.append(val6)
          start = end
          end += 8
          (val4.weight,) = _get_struct_d().unpack(str[start:end])
          _v319.attached_collision_objects.append(val4)
        start = end
        end += 1
        (_v319.is_diff,) = _get_struct_B().unpack(str[start:end])
        _v319.is_diff = bool(_v319.is_diff)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v313.goal_constraints = []
        for i in range(0, length):
          val3 = moveit_msgs.msg.Constraints()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val3.name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val3.name = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.joint_constraints = []
          for i in range(0, length):
            val4 = moveit_msgs.msg.JointConstraint()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val4.joint_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val4.joint_name = str[start:end]
            _x = val4
            start = end
            end += 32
            (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end])
            val3.joint_constraints.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.position_constraints = []
          for i in range(0, length):
            val4 = moveit_msgs.msg.PositionConstraint()
            _v346 = val4.header
            start = end
            end += 4
            (_v346.seq,) = _get_struct_I().unpack(str[start:end])
            _v347 = _v346.stamp
            _x = _v347
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v346.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v346.frame_id = str[start:end]
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val4.link_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val4.link_name = str[start:end]
            _v348 = val4.target_point_offset
            _x = _v348
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v349 = val4.constraint_region
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v349.primitives = []
            for i in range(0, length):
              val6 = shape_msgs.msg.SolidPrimitive()
              start = end
              end += 1
              (val6.type,) = _get_struct_B().unpack(str[start:end])
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              pattern = '<%sd'%length
              start = end
              s = struct.Struct(pattern)
              end += s.size
              val6.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
              _v349.primitives.append(val6)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v349.primitive_poses = []
            for i in range(0, length):
              val6 = geometry_msgs.msg.Pose()
              _v350 = val6.position
              _x = _v350
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              _v351 = val6.orientation
              _x = _v351
              start = end
              end += 32
              (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
              _v349.primitive_poses.append(val6)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v349.meshes = []
            for i in range(0, length):
              val6 = shape_msgs.msg.Mesh()
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              val6.triangles = []
              for i in range(0, length):
                val7 = shape_msgs.msg.MeshTriangle()
                start = end
                end += 12
                val7.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3)
                val6.triangles.append(val7)
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              val6.vertices = []
              for i in range(0, length):
                val7 = geometry_msgs.msg.Point()
                _x = val7
                start = end
                end += 24
                (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
                val6.vertices.append(val7)
              _v349.meshes.append(val6)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v349.mesh_poses = []
            for i in range(0, length):
              val6 = geometry_msgs.msg.Pose()
              _v352 = val6.position
              _x = _v352
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              _v353 = val6.orientation
              _x = _v353
              start = end
              end += 32
              (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
              _v349.mesh_poses.append(val6)
            start = end
            end += 8
            (val4.weight,) = _get_struct_d().unpack(str[start:end])
            val3.position_constraints.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.orientation_constraints = []
          for i in range(0, length):
            val4 = moveit_msgs.msg.OrientationConstraint()
            _v354 = val4.header
            start = end
            end += 4
            (_v354.seq,) = _get_struct_I().unpack(str[start:end])
            _v355 = _v354.stamp
            _x = _v355
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v354.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v354.frame_id = str[start:end]
            _v356 = val4.orientation
            _x = _v356
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val4.link_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val4.link_name = str[start:end]
            _x = val4
            start = end
            end += 32
            (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end])
            val3.orientation_constraints.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.visibility_constraints = []
          for i in range(0, length):
            val4 = moveit_msgs.msg.VisibilityConstraint()
            start = end
            end += 8
            (val4.target_radius,) = _get_struct_d().unpack(str[start:end])
            _v357 = val4.target_pose
            _v358 = _v357.header
            start = end
            end += 4
            (_v358.seq,) = _get_struct_I().unpack(str[start:end])
            _v359 = _v358.stamp
            _x = _v359
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v358.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v358.frame_id = str[start:end]
            _v360 = _v357.pose
            _v361 = _v360.position
            _x = _v361
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v362 = _v360.orientation
            _x = _v362
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            start = end
            end += 4
            (val4.cone_sides,) = _get_struct_i().unpack(str[start:end])
            _v363 = val4.sensor_pose
            _v364 = _v363.header
            start = end
            end += 4
            (_v364.seq,) = _get_struct_I().unpack(str[start:end])
            _v365 = _v364.stamp
            _x = _v365
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v364.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v364.frame_id = str[start:end]
            _v366 = _v363.pose
            _v367 = _v366.position
            _x = _v367
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v368 = _v366.orientation
            _x = _v368
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _x = val4
            start = end
            end += 25
            (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end])
            val3.visibility_constraints.append(val4)
          _v313.goal_constraints.append(val3)
        _v369 = _v313.path_constraints
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v369.name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v369.name = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v369.joint_constraints = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.JointConstraint()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val4.joint_name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val4.joint_name = str[start:end]
          _x = val4
          start = end
          end += 32
          (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end])
          _v369.joint_constraints.append(val4)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v369.position_constraints = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.PositionConstraint()
          _v370 = val4.header
          start = end
          end += 4
          (_v370.seq,) = _get_struct_I().unpack(str[start:end])
          _v371 = _v370.stamp
          _x = _v371
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v370.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v370.frame_id = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val4.link_name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val4.link_name = str[start:end]
          _v372 = val4.target_point_offset
          _x = _v372
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v373 = val4.constraint_region
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v373.primitives = []
          for i in range(0, length):
            val6 = shape_msgs.msg.SolidPrimitive()
            start = end
            end += 1
            (val6.type,) = _get_struct_B().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            pattern = '<%sd'%length
            start = end
            s = struct.Struct(pattern)
            end += s.size
            val6.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
            _v373.primitives.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v373.primitive_poses = []
          for i in range(0, length):
            val6 = geometry_msgs.msg.Pose()
            _v374 = val6.position
            _x = _v374
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v375 = val6.orientation
            _x = _v375
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _v373.primitive_poses.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v373.meshes = []
          for i in range(0, length):
            val6 = shape_msgs.msg.Mesh()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            val6.triangles = []
            for i in range(0, length):
              val7 = shape_msgs.msg.MeshTriangle()
              start = end
              end += 12
              val7.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3)
              val6.triangles.append(val7)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            val6.vertices = []
            for i in range(0, length):
              val7 = geometry_msgs.msg.Point()
              _x = val7
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              val6.vertices.append(val7)
            _v373.meshes.append(val6)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          _v373.mesh_poses = []
          for i in range(0, length):
            val6 = geometry_msgs.msg.Pose()
            _v376 = val6.position
            _x = _v376
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v377 = val6.orientation
            _x = _v377
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _v373.mesh_poses.append(val6)
          start = end
          end += 8
          (val4.weight,) = _get_struct_d().unpack(str[start:end])
          _v369.position_constraints.append(val4)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v369.orientation_constraints = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.OrientationConstraint()
          _v378 = val4.header
          start = end
          end += 4
          (_v378.seq,) = _get_struct_I().unpack(str[start:end])
          _v379 = _v378.stamp
          _x = _v379
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v378.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v378.frame_id = str[start:end]
          _v380 = val4.orientation
          _x = _v380
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val4.link_name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val4.link_name = str[start:end]
          _x = val4
          start = end
          end += 32
          (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end])
          _v369.orientation_constraints.append(val4)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v369.visibility_constraints = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.VisibilityConstraint()
          start = end
          end += 8
          (val4.target_radius,) = _get_struct_d().unpack(str[start:end])
          _v381 = val4.target_pose
          _v382 = _v381.header
          start = end
          end += 4
          (_v382.seq,) = _get_struct_I().unpack(str[start:end])
          _v383 = _v382.stamp
          _x = _v383
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v382.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v382.frame_id = str[start:end]
          _v384 = _v381.pose
          _v385 = _v384.position
          _x = _v385
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v386 = _v384.orientation
          _x = _v386
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          start = end
          end += 4
          (val4.cone_sides,) = _get_struct_i().unpack(str[start:end])
          _v387 = val4.sensor_pose
          _v388 = _v387.header
          start = end
          end += 4
          (_v388.seq,) = _get_struct_I().unpack(str[start:end])
          _v389 = _v388.stamp
          _x = _v389
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            _v388.frame_id = str[start:end].decode('utf-8', 'rosmsg')
          else:
            _v388.frame_id = str[start:end]
          _v390 = _v387.pose
          _v391 = _v390.position
          _x = _v391
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v392 = _v390.orientation
          _x = _v392
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _x = val4
          start = end
          end += 25
          (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end])
          _v369.visibility_constraints.append(val4)
        _v393 = _v313.trajectory_constraints
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v393.constraints = []
        for i in range(0, length):
          val4 = moveit_msgs.msg.Constraints()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          start = end
          end += length
          if python3:
            val4.name = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val4.name = str[start:end]
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val4.joint_constraints = []
          for i in range(0, length):
            val5 = moveit_msgs.msg.JointConstraint()
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val5.joint_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val5.joint_name = str[start:end]
            _x = val5
            start = end
            end += 32
            (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end])
            val4.joint_constraints.append(val5)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val4.position_constraints = []
          for i in range(0, length):
            val5 = moveit_msgs.msg.PositionConstraint()
            _v394 = val5.header
            start = end
            end += 4
            (_v394.seq,) = _get_struct_I().unpack(str[start:end])
            _v395 = _v394.stamp
            _x = _v395
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v394.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v394.frame_id = str[start:end]
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val5.link_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val5.link_name = str[start:end]
            _v396 = val5.target_point_offset
            _x = _v396
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v397 = val5.constraint_region
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v397.primitives = []
            for i in range(0, length):
              val7 = shape_msgs.msg.SolidPrimitive()
              start = end
              end += 1
              (val7.type,) = _get_struct_B().unpack(str[start:end])
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              pattern = '<%sd'%length
              start = end
              s = struct.Struct(pattern)
              end += s.size
              val7.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
              _v397.primitives.append(val7)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v397.primitive_poses = []
            for i in range(0, length):
              val7 = geometry_msgs.msg.Pose()
              _v398 = val7.position
              _x = _v398
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              _v399 = val7.orientation
              _x = _v399
              start = end
              end += 32
              (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
              _v397.primitive_poses.append(val7)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v397.meshes = []
            for i in range(0, length):
              val7 = shape_msgs.msg.Mesh()
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              val7.triangles = []
              for i in range(0, length):
                val8 = shape_msgs.msg.MeshTriangle()
                start = end
                end += 12
                val8.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3)
                val7.triangles.append(val8)
              start = end
              end += 4
              (length,) = _struct_I.unpack(str[start:end])
              val7.vertices = []
              for i in range(0, length):
                val8 = geometry_msgs.msg.Point()
                _x = val8
                start = end
                end += 24
                (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
                val7.vertices.append(val8)
              _v397.meshes.append(val7)
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            _v397.mesh_poses = []
            for i in range(0, length):
              val7 = geometry_msgs.msg.Pose()
              _v400 = val7.position
              _x = _v400
              start = end
              end += 24
              (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
              _v401 = val7.orientation
              _x = _v401
              start = end
              end += 32
              (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
              _v397.mesh_poses.append(val7)
            start = end
            end += 8
            (val5.weight,) = _get_struct_d().unpack(str[start:end])
            val4.position_constraints.append(val5)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val4.orientation_constraints = []
          for i in range(0, length):
            val5 = moveit_msgs.msg.OrientationConstraint()
            _v402 = val5.header
            start = end
            end += 4
            (_v402.seq,) = _get_struct_I().unpack(str[start:end])
            _v403 = _v402.stamp
            _x = _v403
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v402.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v402.frame_id = str[start:end]
            _v404 = val5.orientation
            _x = _v404
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              val5.link_name = str[start:end].decode('utf-8', 'rosmsg')
            else:
              val5.link_name = str[start:end]
            _x = val5
            start = end
            end += 32
            (_x.absolute_x_axis_tolerance, _x.absolute_y_axis_tolerance, _x.absolute_z_axis_tolerance, _x.weight,) = _get_struct_4d().unpack(str[start:end])
            val4.orientation_constraints.append(val5)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val4.visibility_constraints = []
          for i in range(0, length):
            val5 = moveit_msgs.msg.VisibilityConstraint()
            start = end
            end += 8
            (val5.target_radius,) = _get_struct_d().unpack(str[start:end])
            _v405 = val5.target_pose
            _v406 = _v405.header
            start = end
            end += 4
            (_v406.seq,) = _get_struct_I().unpack(str[start:end])
            _v407 = _v406.stamp
            _x = _v407
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v406.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v406.frame_id = str[start:end]
            _v408 = _v405.pose
            _v409 = _v408.position
            _x = _v409
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v410 = _v408.orientation
            _x = _v410
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            start = end
            end += 4
            (val5.cone_sides,) = _get_struct_i().unpack(str[start:end])
            _v411 = val5.sensor_pose
            _v412 = _v411.header
            start = end
            end += 4
            (_v412.seq,) = _get_struct_I().unpack(str[start:end])
            _v413 = _v412.stamp
            _x = _v413
            start = end
            end += 8
            (_x.secs, _x.nsecs,) = _get_struct_2I().unpack(str[start:end])
            start = end
            end += 4
            (length,) = _struct_I.unpack(str[start:end])
            start = end
            end += length
            if python3:
              _v412.frame_id = str[start:end].decode('utf-8', 'rosmsg')
            else:
              _v412.frame_id = str[start:end]
            _v414 = _v411.pose
            _v415 = _v414.position
            _x = _v415
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            _v416 = _v414.orientation
            _x = _v416
            start = end
            end += 32
            (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
            _x = val5
            start = end
            end += 25
            (_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight,) = _get_struct_2dBd().unpack(str[start:end])
            val4.visibility_constraints.append(val5)
          _v393.constraints.append(val4)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v313.planner_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v313.planner_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v313.group_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v313.group_name = str[start:end]
        _x = _v313
        start = end
        end += 28
        (_x.num_planning_attempts, _x.allowed_planning_time, _x.max_velocity_scaling_factor, _x.max_acceleration_scaling_factor,) = _get_struct_i3d().unpack(str[start:end])
        start = end
        end += 8
        (val1.blend_radius,) = _get_struct_d().unpack(str[start:end])
        self.items.append(val1)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill

_struct_I = genpy.struct_I
def _get_struct_I():
    global _struct_I
    return _struct_I
_struct_2I = None
def _get_struct_2I():
    global _struct_2I
    if _struct_2I is None:
        _struct_2I = struct.Struct("<2I")
    return _struct_2I
_struct_2dBd = None
def _get_struct_2dBd():
    global _struct_2dBd
    if _struct_2dBd is None:
        _struct_2dBd = struct.Struct("<2dBd")
    return _struct_2dBd
_struct_2i = None
def _get_struct_2i():
    global _struct_2i
    if _struct_2i is None:
        _struct_2i = struct.Struct("<2i")
    return _struct_2i
_struct_3I = None
def _get_struct_3I():
    global _struct_3I
    if _struct_3I is None:
        _struct_3I = struct.Struct("<3I")
    return _struct_3I
_struct_3d = None
def _get_struct_3d():
    global _struct_3d
    if _struct_3d is None:
        _struct_3d = struct.Struct("<3d")
    return _struct_3d
_struct_4d = None
def _get_struct_4d():
    global _struct_4d
    if _struct_4d is None:
        _struct_4d = struct.Struct("<4d")
    return _struct_4d
_struct_B = None
def _get_struct_B():
    global _struct_B
    if _struct_B is None:
        _struct_B = struct.Struct("<B")
    return _struct_B
_struct_b = None
def _get_struct_b():
    global _struct_b
    if _struct_b is None:
        _struct_b = struct.Struct("<b")
    return _struct_b
_struct_d = None
def _get_struct_d():
    global _struct_d
    if _struct_d is None:
        _struct_d = struct.Struct("<d")
    return _struct_d
_struct_i = None
def _get_struct_i():
    global _struct_i
    if _struct_i is None:
        _struct_i = struct.Struct("<i")
    return _struct_i
_struct_i3d = None
def _get_struct_i3d():
    global _struct_i3d
    if _struct_i3d is None:
        _struct_i3d = struct.Struct("<i3d")
    return _struct_i3d
