_MoveManipulator.py
Go to the documentation of this file.
00001 """autogenerated by genpy from orrosplanning/MoveManipulatorRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 
00008 class MoveManipulatorRequest(genpy.Message):
00009   _md5sum = "d88236b1c87dce50274991fd078b1d0f"
00010   _type = "orrosplanning/MoveManipulatorRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 float64[]         manip_goal
00015 
00016 
00017 
00018 string manip_name
00019 
00020 
00021 
00022 
00023 string planner
00024 
00025 
00026 """
00027   __slots__ = ['manip_goal','manip_name','planner']
00028   _slot_types = ['float64[]','string','string']
00029 
00030   def __init__(self, *args, **kwds):
00031     """
00032     Constructor. Any message fields that are implicitly/explicitly
00033     set to None will be assigned a default value. The recommend
00034     use is keyword arguments as this is more robust to future message
00035     changes.  You cannot mix in-order arguments and keyword arguments.
00036 
00037     The available fields are:
00038        manip_goal,manip_name,planner
00039 
00040     :param args: complete set of field values, in .msg order
00041     :param kwds: use keyword arguments corresponding to message field names
00042     to set specific fields.
00043     """
00044     if args or kwds:
00045       super(MoveManipulatorRequest, self).__init__(*args, **kwds)
00046       #message fields cannot be None, assign default values for those that are
00047       if self.manip_goal is None:
00048         self.manip_goal = []
00049       if self.manip_name is None:
00050         self.manip_name = ''
00051       if self.planner is None:
00052         self.planner = ''
00053     else:
00054       self.manip_goal = []
00055       self.manip_name = ''
00056       self.planner = ''
00057 
00058   def _get_types(self):
00059     """
00060     internal API method
00061     """
00062     return self._slot_types
00063 
00064   def serialize(self, buff):
00065     """
00066     serialize message into buffer
00067     :param buff: buffer, ``StringIO``
00068     """
00069     try:
00070       length = len(self.manip_goal)
00071       buff.write(_struct_I.pack(length))
00072       pattern = '<%sd'%length
00073       buff.write(struct.pack(pattern, *self.manip_goal))
00074       _x = self.manip_name
00075       length = len(_x)
00076       if python3 or type(_x) == unicode:
00077         _x = _x.encode('utf-8')
00078         length = len(_x)
00079       buff.write(struct.pack('<I%ss'%length, length, _x))
00080       _x = self.planner
00081       length = len(_x)
00082       if python3 or type(_x) == unicode:
00083         _x = _x.encode('utf-8')
00084         length = len(_x)
00085       buff.write(struct.pack('<I%ss'%length, length, _x))
00086     except struct.error as se: self._check_types(se)
00087     except TypeError as te: self._check_types(te)
00088 
00089   def deserialize(self, str):
00090     """
00091     unpack serialized message in str into this message instance
00092     :param str: byte array of serialized message, ``str``
00093     """
00094     try:
00095       end = 0
00096       start = end
00097       end += 4
00098       (length,) = _struct_I.unpack(str[start:end])
00099       pattern = '<%sd'%length
00100       start = end
00101       end += struct.calcsize(pattern)
00102       self.manip_goal = struct.unpack(pattern, str[start:end])
00103       start = end
00104       end += 4
00105       (length,) = _struct_I.unpack(str[start:end])
00106       start = end
00107       end += length
00108       if python3:
00109         self.manip_name = str[start:end].decode('utf-8')
00110       else:
00111         self.manip_name = str[start:end]
00112       start = end
00113       end += 4
00114       (length,) = _struct_I.unpack(str[start:end])
00115       start = end
00116       end += length
00117       if python3:
00118         self.planner = str[start:end].decode('utf-8')
00119       else:
00120         self.planner = str[start:end]
00121       return self
00122     except struct.error as e:
00123       raise genpy.DeserializationError(e) #most likely buffer underfill
00124 
00125 
00126   def serialize_numpy(self, buff, numpy):
00127     """
00128     serialize message with numpy array types into buffer
00129     :param buff: buffer, ``StringIO``
00130     :param numpy: numpy python module
00131     """
00132     try:
00133       length = len(self.manip_goal)
00134       buff.write(_struct_I.pack(length))
00135       pattern = '<%sd'%length
00136       buff.write(self.manip_goal.tostring())
00137       _x = self.manip_name
00138       length = len(_x)
00139       if python3 or type(_x) == unicode:
00140         _x = _x.encode('utf-8')
00141         length = len(_x)
00142       buff.write(struct.pack('<I%ss'%length, length, _x))
00143       _x = self.planner
00144       length = len(_x)
00145       if python3 or type(_x) == unicode:
00146         _x = _x.encode('utf-8')
00147         length = len(_x)
00148       buff.write(struct.pack('<I%ss'%length, length, _x))
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       end = 0
00160       start = end
00161       end += 4
00162       (length,) = _struct_I.unpack(str[start:end])
00163       pattern = '<%sd'%length
00164       start = end
00165       end += struct.calcsize(pattern)
00166       self.manip_goal = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00167       start = end
00168       end += 4
00169       (length,) = _struct_I.unpack(str[start:end])
00170       start = end
00171       end += length
00172       if python3:
00173         self.manip_name = str[start:end].decode('utf-8')
00174       else:
00175         self.manip_name = str[start:end]
00176       start = end
00177       end += 4
00178       (length,) = _struct_I.unpack(str[start:end])
00179       start = end
00180       end += length
00181       if python3:
00182         self.planner = str[start:end].decode('utf-8')
00183       else:
00184         self.planner = str[start:end]
00185       return self
00186     except struct.error as e:
00187       raise genpy.DeserializationError(e) #most likely buffer underfill
00188 
00189 _struct_I = genpy.struct_I
00190 """autogenerated by genpy from orrosplanning/MoveManipulatorResponse.msg. Do not edit."""
00191 import sys
00192 python3 = True if sys.hexversion > 0x03000000 else False
00193 import genpy
00194 import struct
00195 
00196 import trajectory_msgs.msg
00197 import genpy
00198 import std_msgs.msg
00199 
00200 class MoveManipulatorResponse(genpy.Message):
00201   _md5sum = "3599ef8bd760f4d2153c7264e9291184"
00202   _type = "orrosplanning/MoveManipulatorResponse"
00203   _has_header = False #flag to mark the presence of a Header object
00204   _full_text = """trajectory_msgs/JointTrajectory traj
00205 
00206 
00207 ================================================================================
00208 MSG: trajectory_msgs/JointTrajectory
00209 Header header
00210 string[] joint_names
00211 JointTrajectoryPoint[] points
00212 ================================================================================
00213 MSG: std_msgs/Header
00214 # Standard metadata for higher-level stamped data types.
00215 # This is generally used to communicate timestamped data 
00216 # in a particular coordinate frame.
00217 # 
00218 # sequence ID: consecutively increasing ID 
00219 uint32 seq
00220 #Two-integer timestamp that is expressed as:
00221 # * stamp.secs: seconds (stamp_secs) since epoch
00222 # * stamp.nsecs: nanoseconds since stamp_secs
00223 # time-handling sugar is provided by the client library
00224 time stamp
00225 #Frame this data is associated with
00226 # 0: no frame
00227 # 1: global frame
00228 string frame_id
00229 
00230 ================================================================================
00231 MSG: trajectory_msgs/JointTrajectoryPoint
00232 float64[] positions
00233 float64[] velocities
00234 float64[] accelerations
00235 duration time_from_start
00236 """
00237   __slots__ = ['traj']
00238   _slot_types = ['trajectory_msgs/JointTrajectory']
00239 
00240   def __init__(self, *args, **kwds):
00241     """
00242     Constructor. Any message fields that are implicitly/explicitly
00243     set to None will be assigned a default value. The recommend
00244     use is keyword arguments as this is more robust to future message
00245     changes.  You cannot mix in-order arguments and keyword arguments.
00246 
00247     The available fields are:
00248        traj
00249 
00250     :param args: complete set of field values, in .msg order
00251     :param kwds: use keyword arguments corresponding to message field names
00252     to set specific fields.
00253     """
00254     if args or kwds:
00255       super(MoveManipulatorResponse, self).__init__(*args, **kwds)
00256       #message fields cannot be None, assign default values for those that are
00257       if self.traj is None:
00258         self.traj = trajectory_msgs.msg.JointTrajectory()
00259     else:
00260       self.traj = trajectory_msgs.msg.JointTrajectory()
00261 
00262   def _get_types(self):
00263     """
00264     internal API method
00265     """
00266     return self._slot_types
00267 
00268   def serialize(self, buff):
00269     """
00270     serialize message into buffer
00271     :param buff: buffer, ``StringIO``
00272     """
00273     try:
00274       _x = self
00275       buff.write(_struct_3I.pack(_x.traj.header.seq, _x.traj.header.stamp.secs, _x.traj.header.stamp.nsecs))
00276       _x = self.traj.header.frame_id
00277       length = len(_x)
00278       if python3 or type(_x) == unicode:
00279         _x = _x.encode('utf-8')
00280         length = len(_x)
00281       buff.write(struct.pack('<I%ss'%length, length, _x))
00282       length = len(self.traj.joint_names)
00283       buff.write(_struct_I.pack(length))
00284       for val1 in self.traj.joint_names:
00285         length = len(val1)
00286         if python3 or type(val1) == unicode:
00287           val1 = val1.encode('utf-8')
00288           length = len(val1)
00289         buff.write(struct.pack('<I%ss'%length, length, val1))
00290       length = len(self.traj.points)
00291       buff.write(_struct_I.pack(length))
00292       for val1 in self.traj.points:
00293         length = len(val1.positions)
00294         buff.write(_struct_I.pack(length))
00295         pattern = '<%sd'%length
00296         buff.write(struct.pack(pattern, *val1.positions))
00297         length = len(val1.velocities)
00298         buff.write(_struct_I.pack(length))
00299         pattern = '<%sd'%length
00300         buff.write(struct.pack(pattern, *val1.velocities))
00301         length = len(val1.accelerations)
00302         buff.write(_struct_I.pack(length))
00303         pattern = '<%sd'%length
00304         buff.write(struct.pack(pattern, *val1.accelerations))
00305         _v1 = val1.time_from_start
00306         _x = _v1
00307         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00308     except struct.error as se: self._check_types(se)
00309     except TypeError as te: self._check_types(te)
00310 
00311   def deserialize(self, str):
00312     """
00313     unpack serialized message in str into this message instance
00314     :param str: byte array of serialized message, ``str``
00315     """
00316     try:
00317       if self.traj is None:
00318         self.traj = trajectory_msgs.msg.JointTrajectory()
00319       end = 0
00320       _x = self
00321       start = end
00322       end += 12
00323       (_x.traj.header.seq, _x.traj.header.stamp.secs, _x.traj.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00324       start = end
00325       end += 4
00326       (length,) = _struct_I.unpack(str[start:end])
00327       start = end
00328       end += length
00329       if python3:
00330         self.traj.header.frame_id = str[start:end].decode('utf-8')
00331       else:
00332         self.traj.header.frame_id = str[start:end]
00333       start = end
00334       end += 4
00335       (length,) = _struct_I.unpack(str[start:end])
00336       self.traj.joint_names = []
00337       for i in range(0, length):
00338         start = end
00339         end += 4
00340         (length,) = _struct_I.unpack(str[start:end])
00341         start = end
00342         end += length
00343         if python3:
00344           val1 = str[start:end].decode('utf-8')
00345         else:
00346           val1 = str[start:end]
00347         self.traj.joint_names.append(val1)
00348       start = end
00349       end += 4
00350       (length,) = _struct_I.unpack(str[start:end])
00351       self.traj.points = []
00352       for i in range(0, length):
00353         val1 = trajectory_msgs.msg.JointTrajectoryPoint()
00354         start = end
00355         end += 4
00356         (length,) = _struct_I.unpack(str[start:end])
00357         pattern = '<%sd'%length
00358         start = end
00359         end += struct.calcsize(pattern)
00360         val1.positions = struct.unpack(pattern, str[start:end])
00361         start = end
00362         end += 4
00363         (length,) = _struct_I.unpack(str[start:end])
00364         pattern = '<%sd'%length
00365         start = end
00366         end += struct.calcsize(pattern)
00367         val1.velocities = struct.unpack(pattern, str[start:end])
00368         start = end
00369         end += 4
00370         (length,) = _struct_I.unpack(str[start:end])
00371         pattern = '<%sd'%length
00372         start = end
00373         end += struct.calcsize(pattern)
00374         val1.accelerations = struct.unpack(pattern, str[start:end])
00375         _v2 = val1.time_from_start
00376         _x = _v2
00377         start = end
00378         end += 8
00379         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00380         self.traj.points.append(val1)
00381       return self
00382     except struct.error as e:
00383       raise genpy.DeserializationError(e) #most likely buffer underfill
00384 
00385 
00386   def serialize_numpy(self, buff, numpy):
00387     """
00388     serialize message with numpy array types into buffer
00389     :param buff: buffer, ``StringIO``
00390     :param numpy: numpy python module
00391     """
00392     try:
00393       _x = self
00394       buff.write(_struct_3I.pack(_x.traj.header.seq, _x.traj.header.stamp.secs, _x.traj.header.stamp.nsecs))
00395       _x = self.traj.header.frame_id
00396       length = len(_x)
00397       if python3 or type(_x) == unicode:
00398         _x = _x.encode('utf-8')
00399         length = len(_x)
00400       buff.write(struct.pack('<I%ss'%length, length, _x))
00401       length = len(self.traj.joint_names)
00402       buff.write(_struct_I.pack(length))
00403       for val1 in self.traj.joint_names:
00404         length = len(val1)
00405         if python3 or type(val1) == unicode:
00406           val1 = val1.encode('utf-8')
00407           length = len(val1)
00408         buff.write(struct.pack('<I%ss'%length, length, val1))
00409       length = len(self.traj.points)
00410       buff.write(_struct_I.pack(length))
00411       for val1 in self.traj.points:
00412         length = len(val1.positions)
00413         buff.write(_struct_I.pack(length))
00414         pattern = '<%sd'%length
00415         buff.write(val1.positions.tostring())
00416         length = len(val1.velocities)
00417         buff.write(_struct_I.pack(length))
00418         pattern = '<%sd'%length
00419         buff.write(val1.velocities.tostring())
00420         length = len(val1.accelerations)
00421         buff.write(_struct_I.pack(length))
00422         pattern = '<%sd'%length
00423         buff.write(val1.accelerations.tostring())
00424         _v3 = val1.time_from_start
00425         _x = _v3
00426         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00427     except struct.error as se: self._check_types(se)
00428     except TypeError as te: self._check_types(te)
00429 
00430   def deserialize_numpy(self, str, numpy):
00431     """
00432     unpack serialized message in str into this message instance using numpy for array types
00433     :param str: byte array of serialized message, ``str``
00434     :param numpy: numpy python module
00435     """
00436     try:
00437       if self.traj is None:
00438         self.traj = trajectory_msgs.msg.JointTrajectory()
00439       end = 0
00440       _x = self
00441       start = end
00442       end += 12
00443       (_x.traj.header.seq, _x.traj.header.stamp.secs, _x.traj.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00444       start = end
00445       end += 4
00446       (length,) = _struct_I.unpack(str[start:end])
00447       start = end
00448       end += length
00449       if python3:
00450         self.traj.header.frame_id = str[start:end].decode('utf-8')
00451       else:
00452         self.traj.header.frame_id = str[start:end]
00453       start = end
00454       end += 4
00455       (length,) = _struct_I.unpack(str[start:end])
00456       self.traj.joint_names = []
00457       for i in range(0, length):
00458         start = end
00459         end += 4
00460         (length,) = _struct_I.unpack(str[start:end])
00461         start = end
00462         end += length
00463         if python3:
00464           val1 = str[start:end].decode('utf-8')
00465         else:
00466           val1 = str[start:end]
00467         self.traj.joint_names.append(val1)
00468       start = end
00469       end += 4
00470       (length,) = _struct_I.unpack(str[start:end])
00471       self.traj.points = []
00472       for i in range(0, length):
00473         val1 = trajectory_msgs.msg.JointTrajectoryPoint()
00474         start = end
00475         end += 4
00476         (length,) = _struct_I.unpack(str[start:end])
00477         pattern = '<%sd'%length
00478         start = end
00479         end += struct.calcsize(pattern)
00480         val1.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00481         start = end
00482         end += 4
00483         (length,) = _struct_I.unpack(str[start:end])
00484         pattern = '<%sd'%length
00485         start = end
00486         end += struct.calcsize(pattern)
00487         val1.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00488         start = end
00489         end += 4
00490         (length,) = _struct_I.unpack(str[start:end])
00491         pattern = '<%sd'%length
00492         start = end
00493         end += struct.calcsize(pattern)
00494         val1.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00495         _v4 = val1.time_from_start
00496         _x = _v4
00497         start = end
00498         end += 8
00499         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00500         self.traj.points.append(val1)
00501       return self
00502     except struct.error as e:
00503       raise genpy.DeserializationError(e) #most likely buffer underfill
00504 
00505 _struct_I = genpy.struct_I
00506 _struct_3I = struct.Struct("<3I")
00507 _struct_2i = struct.Struct("<2i")
00508 class MoveManipulator(object):
00509   _type          = 'orrosplanning/MoveManipulator'
00510   _md5sum = '74f289c2cf7cae777e8532c3b7799e1f'
00511   _request_class  = MoveManipulatorRequest
00512   _response_class = MoveManipulatorResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


orrosplanning
Author(s): Rosen Diankov (rosen.diankov@gmail.com)
autogenerated on Sat Mar 23 2013 22:32:56