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


arm_navigation_msgs
Author(s): Gil Jones
autogenerated on Thu Dec 12 2013 11:08:10