_MultiDOFJointTrajectoryPoint.py
Go to the documentation of this file.
00001 """autogenerated by genpy from arm_navigation_msgs/MultiDOFJointTrajectoryPoint.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 MultiDOFJointTrajectoryPoint(genpy.Message):
00011   _md5sum = "9be3ee3b5fa289b5394ab4ca9e54fa4e"
00012   _type = "arm_navigation_msgs/MultiDOFJointTrajectoryPoint"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """geometry_msgs/Pose[] poses
00015 duration time_from_start
00016 ================================================================================
00017 MSG: geometry_msgs/Pose
00018 # A representation of pose in free space, composed of postion and orientation. 
00019 Point position
00020 Quaternion orientation
00021 
00022 ================================================================================
00023 MSG: geometry_msgs/Point
00024 # This contains the position of a point in free space
00025 float64 x
00026 float64 y
00027 float64 z
00028 
00029 ================================================================================
00030 MSG: geometry_msgs/Quaternion
00031 # This represents an orientation in free space in quaternion form.
00032 
00033 float64 x
00034 float64 y
00035 float64 z
00036 float64 w
00037 
00038 """
00039   __slots__ = ['poses','time_from_start']
00040   _slot_types = ['geometry_msgs/Pose[]','duration']
00041 
00042   def __init__(self, *args, **kwds):
00043     """
00044     Constructor. Any message fields that are implicitly/explicitly
00045     set to None will be assigned a default value. The recommend
00046     use is keyword arguments as this is more robust to future message
00047     changes.  You cannot mix in-order arguments and keyword arguments.
00048 
00049     The available fields are:
00050        poses,time_from_start
00051 
00052     :param args: complete set of field values, in .msg order
00053     :param kwds: use keyword arguments corresponding to message field names
00054     to set specific fields.
00055     """
00056     if args or kwds:
00057       super(MultiDOFJointTrajectoryPoint, self).__init__(*args, **kwds)
00058       #message fields cannot be None, assign default values for those that are
00059       if self.poses is None:
00060         self.poses = []
00061       if self.time_from_start is None:
00062         self.time_from_start = genpy.Duration()
00063     else:
00064       self.poses = []
00065       self.time_from_start = genpy.Duration()
00066 
00067   def _get_types(self):
00068     """
00069     internal API method
00070     """
00071     return self._slot_types
00072 
00073   def serialize(self, buff):
00074     """
00075     serialize message into buffer
00076     :param buff: buffer, ``StringIO``
00077     """
00078     try:
00079       length = len(self.poses)
00080       buff.write(_struct_I.pack(length))
00081       for val1 in self.poses:
00082         _v1 = val1.position
00083         _x = _v1
00084         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00085         _v2 = val1.orientation
00086         _x = _v2
00087         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00088       _x = self
00089       buff.write(_struct_2i.pack(_x.time_from_start.secs, _x.time_from_start.nsecs))
00090     except struct.error as se: self._check_types(se)
00091     except TypeError as te: self._check_types(te)
00092 
00093   def deserialize(self, str):
00094     """
00095     unpack serialized message in str into this message instance
00096     :param str: byte array of serialized message, ``str``
00097     """
00098     try:
00099       if self.poses is None:
00100         self.poses = None
00101       if self.time_from_start is None:
00102         self.time_from_start = genpy.Duration()
00103       end = 0
00104       start = end
00105       end += 4
00106       (length,) = _struct_I.unpack(str[start:end])
00107       self.poses = []
00108       for i in range(0, length):
00109         val1 = geometry_msgs.msg.Pose()
00110         _v3 = val1.position
00111         _x = _v3
00112         start = end
00113         end += 24
00114         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00115         _v4 = val1.orientation
00116         _x = _v4
00117         start = end
00118         end += 32
00119         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00120         self.poses.append(val1)
00121       _x = self
00122       start = end
00123       end += 8
00124       (_x.time_from_start.secs, _x.time_from_start.nsecs,) = _struct_2i.unpack(str[start:end])
00125       self.time_from_start.canon()
00126       return self
00127     except struct.error as e:
00128       raise genpy.DeserializationError(e) #most likely buffer underfill
00129 
00130 
00131   def serialize_numpy(self, buff, numpy):
00132     """
00133     serialize message with numpy array types into buffer
00134     :param buff: buffer, ``StringIO``
00135     :param numpy: numpy python module
00136     """
00137     try:
00138       length = len(self.poses)
00139       buff.write(_struct_I.pack(length))
00140       for val1 in self.poses:
00141         _v5 = val1.position
00142         _x = _v5
00143         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00144         _v6 = val1.orientation
00145         _x = _v6
00146         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00147       _x = self
00148       buff.write(_struct_2i.pack(_x.time_from_start.secs, _x.time_from_start.nsecs))
00149     except struct.error as se: self._check_types(se)
00150     except TypeError as te: self._check_types(te)
00151 
00152   def deserialize_numpy(self, str, numpy):
00153     """
00154     unpack serialized message in str into this message instance using numpy for array types
00155     :param str: byte array of serialized message, ``str``
00156     :param numpy: numpy python module
00157     """
00158     try:
00159       if self.poses is None:
00160         self.poses = None
00161       if self.time_from_start is None:
00162         self.time_from_start = genpy.Duration()
00163       end = 0
00164       start = end
00165       end += 4
00166       (length,) = _struct_I.unpack(str[start:end])
00167       self.poses = []
00168       for i in range(0, length):
00169         val1 = geometry_msgs.msg.Pose()
00170         _v7 = val1.position
00171         _x = _v7
00172         start = end
00173         end += 24
00174         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00175         _v8 = val1.orientation
00176         _x = _v8
00177         start = end
00178         end += 32
00179         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00180         self.poses.append(val1)
00181       _x = self
00182       start = end
00183       end += 8
00184       (_x.time_from_start.secs, _x.time_from_start.nsecs,) = _struct_2i.unpack(str[start:end])
00185       self.time_from_start.canon()
00186       return self
00187     except struct.error as e:
00188       raise genpy.DeserializationError(e) #most likely buffer underfill
00189 
00190 _struct_I = genpy.struct_I
00191 _struct_4d = struct.Struct("<4d")
00192 _struct_2i = struct.Struct("<2i")
00193 _struct_3d = struct.Struct("<3d")


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