00001 """autogenerated by genmsg_py from MultiDOFJointTrajectoryPoint.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import roslib.rostime
00007
00008 class MultiDOFJointTrajectoryPoint(roslib.message.Message):
00009 _md5sum = "9be3ee3b5fa289b5394ab4ca9e54fa4e"
00010 _type = "motion_planning_msgs/MultiDOFJointTrajectoryPoint"
00011 _has_header = False
00012 _full_text = """geometry_msgs/Pose[] poses
00013 duration time_from_start
00014 ================================================================================
00015 MSG: geometry_msgs/Pose
00016 # A representation of pose in free space, composed of postion and orientation.
00017 Point position
00018 Quaternion orientation
00019
00020 ================================================================================
00021 MSG: geometry_msgs/Point
00022 # This contains the position of a point in free space
00023 float64 x
00024 float64 y
00025 float64 z
00026
00027 ================================================================================
00028 MSG: geometry_msgs/Quaternion
00029 # This represents an orientation in free space in quaternion form.
00030
00031 float64 x
00032 float64 y
00033 float64 z
00034 float64 w
00035
00036 """
00037 __slots__ = ['poses','time_from_start']
00038 _slot_types = ['geometry_msgs/Pose[]','duration']
00039
00040 def __init__(self, *args, **kwds):
00041 """
00042 Constructor. Any message fields that are implicitly/explicitly
00043 set to None will be assigned a default value. The recommend
00044 use is keyword arguments as this is more robust to future message
00045 changes. You cannot mix in-order arguments and keyword arguments.
00046
00047 The available fields are:
00048 poses,time_from_start
00049
00050 @param args: complete set of field values, in .msg order
00051 @param kwds: use keyword arguments corresponding to message field names
00052 to set specific fields.
00053 """
00054 if args or kwds:
00055 super(MultiDOFJointTrajectoryPoint, self).__init__(*args, **kwds)
00056
00057 if self.poses is None:
00058 self.poses = []
00059 if self.time_from_start is None:
00060 self.time_from_start = roslib.rostime.Duration()
00061 else:
00062 self.poses = []
00063 self.time_from_start = roslib.rostime.Duration()
00064
00065 def _get_types(self):
00066 """
00067 internal API method
00068 """
00069 return self._slot_types
00070
00071 def serialize(self, buff):
00072 """
00073 serialize message into buffer
00074 @param buff: buffer
00075 @type buff: StringIO
00076 """
00077 try:
00078 length = len(self.poses)
00079 buff.write(_struct_I.pack(length))
00080 for val1 in self.poses:
00081 _v1 = val1.position
00082 _x = _v1
00083 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00084 _v2 = val1.orientation
00085 _x = _v2
00086 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00087 _x = self
00088 buff.write(_struct_2i.pack(_x.time_from_start.secs, _x.time_from_start.nsecs))
00089 except struct.error, se: self._check_types(se)
00090 except TypeError, te: self._check_types(te)
00091
00092 def deserialize(self, str):
00093 """
00094 unpack serialized message in str into this message instance
00095 @param str: byte array of serialized message
00096 @type str: str
00097 """
00098 try:
00099 if self.time_from_start is None:
00100 self.time_from_start = roslib.rostime.Duration()
00101 end = 0
00102 start = end
00103 end += 4
00104 (length,) = _struct_I.unpack(str[start:end])
00105 self.poses = []
00106 for i in xrange(0, length):
00107 val1 = geometry_msgs.msg.Pose()
00108 _v3 = val1.position
00109 _x = _v3
00110 start = end
00111 end += 24
00112 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00113 _v4 = val1.orientation
00114 _x = _v4
00115 start = end
00116 end += 32
00117 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00118 self.poses.append(val1)
00119 _x = self
00120 start = end
00121 end += 8
00122 (_x.time_from_start.secs, _x.time_from_start.nsecs,) = _struct_2i.unpack(str[start:end])
00123 self.time_from_start.canon()
00124 return self
00125 except struct.error, e:
00126 raise roslib.message.DeserializationError(e)
00127
00128
00129 def serialize_numpy(self, buff, numpy):
00130 """
00131 serialize message with numpy array types into buffer
00132 @param buff: buffer
00133 @type buff: StringIO
00134 @param numpy: numpy python module
00135 @type numpy 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, se: self._check_types(se)
00150 except TypeError, 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
00156 @type str: str
00157 @param numpy: numpy python module
00158 @type numpy: module
00159 """
00160 try:
00161 if self.time_from_start is None:
00162 self.time_from_start = roslib.rostime.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 xrange(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, e:
00188 raise roslib.message.DeserializationError(e)
00189
00190 _struct_I = roslib.message.struct_I
00191 _struct_4d = struct.Struct("<4d")
00192 _struct_2i = struct.Struct("<2i")
00193 _struct_3d = struct.Struct("<3d")