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


pr2_laban_gazebo_demo
Author(s): John Hsu
autogenerated on Mon Jan 6 2014 12:03:25