_PositionIKRequest.py
Go to the documentation of this file.
00001 """autogenerated by genpy from kinematics_msgs/PositionIKRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import arm_navigation_msgs.msg
00008 import sensor_msgs.msg
00009 import geometry_msgs.msg
00010 import genpy
00011 import std_msgs.msg
00012 
00013 class PositionIKRequest(genpy.Message):
00014   _md5sum = "737bb756c6253bdd460b1383d0b12dac"
00015   _type = "kinematics_msgs/PositionIKRequest"
00016   _has_header = False #flag to mark the presence of a Header object
00017   _full_text = """# A Position IK request message
00018 # The name of the link for which we are computing IK
00019 string ik_link_name
00020 
00021 # The (stamped) pose of the link
00022 geometry_msgs/PoseStamped pose_stamped
00023 
00024 # A RobotState consisting of hint/seed positions for the IK computation. 
00025 # These may be used to seed the IK search. 
00026 # The seed state MUST contain state for all joints to be used by the IK solver
00027 # to compute IK. The list of joints that the IK solver deals with can be found using
00028 # the kinematics_msgs/GetKinematicSolverInfo
00029 arm_navigation_msgs/RobotState ik_seed_state
00030 
00031 # Additional state information can be provided here to specify the starting positions 
00032 # of other joints/links on the robot.
00033 arm_navigation_msgs/RobotState robot_state
00034 
00035 ================================================================================
00036 MSG: geometry_msgs/PoseStamped
00037 # A Pose with reference coordinate frame and timestamp
00038 Header header
00039 Pose pose
00040 
00041 ================================================================================
00042 MSG: std_msgs/Header
00043 # Standard metadata for higher-level stamped data types.
00044 # This is generally used to communicate timestamped data 
00045 # in a particular coordinate frame.
00046 # 
00047 # sequence ID: consecutively increasing ID 
00048 uint32 seq
00049 #Two-integer timestamp that is expressed as:
00050 # * stamp.secs: seconds (stamp_secs) since epoch
00051 # * stamp.nsecs: nanoseconds since stamp_secs
00052 # time-handling sugar is provided by the client library
00053 time stamp
00054 #Frame this data is associated with
00055 # 0: no frame
00056 # 1: global frame
00057 string frame_id
00058 
00059 ================================================================================
00060 MSG: geometry_msgs/Pose
00061 # A representation of pose in free space, composed of postion and orientation. 
00062 Point position
00063 Quaternion orientation
00064 
00065 ================================================================================
00066 MSG: geometry_msgs/Point
00067 # This contains the position of a point in free space
00068 float64 x
00069 float64 y
00070 float64 z
00071 
00072 ================================================================================
00073 MSG: geometry_msgs/Quaternion
00074 # This represents an orientation in free space in quaternion form.
00075 
00076 float64 x
00077 float64 y
00078 float64 z
00079 float64 w
00080 
00081 ================================================================================
00082 MSG: arm_navigation_msgs/RobotState
00083 # This message contains information about the robot state, i.e. the positions of its joints and links
00084 sensor_msgs/JointState joint_state
00085 arm_navigation_msgs/MultiDOFJointState multi_dof_joint_state
00086 
00087 ================================================================================
00088 MSG: sensor_msgs/JointState
00089 # This is a message that holds data to describe the state of a set of torque controlled joints. 
00090 #
00091 # The state of each joint (revolute or prismatic) is defined by:
00092 #  * the position of the joint (rad or m),
00093 #  * the velocity of the joint (rad/s or m/s) and 
00094 #  * the effort that is applied in the joint (Nm or N).
00095 #
00096 # Each joint is uniquely identified by its name
00097 # The header specifies the time at which the joint states were recorded. All the joint states
00098 # in one message have to be recorded at the same time.
00099 #
00100 # This message consists of a multiple arrays, one for each part of the joint state. 
00101 # The goal is to make each of the fields optional. When e.g. your joints have no
00102 # effort associated with them, you can leave the effort array empty. 
00103 #
00104 # All arrays in this message should have the same size, or be empty.
00105 # This is the only way to uniquely associate the joint name with the correct
00106 # states.
00107 
00108 
00109 Header header
00110 
00111 string[] name
00112 float64[] position
00113 float64[] velocity
00114 float64[] effort
00115 
00116 ================================================================================
00117 MSG: arm_navigation_msgs/MultiDOFJointState
00118 #A representation of a multi-dof joint state
00119 time stamp
00120 string[] joint_names
00121 string[] frame_ids
00122 string[] child_frame_ids
00123 geometry_msgs/Pose[] poses
00124 
00125 """
00126   __slots__ = ['ik_link_name','pose_stamped','ik_seed_state','robot_state']
00127   _slot_types = ['string','geometry_msgs/PoseStamped','arm_navigation_msgs/RobotState','arm_navigation_msgs/RobotState']
00128 
00129   def __init__(self, *args, **kwds):
00130     """
00131     Constructor. Any message fields that are implicitly/explicitly
00132     set to None will be assigned a default value. The recommend
00133     use is keyword arguments as this is more robust to future message
00134     changes.  You cannot mix in-order arguments and keyword arguments.
00135 
00136     The available fields are:
00137        ik_link_name,pose_stamped,ik_seed_state,robot_state
00138 
00139     :param args: complete set of field values, in .msg order
00140     :param kwds: use keyword arguments corresponding to message field names
00141     to set specific fields.
00142     """
00143     if args or kwds:
00144       super(PositionIKRequest, self).__init__(*args, **kwds)
00145       #message fields cannot be None, assign default values for those that are
00146       if self.ik_link_name is None:
00147         self.ik_link_name = ''
00148       if self.pose_stamped is None:
00149         self.pose_stamped = geometry_msgs.msg.PoseStamped()
00150       if self.ik_seed_state is None:
00151         self.ik_seed_state = arm_navigation_msgs.msg.RobotState()
00152       if self.robot_state is None:
00153         self.robot_state = arm_navigation_msgs.msg.RobotState()
00154     else:
00155       self.ik_link_name = ''
00156       self.pose_stamped = geometry_msgs.msg.PoseStamped()
00157       self.ik_seed_state = arm_navigation_msgs.msg.RobotState()
00158       self.robot_state = arm_navigation_msgs.msg.RobotState()
00159 
00160   def _get_types(self):
00161     """
00162     internal API method
00163     """
00164     return self._slot_types
00165 
00166   def serialize(self, buff):
00167     """
00168     serialize message into buffer
00169     :param buff: buffer, ``StringIO``
00170     """
00171     try:
00172       _x = self.ik_link_name
00173       length = len(_x)
00174       if python3 or type(_x) == unicode:
00175         _x = _x.encode('utf-8')
00176         length = len(_x)
00177       buff.write(struct.pack('<I%ss'%length, length, _x))
00178       _x = self
00179       buff.write(_struct_3I.pack(_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs))
00180       _x = self.pose_stamped.header.frame_id
00181       length = len(_x)
00182       if python3 or type(_x) == unicode:
00183         _x = _x.encode('utf-8')
00184         length = len(_x)
00185       buff.write(struct.pack('<I%ss'%length, length, _x))
00186       _x = self
00187       buff.write(_struct_7d3I.pack(_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w, _x.ik_seed_state.joint_state.header.seq, _x.ik_seed_state.joint_state.header.stamp.secs, _x.ik_seed_state.joint_state.header.stamp.nsecs))
00188       _x = self.ik_seed_state.joint_state.header.frame_id
00189       length = len(_x)
00190       if python3 or type(_x) == unicode:
00191         _x = _x.encode('utf-8')
00192         length = len(_x)
00193       buff.write(struct.pack('<I%ss'%length, length, _x))
00194       length = len(self.ik_seed_state.joint_state.name)
00195       buff.write(_struct_I.pack(length))
00196       for val1 in self.ik_seed_state.joint_state.name:
00197         length = len(val1)
00198         if python3 or type(val1) == unicode:
00199           val1 = val1.encode('utf-8')
00200           length = len(val1)
00201         buff.write(struct.pack('<I%ss'%length, length, val1))
00202       length = len(self.ik_seed_state.joint_state.position)
00203       buff.write(_struct_I.pack(length))
00204       pattern = '<%sd'%length
00205       buff.write(struct.pack(pattern, *self.ik_seed_state.joint_state.position))
00206       length = len(self.ik_seed_state.joint_state.velocity)
00207       buff.write(_struct_I.pack(length))
00208       pattern = '<%sd'%length
00209       buff.write(struct.pack(pattern, *self.ik_seed_state.joint_state.velocity))
00210       length = len(self.ik_seed_state.joint_state.effort)
00211       buff.write(_struct_I.pack(length))
00212       pattern = '<%sd'%length
00213       buff.write(struct.pack(pattern, *self.ik_seed_state.joint_state.effort))
00214       _x = self
00215       buff.write(_struct_2I.pack(_x.ik_seed_state.multi_dof_joint_state.stamp.secs, _x.ik_seed_state.multi_dof_joint_state.stamp.nsecs))
00216       length = len(self.ik_seed_state.multi_dof_joint_state.joint_names)
00217       buff.write(_struct_I.pack(length))
00218       for val1 in self.ik_seed_state.multi_dof_joint_state.joint_names:
00219         length = len(val1)
00220         if python3 or type(val1) == unicode:
00221           val1 = val1.encode('utf-8')
00222           length = len(val1)
00223         buff.write(struct.pack('<I%ss'%length, length, val1))
00224       length = len(self.ik_seed_state.multi_dof_joint_state.frame_ids)
00225       buff.write(_struct_I.pack(length))
00226       for val1 in self.ik_seed_state.multi_dof_joint_state.frame_ids:
00227         length = len(val1)
00228         if python3 or type(val1) == unicode:
00229           val1 = val1.encode('utf-8')
00230           length = len(val1)
00231         buff.write(struct.pack('<I%ss'%length, length, val1))
00232       length = len(self.ik_seed_state.multi_dof_joint_state.child_frame_ids)
00233       buff.write(_struct_I.pack(length))
00234       for val1 in self.ik_seed_state.multi_dof_joint_state.child_frame_ids:
00235         length = len(val1)
00236         if python3 or type(val1) == unicode:
00237           val1 = val1.encode('utf-8')
00238           length = len(val1)
00239         buff.write(struct.pack('<I%ss'%length, length, val1))
00240       length = len(self.ik_seed_state.multi_dof_joint_state.poses)
00241       buff.write(_struct_I.pack(length))
00242       for val1 in self.ik_seed_state.multi_dof_joint_state.poses:
00243         _v1 = val1.position
00244         _x = _v1
00245         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00246         _v2 = val1.orientation
00247         _x = _v2
00248         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00249       _x = self
00250       buff.write(_struct_3I.pack(_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs))
00251       _x = self.robot_state.joint_state.header.frame_id
00252       length = len(_x)
00253       if python3 or type(_x) == unicode:
00254         _x = _x.encode('utf-8')
00255         length = len(_x)
00256       buff.write(struct.pack('<I%ss'%length, length, _x))
00257       length = len(self.robot_state.joint_state.name)
00258       buff.write(_struct_I.pack(length))
00259       for val1 in self.robot_state.joint_state.name:
00260         length = len(val1)
00261         if python3 or type(val1) == unicode:
00262           val1 = val1.encode('utf-8')
00263           length = len(val1)
00264         buff.write(struct.pack('<I%ss'%length, length, val1))
00265       length = len(self.robot_state.joint_state.position)
00266       buff.write(_struct_I.pack(length))
00267       pattern = '<%sd'%length
00268       buff.write(struct.pack(pattern, *self.robot_state.joint_state.position))
00269       length = len(self.robot_state.joint_state.velocity)
00270       buff.write(_struct_I.pack(length))
00271       pattern = '<%sd'%length
00272       buff.write(struct.pack(pattern, *self.robot_state.joint_state.velocity))
00273       length = len(self.robot_state.joint_state.effort)
00274       buff.write(_struct_I.pack(length))
00275       pattern = '<%sd'%length
00276       buff.write(struct.pack(pattern, *self.robot_state.joint_state.effort))
00277       _x = self
00278       buff.write(_struct_2I.pack(_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs))
00279       length = len(self.robot_state.multi_dof_joint_state.joint_names)
00280       buff.write(_struct_I.pack(length))
00281       for val1 in self.robot_state.multi_dof_joint_state.joint_names:
00282         length = len(val1)
00283         if python3 or type(val1) == unicode:
00284           val1 = val1.encode('utf-8')
00285           length = len(val1)
00286         buff.write(struct.pack('<I%ss'%length, length, val1))
00287       length = len(self.robot_state.multi_dof_joint_state.frame_ids)
00288       buff.write(_struct_I.pack(length))
00289       for val1 in self.robot_state.multi_dof_joint_state.frame_ids:
00290         length = len(val1)
00291         if python3 or type(val1) == unicode:
00292           val1 = val1.encode('utf-8')
00293           length = len(val1)
00294         buff.write(struct.pack('<I%ss'%length, length, val1))
00295       length = len(self.robot_state.multi_dof_joint_state.child_frame_ids)
00296       buff.write(_struct_I.pack(length))
00297       for val1 in self.robot_state.multi_dof_joint_state.child_frame_ids:
00298         length = len(val1)
00299         if python3 or type(val1) == unicode:
00300           val1 = val1.encode('utf-8')
00301           length = len(val1)
00302         buff.write(struct.pack('<I%ss'%length, length, val1))
00303       length = len(self.robot_state.multi_dof_joint_state.poses)
00304       buff.write(_struct_I.pack(length))
00305       for val1 in self.robot_state.multi_dof_joint_state.poses:
00306         _v3 = val1.position
00307         _x = _v3
00308         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00309         _v4 = val1.orientation
00310         _x = _v4
00311         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00312     except struct.error as se: self._check_types(se)
00313     except TypeError as te: self._check_types(te)
00314 
00315   def deserialize(self, str):
00316     """
00317     unpack serialized message in str into this message instance
00318     :param str: byte array of serialized message, ``str``
00319     """
00320     try:
00321       if self.pose_stamped is None:
00322         self.pose_stamped = geometry_msgs.msg.PoseStamped()
00323       if self.ik_seed_state is None:
00324         self.ik_seed_state = arm_navigation_msgs.msg.RobotState()
00325       if self.robot_state is None:
00326         self.robot_state = arm_navigation_msgs.msg.RobotState()
00327       end = 0
00328       start = end
00329       end += 4
00330       (length,) = _struct_I.unpack(str[start:end])
00331       start = end
00332       end += length
00333       if python3:
00334         self.ik_link_name = str[start:end].decode('utf-8')
00335       else:
00336         self.ik_link_name = str[start:end]
00337       _x = self
00338       start = end
00339       end += 12
00340       (_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00341       start = end
00342       end += 4
00343       (length,) = _struct_I.unpack(str[start:end])
00344       start = end
00345       end += length
00346       if python3:
00347         self.pose_stamped.header.frame_id = str[start:end].decode('utf-8')
00348       else:
00349         self.pose_stamped.header.frame_id = str[start:end]
00350       _x = self
00351       start = end
00352       end += 68
00353       (_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w, _x.ik_seed_state.joint_state.header.seq, _x.ik_seed_state.joint_state.header.stamp.secs, _x.ik_seed_state.joint_state.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00354       start = end
00355       end += 4
00356       (length,) = _struct_I.unpack(str[start:end])
00357       start = end
00358       end += length
00359       if python3:
00360         self.ik_seed_state.joint_state.header.frame_id = str[start:end].decode('utf-8')
00361       else:
00362         self.ik_seed_state.joint_state.header.frame_id = str[start:end]
00363       start = end
00364       end += 4
00365       (length,) = _struct_I.unpack(str[start:end])
00366       self.ik_seed_state.joint_state.name = []
00367       for i in range(0, length):
00368         start = end
00369         end += 4
00370         (length,) = _struct_I.unpack(str[start:end])
00371         start = end
00372         end += length
00373         if python3:
00374           val1 = str[start:end].decode('utf-8')
00375         else:
00376           val1 = str[start:end]
00377         self.ik_seed_state.joint_state.name.append(val1)
00378       start = end
00379       end += 4
00380       (length,) = _struct_I.unpack(str[start:end])
00381       pattern = '<%sd'%length
00382       start = end
00383       end += struct.calcsize(pattern)
00384       self.ik_seed_state.joint_state.position = struct.unpack(pattern, str[start:end])
00385       start = end
00386       end += 4
00387       (length,) = _struct_I.unpack(str[start:end])
00388       pattern = '<%sd'%length
00389       start = end
00390       end += struct.calcsize(pattern)
00391       self.ik_seed_state.joint_state.velocity = struct.unpack(pattern, str[start:end])
00392       start = end
00393       end += 4
00394       (length,) = _struct_I.unpack(str[start:end])
00395       pattern = '<%sd'%length
00396       start = end
00397       end += struct.calcsize(pattern)
00398       self.ik_seed_state.joint_state.effort = struct.unpack(pattern, str[start:end])
00399       _x = self
00400       start = end
00401       end += 8
00402       (_x.ik_seed_state.multi_dof_joint_state.stamp.secs, _x.ik_seed_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00403       start = end
00404       end += 4
00405       (length,) = _struct_I.unpack(str[start:end])
00406       self.ik_seed_state.multi_dof_joint_state.joint_names = []
00407       for i in range(0, length):
00408         start = end
00409         end += 4
00410         (length,) = _struct_I.unpack(str[start:end])
00411         start = end
00412         end += length
00413         if python3:
00414           val1 = str[start:end].decode('utf-8')
00415         else:
00416           val1 = str[start:end]
00417         self.ik_seed_state.multi_dof_joint_state.joint_names.append(val1)
00418       start = end
00419       end += 4
00420       (length,) = _struct_I.unpack(str[start:end])
00421       self.ik_seed_state.multi_dof_joint_state.frame_ids = []
00422       for i in range(0, length):
00423         start = end
00424         end += 4
00425         (length,) = _struct_I.unpack(str[start:end])
00426         start = end
00427         end += length
00428         if python3:
00429           val1 = str[start:end].decode('utf-8')
00430         else:
00431           val1 = str[start:end]
00432         self.ik_seed_state.multi_dof_joint_state.frame_ids.append(val1)
00433       start = end
00434       end += 4
00435       (length,) = _struct_I.unpack(str[start:end])
00436       self.ik_seed_state.multi_dof_joint_state.child_frame_ids = []
00437       for i in range(0, length):
00438         start = end
00439         end += 4
00440         (length,) = _struct_I.unpack(str[start:end])
00441         start = end
00442         end += length
00443         if python3:
00444           val1 = str[start:end].decode('utf-8')
00445         else:
00446           val1 = str[start:end]
00447         self.ik_seed_state.multi_dof_joint_state.child_frame_ids.append(val1)
00448       start = end
00449       end += 4
00450       (length,) = _struct_I.unpack(str[start:end])
00451       self.ik_seed_state.multi_dof_joint_state.poses = []
00452       for i in range(0, length):
00453         val1 = geometry_msgs.msg.Pose()
00454         _v5 = val1.position
00455         _x = _v5
00456         start = end
00457         end += 24
00458         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00459         _v6 = val1.orientation
00460         _x = _v6
00461         start = end
00462         end += 32
00463         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00464         self.ik_seed_state.multi_dof_joint_state.poses.append(val1)
00465       _x = self
00466       start = end
00467       end += 12
00468       (_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00469       start = end
00470       end += 4
00471       (length,) = _struct_I.unpack(str[start:end])
00472       start = end
00473       end += length
00474       if python3:
00475         self.robot_state.joint_state.header.frame_id = str[start:end].decode('utf-8')
00476       else:
00477         self.robot_state.joint_state.header.frame_id = str[start:end]
00478       start = end
00479       end += 4
00480       (length,) = _struct_I.unpack(str[start:end])
00481       self.robot_state.joint_state.name = []
00482       for i in range(0, length):
00483         start = end
00484         end += 4
00485         (length,) = _struct_I.unpack(str[start:end])
00486         start = end
00487         end += length
00488         if python3:
00489           val1 = str[start:end].decode('utf-8')
00490         else:
00491           val1 = str[start:end]
00492         self.robot_state.joint_state.name.append(val1)
00493       start = end
00494       end += 4
00495       (length,) = _struct_I.unpack(str[start:end])
00496       pattern = '<%sd'%length
00497       start = end
00498       end += struct.calcsize(pattern)
00499       self.robot_state.joint_state.position = struct.unpack(pattern, str[start:end])
00500       start = end
00501       end += 4
00502       (length,) = _struct_I.unpack(str[start:end])
00503       pattern = '<%sd'%length
00504       start = end
00505       end += struct.calcsize(pattern)
00506       self.robot_state.joint_state.velocity = struct.unpack(pattern, str[start:end])
00507       start = end
00508       end += 4
00509       (length,) = _struct_I.unpack(str[start:end])
00510       pattern = '<%sd'%length
00511       start = end
00512       end += struct.calcsize(pattern)
00513       self.robot_state.joint_state.effort = struct.unpack(pattern, str[start:end])
00514       _x = self
00515       start = end
00516       end += 8
00517       (_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00518       start = end
00519       end += 4
00520       (length,) = _struct_I.unpack(str[start:end])
00521       self.robot_state.multi_dof_joint_state.joint_names = []
00522       for i in range(0, length):
00523         start = end
00524         end += 4
00525         (length,) = _struct_I.unpack(str[start:end])
00526         start = end
00527         end += length
00528         if python3:
00529           val1 = str[start:end].decode('utf-8')
00530         else:
00531           val1 = str[start:end]
00532         self.robot_state.multi_dof_joint_state.joint_names.append(val1)
00533       start = end
00534       end += 4
00535       (length,) = _struct_I.unpack(str[start:end])
00536       self.robot_state.multi_dof_joint_state.frame_ids = []
00537       for i in range(0, length):
00538         start = end
00539         end += 4
00540         (length,) = _struct_I.unpack(str[start:end])
00541         start = end
00542         end += length
00543         if python3:
00544           val1 = str[start:end].decode('utf-8')
00545         else:
00546           val1 = str[start:end]
00547         self.robot_state.multi_dof_joint_state.frame_ids.append(val1)
00548       start = end
00549       end += 4
00550       (length,) = _struct_I.unpack(str[start:end])
00551       self.robot_state.multi_dof_joint_state.child_frame_ids = []
00552       for i in range(0, length):
00553         start = end
00554         end += 4
00555         (length,) = _struct_I.unpack(str[start:end])
00556         start = end
00557         end += length
00558         if python3:
00559           val1 = str[start:end].decode('utf-8')
00560         else:
00561           val1 = str[start:end]
00562         self.robot_state.multi_dof_joint_state.child_frame_ids.append(val1)
00563       start = end
00564       end += 4
00565       (length,) = _struct_I.unpack(str[start:end])
00566       self.robot_state.multi_dof_joint_state.poses = []
00567       for i in range(0, length):
00568         val1 = geometry_msgs.msg.Pose()
00569         _v7 = val1.position
00570         _x = _v7
00571         start = end
00572         end += 24
00573         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00574         _v8 = val1.orientation
00575         _x = _v8
00576         start = end
00577         end += 32
00578         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00579         self.robot_state.multi_dof_joint_state.poses.append(val1)
00580       return self
00581     except struct.error as e:
00582       raise genpy.DeserializationError(e) #most likely buffer underfill
00583 
00584 
00585   def serialize_numpy(self, buff, numpy):
00586     """
00587     serialize message with numpy array types into buffer
00588     :param buff: buffer, ``StringIO``
00589     :param numpy: numpy python module
00590     """
00591     try:
00592       _x = self.ik_link_name
00593       length = len(_x)
00594       if python3 or type(_x) == unicode:
00595         _x = _x.encode('utf-8')
00596         length = len(_x)
00597       buff.write(struct.pack('<I%ss'%length, length, _x))
00598       _x = self
00599       buff.write(_struct_3I.pack(_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs))
00600       _x = self.pose_stamped.header.frame_id
00601       length = len(_x)
00602       if python3 or type(_x) == unicode:
00603         _x = _x.encode('utf-8')
00604         length = len(_x)
00605       buff.write(struct.pack('<I%ss'%length, length, _x))
00606       _x = self
00607       buff.write(_struct_7d3I.pack(_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w, _x.ik_seed_state.joint_state.header.seq, _x.ik_seed_state.joint_state.header.stamp.secs, _x.ik_seed_state.joint_state.header.stamp.nsecs))
00608       _x = self.ik_seed_state.joint_state.header.frame_id
00609       length = len(_x)
00610       if python3 or type(_x) == unicode:
00611         _x = _x.encode('utf-8')
00612         length = len(_x)
00613       buff.write(struct.pack('<I%ss'%length, length, _x))
00614       length = len(self.ik_seed_state.joint_state.name)
00615       buff.write(_struct_I.pack(length))
00616       for val1 in self.ik_seed_state.joint_state.name:
00617         length = len(val1)
00618         if python3 or type(val1) == unicode:
00619           val1 = val1.encode('utf-8')
00620           length = len(val1)
00621         buff.write(struct.pack('<I%ss'%length, length, val1))
00622       length = len(self.ik_seed_state.joint_state.position)
00623       buff.write(_struct_I.pack(length))
00624       pattern = '<%sd'%length
00625       buff.write(self.ik_seed_state.joint_state.position.tostring())
00626       length = len(self.ik_seed_state.joint_state.velocity)
00627       buff.write(_struct_I.pack(length))
00628       pattern = '<%sd'%length
00629       buff.write(self.ik_seed_state.joint_state.velocity.tostring())
00630       length = len(self.ik_seed_state.joint_state.effort)
00631       buff.write(_struct_I.pack(length))
00632       pattern = '<%sd'%length
00633       buff.write(self.ik_seed_state.joint_state.effort.tostring())
00634       _x = self
00635       buff.write(_struct_2I.pack(_x.ik_seed_state.multi_dof_joint_state.stamp.secs, _x.ik_seed_state.multi_dof_joint_state.stamp.nsecs))
00636       length = len(self.ik_seed_state.multi_dof_joint_state.joint_names)
00637       buff.write(_struct_I.pack(length))
00638       for val1 in self.ik_seed_state.multi_dof_joint_state.joint_names:
00639         length = len(val1)
00640         if python3 or type(val1) == unicode:
00641           val1 = val1.encode('utf-8')
00642           length = len(val1)
00643         buff.write(struct.pack('<I%ss'%length, length, val1))
00644       length = len(self.ik_seed_state.multi_dof_joint_state.frame_ids)
00645       buff.write(_struct_I.pack(length))
00646       for val1 in self.ik_seed_state.multi_dof_joint_state.frame_ids:
00647         length = len(val1)
00648         if python3 or type(val1) == unicode:
00649           val1 = val1.encode('utf-8')
00650           length = len(val1)
00651         buff.write(struct.pack('<I%ss'%length, length, val1))
00652       length = len(self.ik_seed_state.multi_dof_joint_state.child_frame_ids)
00653       buff.write(_struct_I.pack(length))
00654       for val1 in self.ik_seed_state.multi_dof_joint_state.child_frame_ids:
00655         length = len(val1)
00656         if python3 or type(val1) == unicode:
00657           val1 = val1.encode('utf-8')
00658           length = len(val1)
00659         buff.write(struct.pack('<I%ss'%length, length, val1))
00660       length = len(self.ik_seed_state.multi_dof_joint_state.poses)
00661       buff.write(_struct_I.pack(length))
00662       for val1 in self.ik_seed_state.multi_dof_joint_state.poses:
00663         _v9 = val1.position
00664         _x = _v9
00665         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00666         _v10 = val1.orientation
00667         _x = _v10
00668         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00669       _x = self
00670       buff.write(_struct_3I.pack(_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs))
00671       _x = self.robot_state.joint_state.header.frame_id
00672       length = len(_x)
00673       if python3 or type(_x) == unicode:
00674         _x = _x.encode('utf-8')
00675         length = len(_x)
00676       buff.write(struct.pack('<I%ss'%length, length, _x))
00677       length = len(self.robot_state.joint_state.name)
00678       buff.write(_struct_I.pack(length))
00679       for val1 in self.robot_state.joint_state.name:
00680         length = len(val1)
00681         if python3 or type(val1) == unicode:
00682           val1 = val1.encode('utf-8')
00683           length = len(val1)
00684         buff.write(struct.pack('<I%ss'%length, length, val1))
00685       length = len(self.robot_state.joint_state.position)
00686       buff.write(_struct_I.pack(length))
00687       pattern = '<%sd'%length
00688       buff.write(self.robot_state.joint_state.position.tostring())
00689       length = len(self.robot_state.joint_state.velocity)
00690       buff.write(_struct_I.pack(length))
00691       pattern = '<%sd'%length
00692       buff.write(self.robot_state.joint_state.velocity.tostring())
00693       length = len(self.robot_state.joint_state.effort)
00694       buff.write(_struct_I.pack(length))
00695       pattern = '<%sd'%length
00696       buff.write(self.robot_state.joint_state.effort.tostring())
00697       _x = self
00698       buff.write(_struct_2I.pack(_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs))
00699       length = len(self.robot_state.multi_dof_joint_state.joint_names)
00700       buff.write(_struct_I.pack(length))
00701       for val1 in self.robot_state.multi_dof_joint_state.joint_names:
00702         length = len(val1)
00703         if python3 or type(val1) == unicode:
00704           val1 = val1.encode('utf-8')
00705           length = len(val1)
00706         buff.write(struct.pack('<I%ss'%length, length, val1))
00707       length = len(self.robot_state.multi_dof_joint_state.frame_ids)
00708       buff.write(_struct_I.pack(length))
00709       for val1 in self.robot_state.multi_dof_joint_state.frame_ids:
00710         length = len(val1)
00711         if python3 or type(val1) == unicode:
00712           val1 = val1.encode('utf-8')
00713           length = len(val1)
00714         buff.write(struct.pack('<I%ss'%length, length, val1))
00715       length = len(self.robot_state.multi_dof_joint_state.child_frame_ids)
00716       buff.write(_struct_I.pack(length))
00717       for val1 in self.robot_state.multi_dof_joint_state.child_frame_ids:
00718         length = len(val1)
00719         if python3 or type(val1) == unicode:
00720           val1 = val1.encode('utf-8')
00721           length = len(val1)
00722         buff.write(struct.pack('<I%ss'%length, length, val1))
00723       length = len(self.robot_state.multi_dof_joint_state.poses)
00724       buff.write(_struct_I.pack(length))
00725       for val1 in self.robot_state.multi_dof_joint_state.poses:
00726         _v11 = val1.position
00727         _x = _v11
00728         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00729         _v12 = val1.orientation
00730         _x = _v12
00731         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00732     except struct.error as se: self._check_types(se)
00733     except TypeError as te: self._check_types(te)
00734 
00735   def deserialize_numpy(self, str, numpy):
00736     """
00737     unpack serialized message in str into this message instance using numpy for array types
00738     :param str: byte array of serialized message, ``str``
00739     :param numpy: numpy python module
00740     """
00741     try:
00742       if self.pose_stamped is None:
00743         self.pose_stamped = geometry_msgs.msg.PoseStamped()
00744       if self.ik_seed_state is None:
00745         self.ik_seed_state = arm_navigation_msgs.msg.RobotState()
00746       if self.robot_state is None:
00747         self.robot_state = arm_navigation_msgs.msg.RobotState()
00748       end = 0
00749       start = end
00750       end += 4
00751       (length,) = _struct_I.unpack(str[start:end])
00752       start = end
00753       end += length
00754       if python3:
00755         self.ik_link_name = str[start:end].decode('utf-8')
00756       else:
00757         self.ik_link_name = str[start:end]
00758       _x = self
00759       start = end
00760       end += 12
00761       (_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00762       start = end
00763       end += 4
00764       (length,) = _struct_I.unpack(str[start:end])
00765       start = end
00766       end += length
00767       if python3:
00768         self.pose_stamped.header.frame_id = str[start:end].decode('utf-8')
00769       else:
00770         self.pose_stamped.header.frame_id = str[start:end]
00771       _x = self
00772       start = end
00773       end += 68
00774       (_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w, _x.ik_seed_state.joint_state.header.seq, _x.ik_seed_state.joint_state.header.stamp.secs, _x.ik_seed_state.joint_state.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00775       start = end
00776       end += 4
00777       (length,) = _struct_I.unpack(str[start:end])
00778       start = end
00779       end += length
00780       if python3:
00781         self.ik_seed_state.joint_state.header.frame_id = str[start:end].decode('utf-8')
00782       else:
00783         self.ik_seed_state.joint_state.header.frame_id = str[start:end]
00784       start = end
00785       end += 4
00786       (length,) = _struct_I.unpack(str[start:end])
00787       self.ik_seed_state.joint_state.name = []
00788       for i in range(0, length):
00789         start = end
00790         end += 4
00791         (length,) = _struct_I.unpack(str[start:end])
00792         start = end
00793         end += length
00794         if python3:
00795           val1 = str[start:end].decode('utf-8')
00796         else:
00797           val1 = str[start:end]
00798         self.ik_seed_state.joint_state.name.append(val1)
00799       start = end
00800       end += 4
00801       (length,) = _struct_I.unpack(str[start:end])
00802       pattern = '<%sd'%length
00803       start = end
00804       end += struct.calcsize(pattern)
00805       self.ik_seed_state.joint_state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00806       start = end
00807       end += 4
00808       (length,) = _struct_I.unpack(str[start:end])
00809       pattern = '<%sd'%length
00810       start = end
00811       end += struct.calcsize(pattern)
00812       self.ik_seed_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00813       start = end
00814       end += 4
00815       (length,) = _struct_I.unpack(str[start:end])
00816       pattern = '<%sd'%length
00817       start = end
00818       end += struct.calcsize(pattern)
00819       self.ik_seed_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00820       _x = self
00821       start = end
00822       end += 8
00823       (_x.ik_seed_state.multi_dof_joint_state.stamp.secs, _x.ik_seed_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00824       start = end
00825       end += 4
00826       (length,) = _struct_I.unpack(str[start:end])
00827       self.ik_seed_state.multi_dof_joint_state.joint_names = []
00828       for i in range(0, length):
00829         start = end
00830         end += 4
00831         (length,) = _struct_I.unpack(str[start:end])
00832         start = end
00833         end += length
00834         if python3:
00835           val1 = str[start:end].decode('utf-8')
00836         else:
00837           val1 = str[start:end]
00838         self.ik_seed_state.multi_dof_joint_state.joint_names.append(val1)
00839       start = end
00840       end += 4
00841       (length,) = _struct_I.unpack(str[start:end])
00842       self.ik_seed_state.multi_dof_joint_state.frame_ids = []
00843       for i in range(0, length):
00844         start = end
00845         end += 4
00846         (length,) = _struct_I.unpack(str[start:end])
00847         start = end
00848         end += length
00849         if python3:
00850           val1 = str[start:end].decode('utf-8')
00851         else:
00852           val1 = str[start:end]
00853         self.ik_seed_state.multi_dof_joint_state.frame_ids.append(val1)
00854       start = end
00855       end += 4
00856       (length,) = _struct_I.unpack(str[start:end])
00857       self.ik_seed_state.multi_dof_joint_state.child_frame_ids = []
00858       for i in range(0, length):
00859         start = end
00860         end += 4
00861         (length,) = _struct_I.unpack(str[start:end])
00862         start = end
00863         end += length
00864         if python3:
00865           val1 = str[start:end].decode('utf-8')
00866         else:
00867           val1 = str[start:end]
00868         self.ik_seed_state.multi_dof_joint_state.child_frame_ids.append(val1)
00869       start = end
00870       end += 4
00871       (length,) = _struct_I.unpack(str[start:end])
00872       self.ik_seed_state.multi_dof_joint_state.poses = []
00873       for i in range(0, length):
00874         val1 = geometry_msgs.msg.Pose()
00875         _v13 = val1.position
00876         _x = _v13
00877         start = end
00878         end += 24
00879         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00880         _v14 = val1.orientation
00881         _x = _v14
00882         start = end
00883         end += 32
00884         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00885         self.ik_seed_state.multi_dof_joint_state.poses.append(val1)
00886       _x = self
00887       start = end
00888       end += 12
00889       (_x.robot_state.joint_state.header.seq, _x.robot_state.joint_state.header.stamp.secs, _x.robot_state.joint_state.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00890       start = end
00891       end += 4
00892       (length,) = _struct_I.unpack(str[start:end])
00893       start = end
00894       end += length
00895       if python3:
00896         self.robot_state.joint_state.header.frame_id = str[start:end].decode('utf-8')
00897       else:
00898         self.robot_state.joint_state.header.frame_id = str[start:end]
00899       start = end
00900       end += 4
00901       (length,) = _struct_I.unpack(str[start:end])
00902       self.robot_state.joint_state.name = []
00903       for i in range(0, length):
00904         start = end
00905         end += 4
00906         (length,) = _struct_I.unpack(str[start:end])
00907         start = end
00908         end += length
00909         if python3:
00910           val1 = str[start:end].decode('utf-8')
00911         else:
00912           val1 = str[start:end]
00913         self.robot_state.joint_state.name.append(val1)
00914       start = end
00915       end += 4
00916       (length,) = _struct_I.unpack(str[start:end])
00917       pattern = '<%sd'%length
00918       start = end
00919       end += struct.calcsize(pattern)
00920       self.robot_state.joint_state.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00921       start = end
00922       end += 4
00923       (length,) = _struct_I.unpack(str[start:end])
00924       pattern = '<%sd'%length
00925       start = end
00926       end += struct.calcsize(pattern)
00927       self.robot_state.joint_state.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00928       start = end
00929       end += 4
00930       (length,) = _struct_I.unpack(str[start:end])
00931       pattern = '<%sd'%length
00932       start = end
00933       end += struct.calcsize(pattern)
00934       self.robot_state.joint_state.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00935       _x = self
00936       start = end
00937       end += 8
00938       (_x.robot_state.multi_dof_joint_state.stamp.secs, _x.robot_state.multi_dof_joint_state.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00939       start = end
00940       end += 4
00941       (length,) = _struct_I.unpack(str[start:end])
00942       self.robot_state.multi_dof_joint_state.joint_names = []
00943       for i in range(0, length):
00944         start = end
00945         end += 4
00946         (length,) = _struct_I.unpack(str[start:end])
00947         start = end
00948         end += length
00949         if python3:
00950           val1 = str[start:end].decode('utf-8')
00951         else:
00952           val1 = str[start:end]
00953         self.robot_state.multi_dof_joint_state.joint_names.append(val1)
00954       start = end
00955       end += 4
00956       (length,) = _struct_I.unpack(str[start:end])
00957       self.robot_state.multi_dof_joint_state.frame_ids = []
00958       for i in range(0, length):
00959         start = end
00960         end += 4
00961         (length,) = _struct_I.unpack(str[start:end])
00962         start = end
00963         end += length
00964         if python3:
00965           val1 = str[start:end].decode('utf-8')
00966         else:
00967           val1 = str[start:end]
00968         self.robot_state.multi_dof_joint_state.frame_ids.append(val1)
00969       start = end
00970       end += 4
00971       (length,) = _struct_I.unpack(str[start:end])
00972       self.robot_state.multi_dof_joint_state.child_frame_ids = []
00973       for i in range(0, length):
00974         start = end
00975         end += 4
00976         (length,) = _struct_I.unpack(str[start:end])
00977         start = end
00978         end += length
00979         if python3:
00980           val1 = str[start:end].decode('utf-8')
00981         else:
00982           val1 = str[start:end]
00983         self.robot_state.multi_dof_joint_state.child_frame_ids.append(val1)
00984       start = end
00985       end += 4
00986       (length,) = _struct_I.unpack(str[start:end])
00987       self.robot_state.multi_dof_joint_state.poses = []
00988       for i in range(0, length):
00989         val1 = geometry_msgs.msg.Pose()
00990         _v15 = val1.position
00991         _x = _v15
00992         start = end
00993         end += 24
00994         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00995         _v16 = val1.orientation
00996         _x = _v16
00997         start = end
00998         end += 32
00999         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
01000         self.robot_state.multi_dof_joint_state.poses.append(val1)
01001       return self
01002     except struct.error as e:
01003       raise genpy.DeserializationError(e) #most likely buffer underfill
01004 
01005 _struct_I = genpy.struct_I
01006 _struct_4d = struct.Struct("<4d")
01007 _struct_3I = struct.Struct("<3I")
01008 _struct_3d = struct.Struct("<3d")
01009 _struct_7d3I = struct.Struct("<7d3I")
01010 _struct_2I = struct.Struct("<2I")


kinematics_msgs
Author(s): Sachin Chitta
autogenerated on Mon Dec 2 2013 12:32:53