_MultiDOFJointState.py
Go to the documentation of this file.
00001 """autogenerated by genpy from arm_navigation_msgs/MultiDOFJointState.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 geometry_msgs.msg
00008 import genpy
00009 
00010 class MultiDOFJointState(genpy.Message):
00011   _md5sum = "ddd04f13c06870db031db8d5c0a6379d"
00012   _type = "arm_navigation_msgs/MultiDOFJointState"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """#A representation of a multi-dof joint state
00015 time stamp
00016 string[] joint_names
00017 string[] frame_ids
00018 string[] child_frame_ids
00019 geometry_msgs/Pose[] poses
00020 
00021 ================================================================================
00022 MSG: geometry_msgs/Pose
00023 # A representation of pose in free space, composed of postion and orientation. 
00024 Point position
00025 Quaternion orientation
00026 
00027 ================================================================================
00028 MSG: geometry_msgs/Point
00029 # This contains the position of a point in free space
00030 float64 x
00031 float64 y
00032 float64 z
00033 
00034 ================================================================================
00035 MSG: geometry_msgs/Quaternion
00036 # This represents an orientation in free space in quaternion form.
00037 
00038 float64 x
00039 float64 y
00040 float64 z
00041 float64 w
00042 
00043 """
00044   __slots__ = ['stamp','joint_names','frame_ids','child_frame_ids','poses']
00045   _slot_types = ['time','string[]','string[]','string[]','geometry_msgs/Pose[]']
00046 
00047   def __init__(self, *args, **kwds):
00048     """
00049     Constructor. Any message fields that are implicitly/explicitly
00050     set to None will be assigned a default value. The recommend
00051     use is keyword arguments as this is more robust to future message
00052     changes.  You cannot mix in-order arguments and keyword arguments.
00053 
00054     The available fields are:
00055        stamp,joint_names,frame_ids,child_frame_ids,poses
00056 
00057     :param args: complete set of field values, in .msg order
00058     :param kwds: use keyword arguments corresponding to message field names
00059     to set specific fields.
00060     """
00061     if args or kwds:
00062       super(MultiDOFJointState, self).__init__(*args, **kwds)
00063       #message fields cannot be None, assign default values for those that are
00064       if self.stamp is None:
00065         self.stamp = genpy.Time()
00066       if self.joint_names is None:
00067         self.joint_names = []
00068       if self.frame_ids is None:
00069         self.frame_ids = []
00070       if self.child_frame_ids is None:
00071         self.child_frame_ids = []
00072       if self.poses is None:
00073         self.poses = []
00074     else:
00075       self.stamp = genpy.Time()
00076       self.joint_names = []
00077       self.frame_ids = []
00078       self.child_frame_ids = []
00079       self.poses = []
00080 
00081   def _get_types(self):
00082     """
00083     internal API method
00084     """
00085     return self._slot_types
00086 
00087   def serialize(self, buff):
00088     """
00089     serialize message into buffer
00090     :param buff: buffer, ``StringIO``
00091     """
00092     try:
00093       _x = self
00094       buff.write(_struct_2I.pack(_x.stamp.secs, _x.stamp.nsecs))
00095       length = len(self.joint_names)
00096       buff.write(_struct_I.pack(length))
00097       for val1 in self.joint_names:
00098         length = len(val1)
00099         if python3 or type(val1) == unicode:
00100           val1 = val1.encode('utf-8')
00101           length = len(val1)
00102         buff.write(struct.pack('<I%ss'%length, length, val1))
00103       length = len(self.frame_ids)
00104       buff.write(_struct_I.pack(length))
00105       for val1 in self.frame_ids:
00106         length = len(val1)
00107         if python3 or type(val1) == unicode:
00108           val1 = val1.encode('utf-8')
00109           length = len(val1)
00110         buff.write(struct.pack('<I%ss'%length, length, val1))
00111       length = len(self.child_frame_ids)
00112       buff.write(_struct_I.pack(length))
00113       for val1 in self.child_frame_ids:
00114         length = len(val1)
00115         if python3 or type(val1) == unicode:
00116           val1 = val1.encode('utf-8')
00117           length = len(val1)
00118         buff.write(struct.pack('<I%ss'%length, length, val1))
00119       length = len(self.poses)
00120       buff.write(_struct_I.pack(length))
00121       for val1 in self.poses:
00122         _v1 = val1.position
00123         _x = _v1
00124         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00125         _v2 = val1.orientation
00126         _x = _v2
00127         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00128     except struct.error as se: self._check_types(se)
00129     except TypeError as te: self._check_types(te)
00130 
00131   def deserialize(self, str):
00132     """
00133     unpack serialized message in str into this message instance
00134     :param str: byte array of serialized message, ``str``
00135     """
00136     try:
00137       if self.stamp is None:
00138         self.stamp = genpy.Time()
00139       if self.poses is None:
00140         self.poses = None
00141       end = 0
00142       _x = self
00143       start = end
00144       end += 8
00145       (_x.stamp.secs, _x.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00146       start = end
00147       end += 4
00148       (length,) = _struct_I.unpack(str[start:end])
00149       self.joint_names = []
00150       for i in range(0, length):
00151         start = end
00152         end += 4
00153         (length,) = _struct_I.unpack(str[start:end])
00154         start = end
00155         end += length
00156         if python3:
00157           val1 = str[start:end].decode('utf-8')
00158         else:
00159           val1 = str[start:end]
00160         self.joint_names.append(val1)
00161       start = end
00162       end += 4
00163       (length,) = _struct_I.unpack(str[start:end])
00164       self.frame_ids = []
00165       for i in range(0, length):
00166         start = end
00167         end += 4
00168         (length,) = _struct_I.unpack(str[start:end])
00169         start = end
00170         end += length
00171         if python3:
00172           val1 = str[start:end].decode('utf-8')
00173         else:
00174           val1 = str[start:end]
00175         self.frame_ids.append(val1)
00176       start = end
00177       end += 4
00178       (length,) = _struct_I.unpack(str[start:end])
00179       self.child_frame_ids = []
00180       for i in range(0, length):
00181         start = end
00182         end += 4
00183         (length,) = _struct_I.unpack(str[start:end])
00184         start = end
00185         end += length
00186         if python3:
00187           val1 = str[start:end].decode('utf-8')
00188         else:
00189           val1 = str[start:end]
00190         self.child_frame_ids.append(val1)
00191       start = end
00192       end += 4
00193       (length,) = _struct_I.unpack(str[start:end])
00194       self.poses = []
00195       for i in range(0, length):
00196         val1 = geometry_msgs.msg.Pose()
00197         _v3 = val1.position
00198         _x = _v3
00199         start = end
00200         end += 24
00201         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00202         _v4 = val1.orientation
00203         _x = _v4
00204         start = end
00205         end += 32
00206         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00207         self.poses.append(val1)
00208       self.stamp.canon()
00209       return self
00210     except struct.error as e:
00211       raise genpy.DeserializationError(e) #most likely buffer underfill
00212 
00213 
00214   def serialize_numpy(self, buff, numpy):
00215     """
00216     serialize message with numpy array types into buffer
00217     :param buff: buffer, ``StringIO``
00218     :param numpy: numpy python module
00219     """
00220     try:
00221       _x = self
00222       buff.write(_struct_2I.pack(_x.stamp.secs, _x.stamp.nsecs))
00223       length = len(self.joint_names)
00224       buff.write(_struct_I.pack(length))
00225       for val1 in self.joint_names:
00226         length = len(val1)
00227         if python3 or type(val1) == unicode:
00228           val1 = val1.encode('utf-8')
00229           length = len(val1)
00230         buff.write(struct.pack('<I%ss'%length, length, val1))
00231       length = len(self.frame_ids)
00232       buff.write(_struct_I.pack(length))
00233       for val1 in self.frame_ids:
00234         length = len(val1)
00235         if python3 or type(val1) == unicode:
00236           val1 = val1.encode('utf-8')
00237           length = len(val1)
00238         buff.write(struct.pack('<I%ss'%length, length, val1))
00239       length = len(self.child_frame_ids)
00240       buff.write(_struct_I.pack(length))
00241       for val1 in self.child_frame_ids:
00242         length = len(val1)
00243         if python3 or type(val1) == unicode:
00244           val1 = val1.encode('utf-8')
00245           length = len(val1)
00246         buff.write(struct.pack('<I%ss'%length, length, val1))
00247       length = len(self.poses)
00248       buff.write(_struct_I.pack(length))
00249       for val1 in self.poses:
00250         _v5 = val1.position
00251         _x = _v5
00252         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00253         _v6 = val1.orientation
00254         _x = _v6
00255         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00256     except struct.error as se: self._check_types(se)
00257     except TypeError as te: self._check_types(te)
00258 
00259   def deserialize_numpy(self, str, numpy):
00260     """
00261     unpack serialized message in str into this message instance using numpy for array types
00262     :param str: byte array of serialized message, ``str``
00263     :param numpy: numpy python module
00264     """
00265     try:
00266       if self.stamp is None:
00267         self.stamp = genpy.Time()
00268       if self.poses is None:
00269         self.poses = None
00270       end = 0
00271       _x = self
00272       start = end
00273       end += 8
00274       (_x.stamp.secs, _x.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00275       start = end
00276       end += 4
00277       (length,) = _struct_I.unpack(str[start:end])
00278       self.joint_names = []
00279       for i in range(0, length):
00280         start = end
00281         end += 4
00282         (length,) = _struct_I.unpack(str[start:end])
00283         start = end
00284         end += length
00285         if python3:
00286           val1 = str[start:end].decode('utf-8')
00287         else:
00288           val1 = str[start:end]
00289         self.joint_names.append(val1)
00290       start = end
00291       end += 4
00292       (length,) = _struct_I.unpack(str[start:end])
00293       self.frame_ids = []
00294       for i in range(0, length):
00295         start = end
00296         end += 4
00297         (length,) = _struct_I.unpack(str[start:end])
00298         start = end
00299         end += length
00300         if python3:
00301           val1 = str[start:end].decode('utf-8')
00302         else:
00303           val1 = str[start:end]
00304         self.frame_ids.append(val1)
00305       start = end
00306       end += 4
00307       (length,) = _struct_I.unpack(str[start:end])
00308       self.child_frame_ids = []
00309       for i in range(0, length):
00310         start = end
00311         end += 4
00312         (length,) = _struct_I.unpack(str[start:end])
00313         start = end
00314         end += length
00315         if python3:
00316           val1 = str[start:end].decode('utf-8')
00317         else:
00318           val1 = str[start:end]
00319         self.child_frame_ids.append(val1)
00320       start = end
00321       end += 4
00322       (length,) = _struct_I.unpack(str[start:end])
00323       self.poses = []
00324       for i in range(0, length):
00325         val1 = geometry_msgs.msg.Pose()
00326         _v7 = val1.position
00327         _x = _v7
00328         start = end
00329         end += 24
00330         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00331         _v8 = val1.orientation
00332         _x = _v8
00333         start = end
00334         end += 32
00335         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00336         self.poses.append(val1)
00337       self.stamp.canon()
00338       return self
00339     except struct.error as e:
00340       raise genpy.DeserializationError(e) #most likely buffer underfill
00341 
00342 _struct_I = genpy.struct_I
00343 _struct_4d = struct.Struct("<4d")
00344 _struct_2I = struct.Struct("<2I")
00345 _struct_3d = struct.Struct("<3d")


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