# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from moveit_msgs/GetPositionIKRequest.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 GetPositionIKRequest(genpy.Message):
  _md5sum = "a67dc7e99d15c1dca32a77c22bc2d93b"
  _type = "moveit_msgs/GetPositionIKRequest"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """# A service call to carry out an inverse kinematics computation
# The inverse kinematics request
PositionIKRequest ik_request


================================================================================
MSG: moveit_msgs/PositionIKRequest
# A Position IK request message

# The name of the group which will be used to compute IK
# e.g. "right_arm", or "arms" - see IK specification for multiple-groups below
# Information from the SRDF will be used to automatically determine which link 
# to solve IK for, unless ik_link_name is also specified
string group_name

# A RobotState consisting of hint/seed positions for the IK computation and positions 
# for all the other joints in the robot. Additional state information provided here is 
# used to specify starting positions for other joints/links on the robot.  
# This state MUST contain state for all joints to be used by the IK solver
# to compute IK. The list of joints that the IK solver deals with can be 
# found using the SRDF for the corresponding group
moveit_msgs/RobotState robot_state

# A set of constraints that the IK must obey; by default, this set of constraints is empty
Constraints constraints

# Find an IK solution that avoids collisions. By default, this is false
bool avoid_collisions

# (OPTIONAL) The name of the link for which we are computing IK
# If not specified, the link name will be inferred from a combination 
# of the group name and the SRDF. If any values are specified for ik_link_names,
# this value is ignored
string ik_link_name

# The stamped pose of the link, when the IK solver computes the joint values
# for all the joints in a group. This value is ignored if pose_stamped_vector
# has any elements specified.
geometry_msgs/PoseStamped pose_stamped

# Multi-group parameters

# (OPTIONAL) The names of the links for which we are computing IK
# If not specified, the link name will be inferred from a combination 
# of the group name and the SRDF
string[] ik_link_names

# (OPTIONAL) The (stamped) poses of the links we are computing IK for (when a group has more than one end effector)
# e.g. The "arms" group might consist of both the "right_arm" and the "left_arm"
# The order of the groups referred to is the same as the order setup in the SRDF
geometry_msgs/PoseStamped[] pose_stamped_vector

# Maximum allowed time for IK calculation
duration timeout

# Maximum number of IK attempts (if using random seeds; leave as 0 for the default value specified on the param server to be used)
int32 attempts


================================================================================
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: 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: 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/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: 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
"""
  __slots__ = ['ik_request']
  _slot_types = ['moveit_msgs/PositionIKRequest']

  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:
       ik_request

    :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(GetPositionIKRequest, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.ik_request is None:
        self.ik_request = moveit_msgs.msg.PositionIKRequest()
    else:
      self.ik_request = moveit_msgs.msg.PositionIKRequest()

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

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      _x = self.ik_request.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 = self
      buff.write(_get_struct_3I().pack(_x.ik_request.robot_state.joint_state.header.seq, _x.ik_request.robot_state.joint_state.header.stamp.secs, _x.ik_request.robot_state.joint_state.header.stamp.nsecs))
      _x = self.ik_request.robot_state.joint_state.header.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(self.ik_request.robot_state.joint_state.name)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.joint_state.name:
        length = len(val1)
        if python3 or type(val1) == unicode:
          val1 = val1.encode('utf-8')
          length = len(val1)
        buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
      length = len(self.ik_request.robot_state.joint_state.position)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(struct.Struct(pattern).pack(*self.ik_request.robot_state.joint_state.position))
      length = len(self.ik_request.robot_state.joint_state.velocity)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(struct.Struct(pattern).pack(*self.ik_request.robot_state.joint_state.velocity))
      length = len(self.ik_request.robot_state.joint_state.effort)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(struct.Struct(pattern).pack(*self.ik_request.robot_state.joint_state.effort))
      _x = self
      buff.write(_get_struct_3I().pack(_x.ik_request.robot_state.multi_dof_joint_state.header.seq, _x.ik_request.robot_state.multi_dof_joint_state.header.stamp.secs, _x.ik_request.robot_state.multi_dof_joint_state.header.stamp.nsecs))
      _x = self.ik_request.robot_state.multi_dof_joint_state.header.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(self.ik_request.robot_state.multi_dof_joint_state.joint_names)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.multi_dof_joint_state.joint_names:
        length = len(val1)
        if python3 or type(val1) == unicode:
          val1 = val1.encode('utf-8')
          length = len(val1)
        buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
      length = len(self.ik_request.robot_state.multi_dof_joint_state.transforms)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.multi_dof_joint_state.transforms:
        _v1 = val1.translation
        _x = _v1
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v2 = val1.rotation
        _x = _v2
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
      length = len(self.ik_request.robot_state.multi_dof_joint_state.twist)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.multi_dof_joint_state.twist:
        _v3 = val1.linear
        _x = _v3
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v4 = val1.angular
        _x = _v4
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
      length = len(self.ik_request.robot_state.multi_dof_joint_state.wrench)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.multi_dof_joint_state.wrench:
        _v5 = val1.force
        _x = _v5
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v6 = val1.torque
        _x = _v6
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
      length = len(self.ik_request.robot_state.attached_collision_objects)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.attached_collision_objects:
        _x = val1.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))
        _v7 = val1.object
        _v8 = _v7.header
        _x = _v8.seq
        buff.write(_get_struct_I().pack(_x))
        _v9 = _v8.stamp
        _x = _v9
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v8.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 = _v7.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))
        _v10 = _v7.type
        _x = _v10.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 = _v10.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(_v7.primitives)
        buff.write(_struct_I.pack(length))
        for val3 in _v7.primitives:
          _x = val3.type
          buff.write(_get_struct_B().pack(_x))
          length = len(val3.dimensions)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(struct.Struct(pattern).pack(*val3.dimensions))
        length = len(_v7.primitive_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v7.primitive_poses:
          _v11 = val3.position
          _x = _v11
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v12 = val3.orientation
          _x = _v12
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v7.meshes)
        buff.write(_struct_I.pack(length))
        for val3 in _v7.meshes:
          length = len(val3.triangles)
          buff.write(_struct_I.pack(length))
          for val4 in val3.triangles:
            buff.write(_get_struct_3I().pack(*val4.vertex_indices))
          length = len(val3.vertices)
          buff.write(_struct_I.pack(length))
          for val4 in val3.vertices:
            _x = val4
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        length = len(_v7.mesh_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v7.mesh_poses:
          _v13 = val3.position
          _x = _v13
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v14 = val3.orientation
          _x = _v14
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v7.planes)
        buff.write(_struct_I.pack(length))
        for val3 in _v7.planes:
          buff.write(_get_struct_4d().pack(*val3.coef))
        length = len(_v7.plane_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v7.plane_poses:
          _v15 = val3.position
          _x = _v15
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v16 = val3.orientation
          _x = _v16
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = _v7.operation
        buff.write(_get_struct_b().pack(_x))
        length = len(val1.touch_links)
        buff.write(_struct_I.pack(length))
        for val2 in val1.touch_links:
          length = len(val2)
          if python3 or type(val2) == unicode:
            val2 = val2.encode('utf-8')
            length = len(val2)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val2))
        _v17 = val1.detach_posture
        _v18 = _v17.header
        _x = _v18.seq
        buff.write(_get_struct_I().pack(_x))
        _v19 = _v18.stamp
        _x = _v19
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v18.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(_v17.joint_names)
        buff.write(_struct_I.pack(length))
        for val3 in _v17.joint_names:
          length = len(val3)
          if python3 or type(val3) == unicode:
            val3 = val3.encode('utf-8')
            length = len(val3)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val3))
        length = len(_v17.points)
        buff.write(_struct_I.pack(length))
        for val3 in _v17.points:
          length = len(val3.positions)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(struct.Struct(pattern).pack(*val3.positions))
          length = len(val3.velocities)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(struct.Struct(pattern).pack(*val3.velocities))
          length = len(val3.accelerations)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(struct.Struct(pattern).pack(*val3.accelerations))
          length = len(val3.effort)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(struct.Struct(pattern).pack(*val3.effort))
          _v20 = val3.time_from_start
          _x = _v20
          buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs))
        _x = val1.weight
        buff.write(_get_struct_d().pack(_x))
      _x = self.ik_request.robot_state.is_diff
      buff.write(_get_struct_B().pack(_x))
      _x = self.ik_request.constraints.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(self.ik_request.constraints.joint_constraints)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.constraints.joint_constraints:
        _x = val1.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 = val1
        buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
      length = len(self.ik_request.constraints.position_constraints)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.constraints.position_constraints:
        _v21 = val1.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 = val1.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))
        _v23 = val1.target_point_offset
        _x = _v23
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v24 = val1.constraint_region
        length = len(_v24.primitives)
        buff.write(_struct_I.pack(length))
        for val3 in _v24.primitives:
          _x = val3.type
          buff.write(_get_struct_B().pack(_x))
          length = len(val3.dimensions)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(struct.Struct(pattern).pack(*val3.dimensions))
        length = len(_v24.primitive_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v24.primitive_poses:
          _v25 = val3.position
          _x = _v25
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v26 = val3.orientation
          _x = _v26
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v24.meshes)
        buff.write(_struct_I.pack(length))
        for val3 in _v24.meshes:
          length = len(val3.triangles)
          buff.write(_struct_I.pack(length))
          for val4 in val3.triangles:
            buff.write(_get_struct_3I().pack(*val4.vertex_indices))
          length = len(val3.vertices)
          buff.write(_struct_I.pack(length))
          for val4 in val3.vertices:
            _x = val4
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        length = len(_v24.mesh_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v24.mesh_poses:
          _v27 = val3.position
          _x = _v27
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v28 = val3.orientation
          _x = _v28
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = val1.weight
        buff.write(_get_struct_d().pack(_x))
      length = len(self.ik_request.constraints.orientation_constraints)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.constraints.orientation_constraints:
        _v29 = val1.header
        _x = _v29.seq
        buff.write(_get_struct_I().pack(_x))
        _v30 = _v29.stamp
        _x = _v30
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v29.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))
        _v31 = val1.orientation
        _x = _v31
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = val1.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 = val1
        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(self.ik_request.constraints.visibility_constraints)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.constraints.visibility_constraints:
        _x = val1.target_radius
        buff.write(_get_struct_d().pack(_x))
        _v32 = val1.target_pose
        _v33 = _v32.header
        _x = _v33.seq
        buff.write(_get_struct_I().pack(_x))
        _v34 = _v33.stamp
        _x = _v34
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v33.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))
        _v35 = _v32.pose
        _v36 = _v35.position
        _x = _v36
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v37 = _v35.orientation
        _x = _v37
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = val1.cone_sides
        buff.write(_get_struct_i().pack(_x))
        _v38 = val1.sensor_pose
        _v39 = _v38.header
        _x = _v39.seq
        buff.write(_get_struct_I().pack(_x))
        _v40 = _v39.stamp
        _x = _v40
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v39.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))
        _v41 = _v38.pose
        _v42 = _v41.position
        _x = _v42
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v43 = _v41.orientation
        _x = _v43
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = val1
        buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight))
      _x = self.ik_request.avoid_collisions
      buff.write(_get_struct_B().pack(_x))
      _x = self.ik_request.ik_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 = self
      buff.write(_get_struct_3I().pack(_x.ik_request.pose_stamped.header.seq, _x.ik_request.pose_stamped.header.stamp.secs, _x.ik_request.pose_stamped.header.stamp.nsecs))
      _x = self.ik_request.pose_stamped.header.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 = self
      buff.write(_get_struct_7d().pack(_x.ik_request.pose_stamped.pose.position.x, _x.ik_request.pose_stamped.pose.position.y, _x.ik_request.pose_stamped.pose.position.z, _x.ik_request.pose_stamped.pose.orientation.x, _x.ik_request.pose_stamped.pose.orientation.y, _x.ik_request.pose_stamped.pose.orientation.z, _x.ik_request.pose_stamped.pose.orientation.w))
      length = len(self.ik_request.ik_link_names)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.ik_link_names:
        length = len(val1)
        if python3 or type(val1) == unicode:
          val1 = val1.encode('utf-8')
          length = len(val1)
        buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
      length = len(self.ik_request.pose_stamped_vector)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.pose_stamped_vector:
        _v44 = val1.header
        _x = _v44.seq
        buff.write(_get_struct_I().pack(_x))
        _v45 = _v44.stamp
        _x = _v45
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v44.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))
        _v46 = val1.pose
        _v47 = _v46.position
        _x = _v47
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v48 = _v46.orientation
        _x = _v48
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
      _x = self
      buff.write(_get_struct_3i().pack(_x.ik_request.timeout.secs, _x.ik_request.timeout.nsecs, _x.ik_request.attempts))
    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.ik_request is None:
        self.ik_request = moveit_msgs.msg.PositionIKRequest()
      end = 0
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.group_name = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.group_name = str[start:end]
      _x = self
      start = end
      end += 12
      (_x.ik_request.robot_state.joint_state.header.seq, _x.ik_request.robot_state.joint_state.header.stamp.secs, _x.ik_request.robot_state.joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.robot_state.joint_state.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.robot_state.joint_state.header.frame_id = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.joint_state.name = []
      for i in range(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1 = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1 = str[start:end]
        self.ik_request.robot_state.joint_state.name.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      s = struct.Struct(pattern)
      end += s.size
      self.ik_request.robot_state.joint_state.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
      self.ik_request.robot_state.joint_state.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
      self.ik_request.robot_state.joint_state.effort = s.unpack(str[start:end])
      _x = self
      start = end
      end += 12
      (_x.ik_request.robot_state.multi_dof_joint_state.header.seq, _x.ik_request.robot_state.multi_dof_joint_state.header.stamp.secs, _x.ik_request.robot_state.multi_dof_joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.robot_state.multi_dof_joint_state.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.robot_state.multi_dof_joint_state.header.frame_id = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.multi_dof_joint_state.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:
          val1 = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1 = str[start:end]
        self.ik_request.robot_state.multi_dof_joint_state.joint_names.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.multi_dof_joint_state.transforms = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Transform()
        _v49 = val1.translation
        _x = _v49
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v50 = val1.rotation
        _x = _v50
        start = end
        end += 32
        (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
        self.ik_request.robot_state.multi_dof_joint_state.transforms.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.multi_dof_joint_state.twist = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Twist()
        _v51 = val1.linear
        _x = _v51
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v52 = val1.angular
        _x = _v52
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        self.ik_request.robot_state.multi_dof_joint_state.twist.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.multi_dof_joint_state.wrench = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Wrench()
        _v53 = val1.force
        _x = _v53
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v54 = val1.torque
        _x = _v54
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        self.ik_request.robot_state.multi_dof_joint_state.wrench.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.attached_collision_objects = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.AttachedCollisionObject()
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.link_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.link_name = str[start:end]
        _v55 = val1.object
        _v56 = _v55.header
        start = end
        end += 4
        (_v56.seq,) = _get_struct_I().unpack(str[start:end])
        _v57 = _v56.stamp
        _x = _v57
        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:
          _v56.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v56.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v55.id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v55.id = str[start:end]
        _v58 = _v55.type
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v58.key = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v58.key = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v58.db = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v58.db = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v55.primitives = []
        for i in range(0, length):
          val3 = shape_msgs.msg.SolidPrimitive()
          start = end
          end += 1
          (val3.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
          val3.dimensions = s.unpack(str[start:end])
          _v55.primitives.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v55.primitive_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v59 = val3.position
          _x = _v59
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v60 = val3.orientation
          _x = _v60
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v55.primitive_poses.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v55.meshes = []
        for i in range(0, length):
          val3 = shape_msgs.msg.Mesh()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.triangles = []
          for i in range(0, length):
            val4 = shape_msgs.msg.MeshTriangle()
            start = end
            end += 12
            val4.vertex_indices = _get_struct_3I().unpack(str[start:end])
            val3.triangles.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.vertices = []
          for i in range(0, length):
            val4 = geometry_msgs.msg.Point()
            _x = val4
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            val3.vertices.append(val4)
          _v55.meshes.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v55.mesh_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v61 = val3.position
          _x = _v61
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v62 = val3.orientation
          _x = _v62
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v55.mesh_poses.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v55.planes = []
        for i in range(0, length):
          val3 = shape_msgs.msg.Plane()
          start = end
          end += 32
          val3.coef = _get_struct_4d().unpack(str[start:end])
          _v55.planes.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v55.plane_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v63 = val3.position
          _x = _v63
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v64 = val3.orientation
          _x = _v64
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v55.plane_poses.append(val3)
        start = end
        end += 1
        (_v55.operation,) = _get_struct_b().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        val1.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:
            val2 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val2 = str[start:end]
          val1.touch_links.append(val2)
        _v65 = val1.detach_posture
        _v66 = _v65.header
        start = end
        end += 4
        (_v66.seq,) = _get_struct_I().unpack(str[start:end])
        _v67 = _v66.stamp
        _x = _v67
        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:
          _v66.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v66.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v65.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:
            val3 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val3 = str[start:end]
          _v65.joint_names.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v65.points = []
        for i in range(0, length):
          val3 = 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
          val3.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
          val3.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
          val3.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
          val3.effort = s.unpack(str[start:end])
          _v68 = val3.time_from_start
          _x = _v68
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end])
          _v65.points.append(val3)
        start = end
        end += 8
        (val1.weight,) = _get_struct_d().unpack(str[start:end])
        self.ik_request.robot_state.attached_collision_objects.append(val1)
      start = end
      end += 1
      (self.ik_request.robot_state.is_diff,) = _get_struct_B().unpack(str[start:end])
      self.ik_request.robot_state.is_diff = bool(self.ik_request.robot_state.is_diff)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.constraints.name = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.constraints.name = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.constraints.joint_constraints = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.JointConstraint()
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.joint_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.joint_name = str[start:end]
        _x = val1
        start = end
        end += 32
        (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end])
        self.ik_request.constraints.joint_constraints.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.constraints.position_constraints = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.PositionConstraint()
        _v69 = val1.header
        start = end
        end += 4
        (_v69.seq,) = _get_struct_I().unpack(str[start:end])
        _v70 = _v69.stamp
        _x = _v70
        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:
          _v69.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v69.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.link_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.link_name = str[start:end]
        _v71 = val1.target_point_offset
        _x = _v71
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v72 = val1.constraint_region
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v72.primitives = []
        for i in range(0, length):
          val3 = shape_msgs.msg.SolidPrimitive()
          start = end
          end += 1
          (val3.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
          val3.dimensions = s.unpack(str[start:end])
          _v72.primitives.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v72.primitive_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v73 = val3.position
          _x = _v73
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v74 = val3.orientation
          _x = _v74
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v72.primitive_poses.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v72.meshes = []
        for i in range(0, length):
          val3 = shape_msgs.msg.Mesh()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.triangles = []
          for i in range(0, length):
            val4 = shape_msgs.msg.MeshTriangle()
            start = end
            end += 12
            val4.vertex_indices = _get_struct_3I().unpack(str[start:end])
            val3.triangles.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.vertices = []
          for i in range(0, length):
            val4 = geometry_msgs.msg.Point()
            _x = val4
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            val3.vertices.append(val4)
          _v72.meshes.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v72.mesh_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v75 = val3.position
          _x = _v75
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v76 = val3.orientation
          _x = _v76
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v72.mesh_poses.append(val3)
        start = end
        end += 8
        (val1.weight,) = _get_struct_d().unpack(str[start:end])
        self.ik_request.constraints.position_constraints.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.constraints.orientation_constraints = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.OrientationConstraint()
        _v77 = val1.header
        start = end
        end += 4
        (_v77.seq,) = _get_struct_I().unpack(str[start:end])
        _v78 = _v77.stamp
        _x = _v78
        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:
          _v77.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v77.frame_id = str[start:end]
        _v79 = val1.orientation
        _x = _v79
        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:
          val1.link_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.link_name = str[start:end]
        _x = val1
        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])
        self.ik_request.constraints.orientation_constraints.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.constraints.visibility_constraints = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.VisibilityConstraint()
        start = end
        end += 8
        (val1.target_radius,) = _get_struct_d().unpack(str[start:end])
        _v80 = val1.target_pose
        _v81 = _v80.header
        start = end
        end += 4
        (_v81.seq,) = _get_struct_I().unpack(str[start:end])
        _v82 = _v81.stamp
        _x = _v82
        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:
          _v81.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v81.frame_id = str[start:end]
        _v83 = _v80.pose
        _v84 = _v83.position
        _x = _v84
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v85 = _v83.orientation
        _x = _v85
        start = end
        end += 32
        (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
        start = end
        end += 4
        (val1.cone_sides,) = _get_struct_i().unpack(str[start:end])
        _v86 = val1.sensor_pose
        _v87 = _v86.header
        start = end
        end += 4
        (_v87.seq,) = _get_struct_I().unpack(str[start:end])
        _v88 = _v87.stamp
        _x = _v88
        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:
          _v87.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v87.frame_id = str[start:end]
        _v89 = _v86.pose
        _v90 = _v89.position
        _x = _v90
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v91 = _v89.orientation
        _x = _v91
        start = end
        end += 32
        (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
        _x = val1
        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])
        self.ik_request.constraints.visibility_constraints.append(val1)
      start = end
      end += 1
      (self.ik_request.avoid_collisions,) = _get_struct_B().unpack(str[start:end])
      self.ik_request.avoid_collisions = bool(self.ik_request.avoid_collisions)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.ik_link_name = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.ik_link_name = str[start:end]
      _x = self
      start = end
      end += 12
      (_x.ik_request.pose_stamped.header.seq, _x.ik_request.pose_stamped.header.stamp.secs, _x.ik_request.pose_stamped.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.pose_stamped.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.pose_stamped.header.frame_id = str[start:end]
      _x = self
      start = end
      end += 56
      (_x.ik_request.pose_stamped.pose.position.x, _x.ik_request.pose_stamped.pose.position.y, _x.ik_request.pose_stamped.pose.position.z, _x.ik_request.pose_stamped.pose.orientation.x, _x.ik_request.pose_stamped.pose.orientation.y, _x.ik_request.pose_stamped.pose.orientation.z, _x.ik_request.pose_stamped.pose.orientation.w,) = _get_struct_7d().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.ik_link_names = []
      for i in range(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1 = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1 = str[start:end]
        self.ik_request.ik_link_names.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.pose_stamped_vector = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.PoseStamped()
        _v92 = val1.header
        start = end
        end += 4
        (_v92.seq,) = _get_struct_I().unpack(str[start:end])
        _v93 = _v92.stamp
        _x = _v93
        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:
          _v92.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v92.frame_id = str[start:end]
        _v94 = val1.pose
        _v95 = _v94.position
        _x = _v95
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v96 = _v94.orientation
        _x = _v96
        start = end
        end += 32
        (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
        self.ik_request.pose_stamped_vector.append(val1)
      _x = self
      start = end
      end += 12
      (_x.ik_request.timeout.secs, _x.ik_request.timeout.nsecs, _x.ik_request.attempts,) = _get_struct_3i().unpack(str[start:end])
      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:
      _x = self.ik_request.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 = self
      buff.write(_get_struct_3I().pack(_x.ik_request.robot_state.joint_state.header.seq, _x.ik_request.robot_state.joint_state.header.stamp.secs, _x.ik_request.robot_state.joint_state.header.stamp.nsecs))
      _x = self.ik_request.robot_state.joint_state.header.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(self.ik_request.robot_state.joint_state.name)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.joint_state.name:
        length = len(val1)
        if python3 or type(val1) == unicode:
          val1 = val1.encode('utf-8')
          length = len(val1)
        buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
      length = len(self.ik_request.robot_state.joint_state.position)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(self.ik_request.robot_state.joint_state.position.tostring())
      length = len(self.ik_request.robot_state.joint_state.velocity)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(self.ik_request.robot_state.joint_state.velocity.tostring())
      length = len(self.ik_request.robot_state.joint_state.effort)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(self.ik_request.robot_state.joint_state.effort.tostring())
      _x = self
      buff.write(_get_struct_3I().pack(_x.ik_request.robot_state.multi_dof_joint_state.header.seq, _x.ik_request.robot_state.multi_dof_joint_state.header.stamp.secs, _x.ik_request.robot_state.multi_dof_joint_state.header.stamp.nsecs))
      _x = self.ik_request.robot_state.multi_dof_joint_state.header.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(self.ik_request.robot_state.multi_dof_joint_state.joint_names)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.multi_dof_joint_state.joint_names:
        length = len(val1)
        if python3 or type(val1) == unicode:
          val1 = val1.encode('utf-8')
          length = len(val1)
        buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
      length = len(self.ik_request.robot_state.multi_dof_joint_state.transforms)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.multi_dof_joint_state.transforms:
        _v97 = val1.translation
        _x = _v97
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v98 = val1.rotation
        _x = _v98
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
      length = len(self.ik_request.robot_state.multi_dof_joint_state.twist)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.multi_dof_joint_state.twist:
        _v99 = val1.linear
        _x = _v99
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v100 = val1.angular
        _x = _v100
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
      length = len(self.ik_request.robot_state.multi_dof_joint_state.wrench)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.multi_dof_joint_state.wrench:
        _v101 = val1.force
        _x = _v101
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v102 = val1.torque
        _x = _v102
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
      length = len(self.ik_request.robot_state.attached_collision_objects)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.robot_state.attached_collision_objects:
        _x = val1.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))
        _v103 = val1.object
        _v104 = _v103.header
        _x = _v104.seq
        buff.write(_get_struct_I().pack(_x))
        _v105 = _v104.stamp
        _x = _v105
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v104.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 = _v103.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))
        _v106 = _v103.type
        _x = _v106.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 = _v106.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(_v103.primitives)
        buff.write(_struct_I.pack(length))
        for val3 in _v103.primitives:
          _x = val3.type
          buff.write(_get_struct_B().pack(_x))
          length = len(val3.dimensions)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(val3.dimensions.tostring())
        length = len(_v103.primitive_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v103.primitive_poses:
          _v107 = val3.position
          _x = _v107
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v108 = val3.orientation
          _x = _v108
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v103.meshes)
        buff.write(_struct_I.pack(length))
        for val3 in _v103.meshes:
          length = len(val3.triangles)
          buff.write(_struct_I.pack(length))
          for val4 in val3.triangles:
            buff.write(val4.vertex_indices.tostring())
          length = len(val3.vertices)
          buff.write(_struct_I.pack(length))
          for val4 in val3.vertices:
            _x = val4
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        length = len(_v103.mesh_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v103.mesh_poses:
          _v109 = val3.position
          _x = _v109
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v110 = val3.orientation
          _x = _v110
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v103.planes)
        buff.write(_struct_I.pack(length))
        for val3 in _v103.planes:
          buff.write(val3.coef.tostring())
        length = len(_v103.plane_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v103.plane_poses:
          _v111 = val3.position
          _x = _v111
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v112 = val3.orientation
          _x = _v112
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = _v103.operation
        buff.write(_get_struct_b().pack(_x))
        length = len(val1.touch_links)
        buff.write(_struct_I.pack(length))
        for val2 in val1.touch_links:
          length = len(val2)
          if python3 or type(val2) == unicode:
            val2 = val2.encode('utf-8')
            length = len(val2)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val2))
        _v113 = val1.detach_posture
        _v114 = _v113.header
        _x = _v114.seq
        buff.write(_get_struct_I().pack(_x))
        _v115 = _v114.stamp
        _x = _v115
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v114.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(_v113.joint_names)
        buff.write(_struct_I.pack(length))
        for val3 in _v113.joint_names:
          length = len(val3)
          if python3 or type(val3) == unicode:
            val3 = val3.encode('utf-8')
            length = len(val3)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val3))
        length = len(_v113.points)
        buff.write(_struct_I.pack(length))
        for val3 in _v113.points:
          length = len(val3.positions)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(val3.positions.tostring())
          length = len(val3.velocities)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(val3.velocities.tostring())
          length = len(val3.accelerations)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(val3.accelerations.tostring())
          length = len(val3.effort)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(val3.effort.tostring())
          _v116 = val3.time_from_start
          _x = _v116
          buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs))
        _x = val1.weight
        buff.write(_get_struct_d().pack(_x))
      _x = self.ik_request.robot_state.is_diff
      buff.write(_get_struct_B().pack(_x))
      _x = self.ik_request.constraints.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(self.ik_request.constraints.joint_constraints)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.constraints.joint_constraints:
        _x = val1.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 = val1
        buff.write(_get_struct_4d().pack(_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight))
      length = len(self.ik_request.constraints.position_constraints)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.constraints.position_constraints:
        _v117 = val1.header
        _x = _v117.seq
        buff.write(_get_struct_I().pack(_x))
        _v118 = _v117.stamp
        _x = _v118
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v117.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 = val1.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))
        _v119 = val1.target_point_offset
        _x = _v119
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v120 = val1.constraint_region
        length = len(_v120.primitives)
        buff.write(_struct_I.pack(length))
        for val3 in _v120.primitives:
          _x = val3.type
          buff.write(_get_struct_B().pack(_x))
          length = len(val3.dimensions)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(val3.dimensions.tostring())
        length = len(_v120.primitive_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v120.primitive_poses:
          _v121 = val3.position
          _x = _v121
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v122 = val3.orientation
          _x = _v122
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v120.meshes)
        buff.write(_struct_I.pack(length))
        for val3 in _v120.meshes:
          length = len(val3.triangles)
          buff.write(_struct_I.pack(length))
          for val4 in val3.triangles:
            buff.write(val4.vertex_indices.tostring())
          length = len(val3.vertices)
          buff.write(_struct_I.pack(length))
          for val4 in val3.vertices:
            _x = val4
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        length = len(_v120.mesh_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v120.mesh_poses:
          _v123 = val3.position
          _x = _v123
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v124 = val3.orientation
          _x = _v124
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = val1.weight
        buff.write(_get_struct_d().pack(_x))
      length = len(self.ik_request.constraints.orientation_constraints)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.constraints.orientation_constraints:
        _v125 = val1.header
        _x = _v125.seq
        buff.write(_get_struct_I().pack(_x))
        _v126 = _v125.stamp
        _x = _v126
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v125.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))
        _v127 = val1.orientation
        _x = _v127
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = val1.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 = val1
        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(self.ik_request.constraints.visibility_constraints)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.constraints.visibility_constraints:
        _x = val1.target_radius
        buff.write(_get_struct_d().pack(_x))
        _v128 = val1.target_pose
        _v129 = _v128.header
        _x = _v129.seq
        buff.write(_get_struct_I().pack(_x))
        _v130 = _v129.stamp
        _x = _v130
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v129.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))
        _v131 = _v128.pose
        _v132 = _v131.position
        _x = _v132
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v133 = _v131.orientation
        _x = _v133
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = val1.cone_sides
        buff.write(_get_struct_i().pack(_x))
        _v134 = val1.sensor_pose
        _v135 = _v134.header
        _x = _v135.seq
        buff.write(_get_struct_I().pack(_x))
        _v136 = _v135.stamp
        _x = _v136
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v135.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))
        _v137 = _v134.pose
        _v138 = _v137.position
        _x = _v138
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v139 = _v137.orientation
        _x = _v139
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = val1
        buff.write(_get_struct_2dBd().pack(_x.max_view_angle, _x.max_range_angle, _x.sensor_view_direction, _x.weight))
      _x = self.ik_request.avoid_collisions
      buff.write(_get_struct_B().pack(_x))
      _x = self.ik_request.ik_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 = self
      buff.write(_get_struct_3I().pack(_x.ik_request.pose_stamped.header.seq, _x.ik_request.pose_stamped.header.stamp.secs, _x.ik_request.pose_stamped.header.stamp.nsecs))
      _x = self.ik_request.pose_stamped.header.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 = self
      buff.write(_get_struct_7d().pack(_x.ik_request.pose_stamped.pose.position.x, _x.ik_request.pose_stamped.pose.position.y, _x.ik_request.pose_stamped.pose.position.z, _x.ik_request.pose_stamped.pose.orientation.x, _x.ik_request.pose_stamped.pose.orientation.y, _x.ik_request.pose_stamped.pose.orientation.z, _x.ik_request.pose_stamped.pose.orientation.w))
      length = len(self.ik_request.ik_link_names)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.ik_link_names:
        length = len(val1)
        if python3 or type(val1) == unicode:
          val1 = val1.encode('utf-8')
          length = len(val1)
        buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
      length = len(self.ik_request.pose_stamped_vector)
      buff.write(_struct_I.pack(length))
      for val1 in self.ik_request.pose_stamped_vector:
        _v140 = val1.header
        _x = _v140.seq
        buff.write(_get_struct_I().pack(_x))
        _v141 = _v140.stamp
        _x = _v141
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v140.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))
        _v142 = val1.pose
        _v143 = _v142.position
        _x = _v143
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v144 = _v142.orientation
        _x = _v144
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
      _x = self
      buff.write(_get_struct_3i().pack(_x.ik_request.timeout.secs, _x.ik_request.timeout.nsecs, _x.ik_request.attempts))
    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.ik_request is None:
        self.ik_request = moveit_msgs.msg.PositionIKRequest()
      end = 0
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.group_name = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.group_name = str[start:end]
      _x = self
      start = end
      end += 12
      (_x.ik_request.robot_state.joint_state.header.seq, _x.ik_request.robot_state.joint_state.header.stamp.secs, _x.ik_request.robot_state.joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.robot_state.joint_state.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.robot_state.joint_state.header.frame_id = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.joint_state.name = []
      for i in range(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1 = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1 = str[start:end]
        self.ik_request.robot_state.joint_state.name.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      s = struct.Struct(pattern)
      end += s.size
      self.ik_request.robot_state.joint_state.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
      self.ik_request.robot_state.joint_state.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
      self.ik_request.robot_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
      _x = self
      start = end
      end += 12
      (_x.ik_request.robot_state.multi_dof_joint_state.header.seq, _x.ik_request.robot_state.multi_dof_joint_state.header.stamp.secs, _x.ik_request.robot_state.multi_dof_joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.robot_state.multi_dof_joint_state.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.robot_state.multi_dof_joint_state.header.frame_id = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.multi_dof_joint_state.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:
          val1 = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1 = str[start:end]
        self.ik_request.robot_state.multi_dof_joint_state.joint_names.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.multi_dof_joint_state.transforms = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Transform()
        _v145 = val1.translation
        _x = _v145
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v146 = val1.rotation
        _x = _v146
        start = end
        end += 32
        (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
        self.ik_request.robot_state.multi_dof_joint_state.transforms.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.multi_dof_joint_state.twist = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Twist()
        _v147 = val1.linear
        _x = _v147
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v148 = val1.angular
        _x = _v148
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        self.ik_request.robot_state.multi_dof_joint_state.twist.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.multi_dof_joint_state.wrench = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Wrench()
        _v149 = val1.force
        _x = _v149
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v150 = val1.torque
        _x = _v150
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        self.ik_request.robot_state.multi_dof_joint_state.wrench.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.robot_state.attached_collision_objects = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.AttachedCollisionObject()
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.link_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.link_name = str[start:end]
        _v151 = val1.object
        _v152 = _v151.header
        start = end
        end += 4
        (_v152.seq,) = _get_struct_I().unpack(str[start:end])
        _v153 = _v152.stamp
        _x = _v153
        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:
          _v152.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v152.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v151.id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v151.id = str[start:end]
        _v154 = _v151.type
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v154.key = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v154.key = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v154.db = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v154.db = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v151.primitives = []
        for i in range(0, length):
          val3 = shape_msgs.msg.SolidPrimitive()
          start = end
          end += 1
          (val3.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
          val3.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
          _v151.primitives.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v151.primitive_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v155 = val3.position
          _x = _v155
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v156 = val3.orientation
          _x = _v156
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v151.primitive_poses.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v151.meshes = []
        for i in range(0, length):
          val3 = shape_msgs.msg.Mesh()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.triangles = []
          for i in range(0, length):
            val4 = shape_msgs.msg.MeshTriangle()
            start = end
            end += 12
            val4.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3)
            val3.triangles.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.vertices = []
          for i in range(0, length):
            val4 = geometry_msgs.msg.Point()
            _x = val4
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            val3.vertices.append(val4)
          _v151.meshes.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v151.mesh_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v157 = val3.position
          _x = _v157
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v158 = val3.orientation
          _x = _v158
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v151.mesh_poses.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v151.planes = []
        for i in range(0, length):
          val3 = shape_msgs.msg.Plane()
          start = end
          end += 32
          val3.coef = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
          _v151.planes.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v151.plane_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v159 = val3.position
          _x = _v159
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v160 = val3.orientation
          _x = _v160
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v151.plane_poses.append(val3)
        start = end
        end += 1
        (_v151.operation,) = _get_struct_b().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        val1.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:
            val2 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val2 = str[start:end]
          val1.touch_links.append(val2)
        _v161 = val1.detach_posture
        _v162 = _v161.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])
        _v161.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:
            val3 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val3 = str[start:end]
          _v161.joint_names.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v161.points = []
        for i in range(0, length):
          val3 = 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
          val3.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
          val3.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
          val3.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
          val3.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
          _v164 = val3.time_from_start
          _x = _v164
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end])
          _v161.points.append(val3)
        start = end
        end += 8
        (val1.weight,) = _get_struct_d().unpack(str[start:end])
        self.ik_request.robot_state.attached_collision_objects.append(val1)
      start = end
      end += 1
      (self.ik_request.robot_state.is_diff,) = _get_struct_B().unpack(str[start:end])
      self.ik_request.robot_state.is_diff = bool(self.ik_request.robot_state.is_diff)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.constraints.name = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.constraints.name = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.constraints.joint_constraints = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.JointConstraint()
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.joint_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.joint_name = str[start:end]
        _x = val1
        start = end
        end += 32
        (_x.position, _x.tolerance_above, _x.tolerance_below, _x.weight,) = _get_struct_4d().unpack(str[start:end])
        self.ik_request.constraints.joint_constraints.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.constraints.position_constraints = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.PositionConstraint()
        _v165 = val1.header
        start = end
        end += 4
        (_v165.seq,) = _get_struct_I().unpack(str[start:end])
        _v166 = _v165.stamp
        _x = _v166
        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:
          _v165.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v165.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.link_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.link_name = str[start:end]
        _v167 = val1.target_point_offset
        _x = _v167
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v168 = val1.constraint_region
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v168.primitives = []
        for i in range(0, length):
          val3 = shape_msgs.msg.SolidPrimitive()
          start = end
          end += 1
          (val3.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
          val3.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
          _v168.primitives.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v168.primitive_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v169 = val3.position
          _x = _v169
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v170 = val3.orientation
          _x = _v170
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v168.primitive_poses.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v168.meshes = []
        for i in range(0, length):
          val3 = shape_msgs.msg.Mesh()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.triangles = []
          for i in range(0, length):
            val4 = shape_msgs.msg.MeshTriangle()
            start = end
            end += 12
            val4.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3)
            val3.triangles.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.vertices = []
          for i in range(0, length):
            val4 = geometry_msgs.msg.Point()
            _x = val4
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            val3.vertices.append(val4)
          _v168.meshes.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v168.mesh_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v171 = val3.position
          _x = _v171
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v172 = val3.orientation
          _x = _v172
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v168.mesh_poses.append(val3)
        start = end
        end += 8
        (val1.weight,) = _get_struct_d().unpack(str[start:end])
        self.ik_request.constraints.position_constraints.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.constraints.orientation_constraints = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.OrientationConstraint()
        _v173 = val1.header
        start = end
        end += 4
        (_v173.seq,) = _get_struct_I().unpack(str[start:end])
        _v174 = _v173.stamp
        _x = _v174
        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:
          _v173.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v173.frame_id = str[start:end]
        _v175 = val1.orientation
        _x = _v175
        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:
          val1.link_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.link_name = str[start:end]
        _x = val1
        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])
        self.ik_request.constraints.orientation_constraints.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.constraints.visibility_constraints = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.VisibilityConstraint()
        start = end
        end += 8
        (val1.target_radius,) = _get_struct_d().unpack(str[start:end])
        _v176 = val1.target_pose
        _v177 = _v176.header
        start = end
        end += 4
        (_v177.seq,) = _get_struct_I().unpack(str[start:end])
        _v178 = _v177.stamp
        _x = _v178
        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:
          _v177.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v177.frame_id = str[start:end]
        _v179 = _v176.pose
        _v180 = _v179.position
        _x = _v180
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v181 = _v179.orientation
        _x = _v181
        start = end
        end += 32
        (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
        start = end
        end += 4
        (val1.cone_sides,) = _get_struct_i().unpack(str[start:end])
        _v182 = val1.sensor_pose
        _v183 = _v182.header
        start = end
        end += 4
        (_v183.seq,) = _get_struct_I().unpack(str[start:end])
        _v184 = _v183.stamp
        _x = _v184
        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:
          _v183.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v183.frame_id = str[start:end]
        _v185 = _v182.pose
        _v186 = _v185.position
        _x = _v186
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v187 = _v185.orientation
        _x = _v187
        start = end
        end += 32
        (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
        _x = val1
        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])
        self.ik_request.constraints.visibility_constraints.append(val1)
      start = end
      end += 1
      (self.ik_request.avoid_collisions,) = _get_struct_B().unpack(str[start:end])
      self.ik_request.avoid_collisions = bool(self.ik_request.avoid_collisions)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.ik_link_name = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.ik_link_name = str[start:end]
      _x = self
      start = end
      end += 12
      (_x.ik_request.pose_stamped.header.seq, _x.ik_request.pose_stamped.header.stamp.secs, _x.ik_request.pose_stamped.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.ik_request.pose_stamped.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.ik_request.pose_stamped.header.frame_id = str[start:end]
      _x = self
      start = end
      end += 56
      (_x.ik_request.pose_stamped.pose.position.x, _x.ik_request.pose_stamped.pose.position.y, _x.ik_request.pose_stamped.pose.position.z, _x.ik_request.pose_stamped.pose.orientation.x, _x.ik_request.pose_stamped.pose.orientation.y, _x.ik_request.pose_stamped.pose.orientation.z, _x.ik_request.pose_stamped.pose.orientation.w,) = _get_struct_7d().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.ik_link_names = []
      for i in range(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1 = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1 = str[start:end]
        self.ik_request.ik_link_names.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.ik_request.pose_stamped_vector = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.PoseStamped()
        _v188 = val1.header
        start = end
        end += 4
        (_v188.seq,) = _get_struct_I().unpack(str[start:end])
        _v189 = _v188.stamp
        _x = _v189
        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:
          _v188.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v188.frame_id = str[start:end]
        _v190 = val1.pose
        _v191 = _v190.position
        _x = _v191
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v192 = _v190.orientation
        _x = _v192
        start = end
        end += 32
        (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
        self.ik_request.pose_stamped_vector.append(val1)
      _x = self
      start = end
      end += 12
      (_x.ik_request.timeout.secs, _x.ik_request.timeout.nsecs, _x.ik_request.attempts,) = _get_struct_3i().unpack(str[start:end])
      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_3i = None
def _get_struct_3i():
    global _struct_3i
    if _struct_3i is None:
        _struct_3i = struct.Struct("<3i")
    return _struct_3i
_struct_4d = None
def _get_struct_4d():
    global _struct_4d
    if _struct_4d is None:
        _struct_4d = struct.Struct("<4d")
    return _struct_4d
_struct_7d = None
def _get_struct_7d():
    global _struct_7d
    if _struct_7d is None:
        _struct_7d = struct.Struct("<7d")
    return _struct_7d
_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
# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from moveit_msgs/GetPositionIKResponse.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 GetPositionIKResponse(genpy.Message):
  _md5sum = "ad50fe5fa0ddb482909be313121ea148"
  _type = "moveit_msgs/GetPositionIKResponse"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """
# The returned solution 
# (in the same order as the list of joints specified in the IKRequest message)
RobotState solution

MoveItErrorCodes error_code


================================================================================
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: 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: 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/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: 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/MoveItErrorCodes
int32 val

# overall behavior
int32 SUCCESS=1
int32 FAILURE=99999

int32 PLANNING_FAILED=-1
int32 INVALID_MOTION_PLAN=-2
int32 MOTION_PLAN_INVALIDATED_BY_ENVIRONMENT_CHANGE=-3
int32 CONTROL_FAILED=-4
int32 UNABLE_TO_AQUIRE_SENSOR_DATA=-5
int32 TIMED_OUT=-6
int32 PREEMPTED=-7

# planning & kinematics request errors
int32 START_STATE_IN_COLLISION=-10
int32 START_STATE_VIOLATES_PATH_CONSTRAINTS=-11

int32 GOAL_IN_COLLISION=-12
int32 GOAL_VIOLATES_PATH_CONSTRAINTS=-13
int32 GOAL_CONSTRAINTS_VIOLATED=-14

int32 INVALID_GROUP_NAME=-15
int32 INVALID_GOAL_CONSTRAINTS=-16
int32 INVALID_ROBOT_STATE=-17
int32 INVALID_LINK_NAME=-18
int32 INVALID_OBJECT_NAME=-19

# system errors
int32 FRAME_TRANSFORM_FAILURE=-21
int32 COLLISION_CHECKING_UNAVAILABLE=-22
int32 ROBOT_STATE_STALE=-23
int32 SENSOR_INFO_STALE=-24

# kinematics errors
int32 NO_IK_SOLUTION=-31
"""
  __slots__ = ['solution','error_code']
  _slot_types = ['moveit_msgs/RobotState','moveit_msgs/MoveItErrorCodes']

  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:
       solution,error_code

    :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(GetPositionIKResponse, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.solution is None:
        self.solution = moveit_msgs.msg.RobotState()
      if self.error_code is None:
        self.error_code = moveit_msgs.msg.MoveItErrorCodes()
    else:
      self.solution = moveit_msgs.msg.RobotState()
      self.error_code = moveit_msgs.msg.MoveItErrorCodes()

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

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      _x = self
      buff.write(_get_struct_3I().pack(_x.solution.joint_state.header.seq, _x.solution.joint_state.header.stamp.secs, _x.solution.joint_state.header.stamp.nsecs))
      _x = self.solution.joint_state.header.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(self.solution.joint_state.name)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.joint_state.name:
        length = len(val1)
        if python3 or type(val1) == unicode:
          val1 = val1.encode('utf-8')
          length = len(val1)
        buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
      length = len(self.solution.joint_state.position)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(struct.Struct(pattern).pack(*self.solution.joint_state.position))
      length = len(self.solution.joint_state.velocity)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(struct.Struct(pattern).pack(*self.solution.joint_state.velocity))
      length = len(self.solution.joint_state.effort)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(struct.Struct(pattern).pack(*self.solution.joint_state.effort))
      _x = self
      buff.write(_get_struct_3I().pack(_x.solution.multi_dof_joint_state.header.seq, _x.solution.multi_dof_joint_state.header.stamp.secs, _x.solution.multi_dof_joint_state.header.stamp.nsecs))
      _x = self.solution.multi_dof_joint_state.header.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(self.solution.multi_dof_joint_state.joint_names)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.multi_dof_joint_state.joint_names:
        length = len(val1)
        if python3 or type(val1) == unicode:
          val1 = val1.encode('utf-8')
          length = len(val1)
        buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
      length = len(self.solution.multi_dof_joint_state.transforms)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.multi_dof_joint_state.transforms:
        _v193 = val1.translation
        _x = _v193
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v194 = val1.rotation
        _x = _v194
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
      length = len(self.solution.multi_dof_joint_state.twist)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.multi_dof_joint_state.twist:
        _v195 = val1.linear
        _x = _v195
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v196 = val1.angular
        _x = _v196
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
      length = len(self.solution.multi_dof_joint_state.wrench)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.multi_dof_joint_state.wrench:
        _v197 = val1.force
        _x = _v197
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v198 = val1.torque
        _x = _v198
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
      length = len(self.solution.attached_collision_objects)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.attached_collision_objects:
        _x = val1.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))
        _v199 = val1.object
        _v200 = _v199.header
        _x = _v200.seq
        buff.write(_get_struct_I().pack(_x))
        _v201 = _v200.stamp
        _x = _v201
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v200.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 = _v199.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))
        _v202 = _v199.type
        _x = _v202.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 = _v202.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(_v199.primitives)
        buff.write(_struct_I.pack(length))
        for val3 in _v199.primitives:
          _x = val3.type
          buff.write(_get_struct_B().pack(_x))
          length = len(val3.dimensions)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(struct.Struct(pattern).pack(*val3.dimensions))
        length = len(_v199.primitive_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v199.primitive_poses:
          _v203 = val3.position
          _x = _v203
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v204 = val3.orientation
          _x = _v204
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v199.meshes)
        buff.write(_struct_I.pack(length))
        for val3 in _v199.meshes:
          length = len(val3.triangles)
          buff.write(_struct_I.pack(length))
          for val4 in val3.triangles:
            buff.write(_get_struct_3I().pack(*val4.vertex_indices))
          length = len(val3.vertices)
          buff.write(_struct_I.pack(length))
          for val4 in val3.vertices:
            _x = val4
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        length = len(_v199.mesh_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v199.mesh_poses:
          _v205 = val3.position
          _x = _v205
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v206 = val3.orientation
          _x = _v206
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v199.planes)
        buff.write(_struct_I.pack(length))
        for val3 in _v199.planes:
          buff.write(_get_struct_4d().pack(*val3.coef))
        length = len(_v199.plane_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v199.plane_poses:
          _v207 = val3.position
          _x = _v207
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v208 = val3.orientation
          _x = _v208
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = _v199.operation
        buff.write(_get_struct_b().pack(_x))
        length = len(val1.touch_links)
        buff.write(_struct_I.pack(length))
        for val2 in val1.touch_links:
          length = len(val2)
          if python3 or type(val2) == unicode:
            val2 = val2.encode('utf-8')
            length = len(val2)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val2))
        _v209 = val1.detach_posture
        _v210 = _v209.header
        _x = _v210.seq
        buff.write(_get_struct_I().pack(_x))
        _v211 = _v210.stamp
        _x = _v211
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v210.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(_v209.joint_names)
        buff.write(_struct_I.pack(length))
        for val3 in _v209.joint_names:
          length = len(val3)
          if python3 or type(val3) == unicode:
            val3 = val3.encode('utf-8')
            length = len(val3)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val3))
        length = len(_v209.points)
        buff.write(_struct_I.pack(length))
        for val3 in _v209.points:
          length = len(val3.positions)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(struct.Struct(pattern).pack(*val3.positions))
          length = len(val3.velocities)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(struct.Struct(pattern).pack(*val3.velocities))
          length = len(val3.accelerations)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(struct.Struct(pattern).pack(*val3.accelerations))
          length = len(val3.effort)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(struct.Struct(pattern).pack(*val3.effort))
          _v212 = val3.time_from_start
          _x = _v212
          buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs))
        _x = val1.weight
        buff.write(_get_struct_d().pack(_x))
      _x = self
      buff.write(_get_struct_Bi().pack(_x.solution.is_diff, _x.error_code.val))
    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.solution is None:
        self.solution = moveit_msgs.msg.RobotState()
      if self.error_code is None:
        self.error_code = moveit_msgs.msg.MoveItErrorCodes()
      end = 0
      _x = self
      start = end
      end += 12
      (_x.solution.joint_state.header.seq, _x.solution.joint_state.header.stamp.secs, _x.solution.joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.solution.joint_state.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.solution.joint_state.header.frame_id = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.joint_state.name = []
      for i in range(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1 = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1 = str[start:end]
        self.solution.joint_state.name.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      s = struct.Struct(pattern)
      end += s.size
      self.solution.joint_state.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
      self.solution.joint_state.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
      self.solution.joint_state.effort = s.unpack(str[start:end])
      _x = self
      start = end
      end += 12
      (_x.solution.multi_dof_joint_state.header.seq, _x.solution.multi_dof_joint_state.header.stamp.secs, _x.solution.multi_dof_joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.solution.multi_dof_joint_state.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.solution.multi_dof_joint_state.header.frame_id = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.multi_dof_joint_state.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:
          val1 = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1 = str[start:end]
        self.solution.multi_dof_joint_state.joint_names.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.multi_dof_joint_state.transforms = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Transform()
        _v213 = val1.translation
        _x = _v213
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v214 = val1.rotation
        _x = _v214
        start = end
        end += 32
        (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
        self.solution.multi_dof_joint_state.transforms.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.multi_dof_joint_state.twist = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Twist()
        _v215 = val1.linear
        _x = _v215
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v216 = val1.angular
        _x = _v216
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        self.solution.multi_dof_joint_state.twist.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.multi_dof_joint_state.wrench = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Wrench()
        _v217 = val1.force
        _x = _v217
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v218 = val1.torque
        _x = _v218
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        self.solution.multi_dof_joint_state.wrench.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.attached_collision_objects = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.AttachedCollisionObject()
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.link_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.link_name = str[start:end]
        _v219 = val1.object
        _v220 = _v219.header
        start = end
        end += 4
        (_v220.seq,) = _get_struct_I().unpack(str[start:end])
        _v221 = _v220.stamp
        _x = _v221
        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:
          _v220.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v220.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v219.id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v219.id = str[start:end]
        _v222 = _v219.type
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v222.key = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v222.key = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v222.db = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v222.db = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v219.primitives = []
        for i in range(0, length):
          val3 = shape_msgs.msg.SolidPrimitive()
          start = end
          end += 1
          (val3.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
          val3.dimensions = s.unpack(str[start:end])
          _v219.primitives.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v219.primitive_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v223 = val3.position
          _x = _v223
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v224 = val3.orientation
          _x = _v224
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v219.primitive_poses.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v219.meshes = []
        for i in range(0, length):
          val3 = shape_msgs.msg.Mesh()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.triangles = []
          for i in range(0, length):
            val4 = shape_msgs.msg.MeshTriangle()
            start = end
            end += 12
            val4.vertex_indices = _get_struct_3I().unpack(str[start:end])
            val3.triangles.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.vertices = []
          for i in range(0, length):
            val4 = geometry_msgs.msg.Point()
            _x = val4
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            val3.vertices.append(val4)
          _v219.meshes.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v219.mesh_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v225 = val3.position
          _x = _v225
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v226 = val3.orientation
          _x = _v226
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v219.mesh_poses.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v219.planes = []
        for i in range(0, length):
          val3 = shape_msgs.msg.Plane()
          start = end
          end += 32
          val3.coef = _get_struct_4d().unpack(str[start:end])
          _v219.planes.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v219.plane_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v227 = val3.position
          _x = _v227
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v228 = val3.orientation
          _x = _v228
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v219.plane_poses.append(val3)
        start = end
        end += 1
        (_v219.operation,) = _get_struct_b().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        val1.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:
            val2 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val2 = str[start:end]
          val1.touch_links.append(val2)
        _v229 = val1.detach_posture
        _v230 = _v229.header
        start = end
        end += 4
        (_v230.seq,) = _get_struct_I().unpack(str[start:end])
        _v231 = _v230.stamp
        _x = _v231
        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:
          _v230.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v230.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v229.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:
            val3 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val3 = str[start:end]
          _v229.joint_names.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v229.points = []
        for i in range(0, length):
          val3 = 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
          val3.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
          val3.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
          val3.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
          val3.effort = s.unpack(str[start:end])
          _v232 = val3.time_from_start
          _x = _v232
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end])
          _v229.points.append(val3)
        start = end
        end += 8
        (val1.weight,) = _get_struct_d().unpack(str[start:end])
        self.solution.attached_collision_objects.append(val1)
      _x = self
      start = end
      end += 5
      (_x.solution.is_diff, _x.error_code.val,) = _get_struct_Bi().unpack(str[start:end])
      self.solution.is_diff = bool(self.solution.is_diff)
      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:
      _x = self
      buff.write(_get_struct_3I().pack(_x.solution.joint_state.header.seq, _x.solution.joint_state.header.stamp.secs, _x.solution.joint_state.header.stamp.nsecs))
      _x = self.solution.joint_state.header.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(self.solution.joint_state.name)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.joint_state.name:
        length = len(val1)
        if python3 or type(val1) == unicode:
          val1 = val1.encode('utf-8')
          length = len(val1)
        buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
      length = len(self.solution.joint_state.position)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(self.solution.joint_state.position.tostring())
      length = len(self.solution.joint_state.velocity)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(self.solution.joint_state.velocity.tostring())
      length = len(self.solution.joint_state.effort)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(self.solution.joint_state.effort.tostring())
      _x = self
      buff.write(_get_struct_3I().pack(_x.solution.multi_dof_joint_state.header.seq, _x.solution.multi_dof_joint_state.header.stamp.secs, _x.solution.multi_dof_joint_state.header.stamp.nsecs))
      _x = self.solution.multi_dof_joint_state.header.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(self.solution.multi_dof_joint_state.joint_names)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.multi_dof_joint_state.joint_names:
        length = len(val1)
        if python3 or type(val1) == unicode:
          val1 = val1.encode('utf-8')
          length = len(val1)
        buff.write(struct.Struct('<I%ss'%length).pack(length, val1))
      length = len(self.solution.multi_dof_joint_state.transforms)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.multi_dof_joint_state.transforms:
        _v233 = val1.translation
        _x = _v233
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v234 = val1.rotation
        _x = _v234
        buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
      length = len(self.solution.multi_dof_joint_state.twist)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.multi_dof_joint_state.twist:
        _v235 = val1.linear
        _x = _v235
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v236 = val1.angular
        _x = _v236
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
      length = len(self.solution.multi_dof_joint_state.wrench)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.multi_dof_joint_state.wrench:
        _v237 = val1.force
        _x = _v237
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        _v238 = val1.torque
        _x = _v238
        buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
      length = len(self.solution.attached_collision_objects)
      buff.write(_struct_I.pack(length))
      for val1 in self.solution.attached_collision_objects:
        _x = val1.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))
        _v239 = val1.object
        _v240 = _v239.header
        _x = _v240.seq
        buff.write(_get_struct_I().pack(_x))
        _v241 = _v240.stamp
        _x = _v241
        buff.write(_get_struct_2I().pack(_x.secs, _x.nsecs))
        _x = _v240.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 = _v239.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))
        _v242 = _v239.type
        _x = _v242.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 = _v242.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(_v239.primitives)
        buff.write(_struct_I.pack(length))
        for val3 in _v239.primitives:
          _x = val3.type
          buff.write(_get_struct_B().pack(_x))
          length = len(val3.dimensions)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(val3.dimensions.tostring())
        length = len(_v239.primitive_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v239.primitive_poses:
          _v243 = val3.position
          _x = _v243
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v244 = val3.orientation
          _x = _v244
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v239.meshes)
        buff.write(_struct_I.pack(length))
        for val3 in _v239.meshes:
          length = len(val3.triangles)
          buff.write(_struct_I.pack(length))
          for val4 in val3.triangles:
            buff.write(val4.vertex_indices.tostring())
          length = len(val3.vertices)
          buff.write(_struct_I.pack(length))
          for val4 in val3.vertices:
            _x = val4
            buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
        length = len(_v239.mesh_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v239.mesh_poses:
          _v245 = val3.position
          _x = _v245
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v246 = val3.orientation
          _x = _v246
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        length = len(_v239.planes)
        buff.write(_struct_I.pack(length))
        for val3 in _v239.planes:
          buff.write(val3.coef.tostring())
        length = len(_v239.plane_poses)
        buff.write(_struct_I.pack(length))
        for val3 in _v239.plane_poses:
          _v247 = val3.position
          _x = _v247
          buff.write(_get_struct_3d().pack(_x.x, _x.y, _x.z))
          _v248 = val3.orientation
          _x = _v248
          buff.write(_get_struct_4d().pack(_x.x, _x.y, _x.z, _x.w))
        _x = _v239.operation
        buff.write(_get_struct_b().pack(_x))
        length = len(val1.touch_links)
        buff.write(_struct_I.pack(length))
        for val2 in val1.touch_links:
          length = len(val2)
          if python3 or type(val2) == unicode:
            val2 = val2.encode('utf-8')
            length = len(val2)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val2))
        _v249 = val1.detach_posture
        _v250 = _v249.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))
        length = len(_v249.joint_names)
        buff.write(_struct_I.pack(length))
        for val3 in _v249.joint_names:
          length = len(val3)
          if python3 or type(val3) == unicode:
            val3 = val3.encode('utf-8')
            length = len(val3)
          buff.write(struct.Struct('<I%ss'%length).pack(length, val3))
        length = len(_v249.points)
        buff.write(_struct_I.pack(length))
        for val3 in _v249.points:
          length = len(val3.positions)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(val3.positions.tostring())
          length = len(val3.velocities)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(val3.velocities.tostring())
          length = len(val3.accelerations)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(val3.accelerations.tostring())
          length = len(val3.effort)
          buff.write(_struct_I.pack(length))
          pattern = '<%sd'%length
          buff.write(val3.effort.tostring())
          _v252 = val3.time_from_start
          _x = _v252
          buff.write(_get_struct_2i().pack(_x.secs, _x.nsecs))
        _x = val1.weight
        buff.write(_get_struct_d().pack(_x))
      _x = self
      buff.write(_get_struct_Bi().pack(_x.solution.is_diff, _x.error_code.val))
    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.solution is None:
        self.solution = moveit_msgs.msg.RobotState()
      if self.error_code is None:
        self.error_code = moveit_msgs.msg.MoveItErrorCodes()
      end = 0
      _x = self
      start = end
      end += 12
      (_x.solution.joint_state.header.seq, _x.solution.joint_state.header.stamp.secs, _x.solution.joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.solution.joint_state.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.solution.joint_state.header.frame_id = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.joint_state.name = []
      for i in range(0, length):
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1 = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1 = str[start:end]
        self.solution.joint_state.name.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      s = struct.Struct(pattern)
      end += s.size
      self.solution.joint_state.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
      self.solution.joint_state.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
      self.solution.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
      _x = self
      start = end
      end += 12
      (_x.solution.multi_dof_joint_state.header.seq, _x.solution.multi_dof_joint_state.header.stamp.secs, _x.solution.multi_dof_joint_state.header.stamp.nsecs,) = _get_struct_3I().unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.solution.multi_dof_joint_state.header.frame_id = str[start:end].decode('utf-8', 'rosmsg')
      else:
        self.solution.multi_dof_joint_state.header.frame_id = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.multi_dof_joint_state.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:
          val1 = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1 = str[start:end]
        self.solution.multi_dof_joint_state.joint_names.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.multi_dof_joint_state.transforms = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Transform()
        _v253 = val1.translation
        _x = _v253
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v254 = val1.rotation
        _x = _v254
        start = end
        end += 32
        (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
        self.solution.multi_dof_joint_state.transforms.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.multi_dof_joint_state.twist = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Twist()
        _v255 = val1.linear
        _x = _v255
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v256 = val1.angular
        _x = _v256
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        self.solution.multi_dof_joint_state.twist.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.multi_dof_joint_state.wrench = []
      for i in range(0, length):
        val1 = geometry_msgs.msg.Wrench()
        _v257 = val1.force
        _x = _v257
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        _v258 = val1.torque
        _x = _v258
        start = end
        end += 24
        (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
        self.solution.multi_dof_joint_state.wrench.append(val1)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      self.solution.attached_collision_objects = []
      for i in range(0, length):
        val1 = moveit_msgs.msg.AttachedCollisionObject()
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          val1.link_name = str[start:end].decode('utf-8', 'rosmsg')
        else:
          val1.link_name = str[start:end]
        _v259 = val1.object
        _v260 = _v259.header
        start = end
        end += 4
        (_v260.seq,) = _get_struct_I().unpack(str[start:end])
        _v261 = _v260.stamp
        _x = _v261
        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:
          _v260.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v260.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v259.id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v259.id = str[start:end]
        _v262 = _v259.type
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v262.key = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v262.key = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        start = end
        end += length
        if python3:
          _v262.db = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v262.db = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v259.primitives = []
        for i in range(0, length):
          val3 = shape_msgs.msg.SolidPrimitive()
          start = end
          end += 1
          (val3.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
          val3.dimensions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
          _v259.primitives.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v259.primitive_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v263 = val3.position
          _x = _v263
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v264 = val3.orientation
          _x = _v264
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v259.primitive_poses.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v259.meshes = []
        for i in range(0, length):
          val3 = shape_msgs.msg.Mesh()
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.triangles = []
          for i in range(0, length):
            val4 = shape_msgs.msg.MeshTriangle()
            start = end
            end += 12
            val4.vertex_indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=3)
            val3.triangles.append(val4)
          start = end
          end += 4
          (length,) = _struct_I.unpack(str[start:end])
          val3.vertices = []
          for i in range(0, length):
            val4 = geometry_msgs.msg.Point()
            _x = val4
            start = end
            end += 24
            (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
            val3.vertices.append(val4)
          _v259.meshes.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v259.mesh_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v265 = val3.position
          _x = _v265
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v266 = val3.orientation
          _x = _v266
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v259.mesh_poses.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v259.planes = []
        for i in range(0, length):
          val3 = shape_msgs.msg.Plane()
          start = end
          end += 32
          val3.coef = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=4)
          _v259.planes.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v259.plane_poses = []
        for i in range(0, length):
          val3 = geometry_msgs.msg.Pose()
          _v267 = val3.position
          _x = _v267
          start = end
          end += 24
          (_x.x, _x.y, _x.z,) = _get_struct_3d().unpack(str[start:end])
          _v268 = val3.orientation
          _x = _v268
          start = end
          end += 32
          (_x.x, _x.y, _x.z, _x.w,) = _get_struct_4d().unpack(str[start:end])
          _v259.plane_poses.append(val3)
        start = end
        end += 1
        (_v259.operation,) = _get_struct_b().unpack(str[start:end])
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        val1.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:
            val2 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val2 = str[start:end]
          val1.touch_links.append(val2)
        _v269 = val1.detach_posture
        _v270 = _v269.header
        start = end
        end += 4
        (_v270.seq,) = _get_struct_I().unpack(str[start:end])
        _v271 = _v270.stamp
        _x = _v271
        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:
          _v270.frame_id = str[start:end].decode('utf-8', 'rosmsg')
        else:
          _v270.frame_id = str[start:end]
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v269.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:
            val3 = str[start:end].decode('utf-8', 'rosmsg')
          else:
            val3 = str[start:end]
          _v269.joint_names.append(val3)
        start = end
        end += 4
        (length,) = _struct_I.unpack(str[start:end])
        _v269.points = []
        for i in range(0, length):
          val3 = 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
          val3.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
          val3.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
          val3.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
          val3.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
          _v272 = val3.time_from_start
          _x = _v272
          start = end
          end += 8
          (_x.secs, _x.nsecs,) = _get_struct_2i().unpack(str[start:end])
          _v269.points.append(val3)
        start = end
        end += 8
        (val1.weight,) = _get_struct_d().unpack(str[start:end])
        self.solution.attached_collision_objects.append(val1)
      _x = self
      start = end
      end += 5
      (_x.solution.is_diff, _x.error_code.val,) = _get_struct_Bi().unpack(str[start:end])
      self.solution.is_diff = bool(self.solution.is_diff)
      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_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_Bi = None
def _get_struct_Bi():
    global _struct_Bi
    if _struct_Bi is None:
        _struct_Bi = struct.Struct("<Bi")
    return _struct_Bi
_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
class GetPositionIK(object):
  _type          = 'moveit_msgs/GetPositionIK'
  _md5sum = '0661ea3324398c69f5a971d0ec55657e'
  _request_class  = GetPositionIKRequest
  _response_class = GetPositionIKResponse
