_MoveToHandPosition.py
Go to the documentation of this file.
00001 """autogenerated by genpy from orrosplanning/MoveToHandPositionRequest.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 MoveToHandPositionRequest(genpy.Message):
00011   _md5sum = "57f9d9f40a6c1af5b98ba199275be95b"
00012   _type = "orrosplanning/MoveToHandPositionRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """
00015 string hand_frame_id
00016 
00017 
00018 geometry_msgs/PoseStamped hand_goal
00019 
00020 
00021 string manip_name
00022 
00023 
00024 
00025 
00026 string planner
00027 
00028 
00029 ================================================================================
00030 MSG: geometry_msgs/PoseStamped
00031 # A Pose with reference coordinate frame and timestamp
00032 Header header
00033 Pose pose
00034 
00035 ================================================================================
00036 MSG: std_msgs/Header
00037 # Standard metadata for higher-level stamped data types.
00038 # This is generally used to communicate timestamped data 
00039 # in a particular coordinate frame.
00040 # 
00041 # sequence ID: consecutively increasing ID 
00042 uint32 seq
00043 #Two-integer timestamp that is expressed as:
00044 # * stamp.secs: seconds (stamp_secs) since epoch
00045 # * stamp.nsecs: nanoseconds since stamp_secs
00046 # time-handling sugar is provided by the client library
00047 time stamp
00048 #Frame this data is associated with
00049 # 0: no frame
00050 # 1: global frame
00051 string frame_id
00052 
00053 ================================================================================
00054 MSG: geometry_msgs/Pose
00055 # A representation of pose in free space, composed of postion and orientation. 
00056 Point position
00057 Quaternion orientation
00058 
00059 ================================================================================
00060 MSG: geometry_msgs/Point
00061 # This contains the position of a point in free space
00062 float64 x
00063 float64 y
00064 float64 z
00065 
00066 ================================================================================
00067 MSG: geometry_msgs/Quaternion
00068 # This represents an orientation in free space in quaternion form.
00069 
00070 float64 x
00071 float64 y
00072 float64 z
00073 float64 w
00074 
00075 """
00076   __slots__ = ['hand_frame_id','hand_goal','manip_name','planner']
00077   _slot_types = ['string','geometry_msgs/PoseStamped','string','string']
00078 
00079   def __init__(self, *args, **kwds):
00080     """
00081     Constructor. Any message fields that are implicitly/explicitly
00082     set to None will be assigned a default value. The recommend
00083     use is keyword arguments as this is more robust to future message
00084     changes.  You cannot mix in-order arguments and keyword arguments.
00085 
00086     The available fields are:
00087        hand_frame_id,hand_goal,manip_name,planner
00088 
00089     :param args: complete set of field values, in .msg order
00090     :param kwds: use keyword arguments corresponding to message field names
00091     to set specific fields.
00092     """
00093     if args or kwds:
00094       super(MoveToHandPositionRequest, self).__init__(*args, **kwds)
00095       #message fields cannot be None, assign default values for those that are
00096       if self.hand_frame_id is None:
00097         self.hand_frame_id = ''
00098       if self.hand_goal is None:
00099         self.hand_goal = geometry_msgs.msg.PoseStamped()
00100       if self.manip_name is None:
00101         self.manip_name = ''
00102       if self.planner is None:
00103         self.planner = ''
00104     else:
00105       self.hand_frame_id = ''
00106       self.hand_goal = geometry_msgs.msg.PoseStamped()
00107       self.manip_name = ''
00108       self.planner = ''
00109 
00110   def _get_types(self):
00111     """
00112     internal API method
00113     """
00114     return self._slot_types
00115 
00116   def serialize(self, buff):
00117     """
00118     serialize message into buffer
00119     :param buff: buffer, ``StringIO``
00120     """
00121     try:
00122       _x = self.hand_frame_id
00123       length = len(_x)
00124       if python3 or type(_x) == unicode:
00125         _x = _x.encode('utf-8')
00126         length = len(_x)
00127       buff.write(struct.pack('<I%ss'%length, length, _x))
00128       _x = self
00129       buff.write(_struct_3I.pack(_x.hand_goal.header.seq, _x.hand_goal.header.stamp.secs, _x.hand_goal.header.stamp.nsecs))
00130       _x = self.hand_goal.header.frame_id
00131       length = len(_x)
00132       if python3 or type(_x) == unicode:
00133         _x = _x.encode('utf-8')
00134         length = len(_x)
00135       buff.write(struct.pack('<I%ss'%length, length, _x))
00136       _x = self
00137       buff.write(_struct_7d.pack(_x.hand_goal.pose.position.x, _x.hand_goal.pose.position.y, _x.hand_goal.pose.position.z, _x.hand_goal.pose.orientation.x, _x.hand_goal.pose.orientation.y, _x.hand_goal.pose.orientation.z, _x.hand_goal.pose.orientation.w))
00138       _x = self.manip_name
00139       length = len(_x)
00140       if python3 or type(_x) == unicode:
00141         _x = _x.encode('utf-8')
00142         length = len(_x)
00143       buff.write(struct.pack('<I%ss'%length, length, _x))
00144       _x = self.planner
00145       length = len(_x)
00146       if python3 or type(_x) == unicode:
00147         _x = _x.encode('utf-8')
00148         length = len(_x)
00149       buff.write(struct.pack('<I%ss'%length, length, _x))
00150     except struct.error as se: self._check_types(se)
00151     except TypeError as te: self._check_types(te)
00152 
00153   def deserialize(self, str):
00154     """
00155     unpack serialized message in str into this message instance
00156     :param str: byte array of serialized message, ``str``
00157     """
00158     try:
00159       if self.hand_goal is None:
00160         self.hand_goal = geometry_msgs.msg.PoseStamped()
00161       end = 0
00162       start = end
00163       end += 4
00164       (length,) = _struct_I.unpack(str[start:end])
00165       start = end
00166       end += length
00167       if python3:
00168         self.hand_frame_id = str[start:end].decode('utf-8')
00169       else:
00170         self.hand_frame_id = str[start:end]
00171       _x = self
00172       start = end
00173       end += 12
00174       (_x.hand_goal.header.seq, _x.hand_goal.header.stamp.secs, _x.hand_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00175       start = end
00176       end += 4
00177       (length,) = _struct_I.unpack(str[start:end])
00178       start = end
00179       end += length
00180       if python3:
00181         self.hand_goal.header.frame_id = str[start:end].decode('utf-8')
00182       else:
00183         self.hand_goal.header.frame_id = str[start:end]
00184       _x = self
00185       start = end
00186       end += 56
00187       (_x.hand_goal.pose.position.x, _x.hand_goal.pose.position.y, _x.hand_goal.pose.position.z, _x.hand_goal.pose.orientation.x, _x.hand_goal.pose.orientation.y, _x.hand_goal.pose.orientation.z, _x.hand_goal.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00188       start = end
00189       end += 4
00190       (length,) = _struct_I.unpack(str[start:end])
00191       start = end
00192       end += length
00193       if python3:
00194         self.manip_name = str[start:end].decode('utf-8')
00195       else:
00196         self.manip_name = str[start:end]
00197       start = end
00198       end += 4
00199       (length,) = _struct_I.unpack(str[start:end])
00200       start = end
00201       end += length
00202       if python3:
00203         self.planner = str[start:end].decode('utf-8')
00204       else:
00205         self.planner = str[start:end]
00206       return self
00207     except struct.error as e:
00208       raise genpy.DeserializationError(e) #most likely buffer underfill
00209 
00210 
00211   def serialize_numpy(self, buff, numpy):
00212     """
00213     serialize message with numpy array types into buffer
00214     :param buff: buffer, ``StringIO``
00215     :param numpy: numpy python module
00216     """
00217     try:
00218       _x = self.hand_frame_id
00219       length = len(_x)
00220       if python3 or type(_x) == unicode:
00221         _x = _x.encode('utf-8')
00222         length = len(_x)
00223       buff.write(struct.pack('<I%ss'%length, length, _x))
00224       _x = self
00225       buff.write(_struct_3I.pack(_x.hand_goal.header.seq, _x.hand_goal.header.stamp.secs, _x.hand_goal.header.stamp.nsecs))
00226       _x = self.hand_goal.header.frame_id
00227       length = len(_x)
00228       if python3 or type(_x) == unicode:
00229         _x = _x.encode('utf-8')
00230         length = len(_x)
00231       buff.write(struct.pack('<I%ss'%length, length, _x))
00232       _x = self
00233       buff.write(_struct_7d.pack(_x.hand_goal.pose.position.x, _x.hand_goal.pose.position.y, _x.hand_goal.pose.position.z, _x.hand_goal.pose.orientation.x, _x.hand_goal.pose.orientation.y, _x.hand_goal.pose.orientation.z, _x.hand_goal.pose.orientation.w))
00234       _x = self.manip_name
00235       length = len(_x)
00236       if python3 or type(_x) == unicode:
00237         _x = _x.encode('utf-8')
00238         length = len(_x)
00239       buff.write(struct.pack('<I%ss'%length, length, _x))
00240       _x = self.planner
00241       length = len(_x)
00242       if python3 or type(_x) == unicode:
00243         _x = _x.encode('utf-8')
00244         length = len(_x)
00245       buff.write(struct.pack('<I%ss'%length, length, _x))
00246     except struct.error as se: self._check_types(se)
00247     except TypeError as te: self._check_types(te)
00248 
00249   def deserialize_numpy(self, str, numpy):
00250     """
00251     unpack serialized message in str into this message instance using numpy for array types
00252     :param str: byte array of serialized message, ``str``
00253     :param numpy: numpy python module
00254     """
00255     try:
00256       if self.hand_goal is None:
00257         self.hand_goal = geometry_msgs.msg.PoseStamped()
00258       end = 0
00259       start = end
00260       end += 4
00261       (length,) = _struct_I.unpack(str[start:end])
00262       start = end
00263       end += length
00264       if python3:
00265         self.hand_frame_id = str[start:end].decode('utf-8')
00266       else:
00267         self.hand_frame_id = str[start:end]
00268       _x = self
00269       start = end
00270       end += 12
00271       (_x.hand_goal.header.seq, _x.hand_goal.header.stamp.secs, _x.hand_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00272       start = end
00273       end += 4
00274       (length,) = _struct_I.unpack(str[start:end])
00275       start = end
00276       end += length
00277       if python3:
00278         self.hand_goal.header.frame_id = str[start:end].decode('utf-8')
00279       else:
00280         self.hand_goal.header.frame_id = str[start:end]
00281       _x = self
00282       start = end
00283       end += 56
00284       (_x.hand_goal.pose.position.x, _x.hand_goal.pose.position.y, _x.hand_goal.pose.position.z, _x.hand_goal.pose.orientation.x, _x.hand_goal.pose.orientation.y, _x.hand_goal.pose.orientation.z, _x.hand_goal.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00285       start = end
00286       end += 4
00287       (length,) = _struct_I.unpack(str[start:end])
00288       start = end
00289       end += length
00290       if python3:
00291         self.manip_name = str[start:end].decode('utf-8')
00292       else:
00293         self.manip_name = str[start:end]
00294       start = end
00295       end += 4
00296       (length,) = _struct_I.unpack(str[start:end])
00297       start = end
00298       end += length
00299       if python3:
00300         self.planner = str[start:end].decode('utf-8')
00301       else:
00302         self.planner = str[start:end]
00303       return self
00304     except struct.error as e:
00305       raise genpy.DeserializationError(e) #most likely buffer underfill
00306 
00307 _struct_I = genpy.struct_I
00308 _struct_3I = struct.Struct("<3I")
00309 _struct_7d = struct.Struct("<7d")
00310 """autogenerated by genpy from orrosplanning/MoveToHandPositionResponse.msg. Do not edit."""
00311 import sys
00312 python3 = True if sys.hexversion > 0x03000000 else False
00313 import genpy
00314 import struct
00315 
00316 import trajectory_msgs.msg
00317 import genpy
00318 import std_msgs.msg
00319 
00320 class MoveToHandPositionResponse(genpy.Message):
00321   _md5sum = "3599ef8bd760f4d2153c7264e9291184"
00322   _type = "orrosplanning/MoveToHandPositionResponse"
00323   _has_header = False #flag to mark the presence of a Header object
00324   _full_text = """trajectory_msgs/JointTrajectory traj
00325 
00326 
00327 ================================================================================
00328 MSG: trajectory_msgs/JointTrajectory
00329 Header header
00330 string[] joint_names
00331 JointTrajectoryPoint[] points
00332 ================================================================================
00333 MSG: std_msgs/Header
00334 # Standard metadata for higher-level stamped data types.
00335 # This is generally used to communicate timestamped data 
00336 # in a particular coordinate frame.
00337 # 
00338 # sequence ID: consecutively increasing ID 
00339 uint32 seq
00340 #Two-integer timestamp that is expressed as:
00341 # * stamp.secs: seconds (stamp_secs) since epoch
00342 # * stamp.nsecs: nanoseconds since stamp_secs
00343 # time-handling sugar is provided by the client library
00344 time stamp
00345 #Frame this data is associated with
00346 # 0: no frame
00347 # 1: global frame
00348 string frame_id
00349 
00350 ================================================================================
00351 MSG: trajectory_msgs/JointTrajectoryPoint
00352 float64[] positions
00353 float64[] velocities
00354 float64[] accelerations
00355 duration time_from_start
00356 """
00357   __slots__ = ['traj']
00358   _slot_types = ['trajectory_msgs/JointTrajectory']
00359 
00360   def __init__(self, *args, **kwds):
00361     """
00362     Constructor. Any message fields that are implicitly/explicitly
00363     set to None will be assigned a default value. The recommend
00364     use is keyword arguments as this is more robust to future message
00365     changes.  You cannot mix in-order arguments and keyword arguments.
00366 
00367     The available fields are:
00368        traj
00369 
00370     :param args: complete set of field values, in .msg order
00371     :param kwds: use keyword arguments corresponding to message field names
00372     to set specific fields.
00373     """
00374     if args or kwds:
00375       super(MoveToHandPositionResponse, self).__init__(*args, **kwds)
00376       #message fields cannot be None, assign default values for those that are
00377       if self.traj is None:
00378         self.traj = trajectory_msgs.msg.JointTrajectory()
00379     else:
00380       self.traj = trajectory_msgs.msg.JointTrajectory()
00381 
00382   def _get_types(self):
00383     """
00384     internal API method
00385     """
00386     return self._slot_types
00387 
00388   def serialize(self, buff):
00389     """
00390     serialize message into buffer
00391     :param buff: buffer, ``StringIO``
00392     """
00393     try:
00394       _x = self
00395       buff.write(_struct_3I.pack(_x.traj.header.seq, _x.traj.header.stamp.secs, _x.traj.header.stamp.nsecs))
00396       _x = self.traj.header.frame_id
00397       length = len(_x)
00398       if python3 or type(_x) == unicode:
00399         _x = _x.encode('utf-8')
00400         length = len(_x)
00401       buff.write(struct.pack('<I%ss'%length, length, _x))
00402       length = len(self.traj.joint_names)
00403       buff.write(_struct_I.pack(length))
00404       for val1 in self.traj.joint_names:
00405         length = len(val1)
00406         if python3 or type(val1) == unicode:
00407           val1 = val1.encode('utf-8')
00408           length = len(val1)
00409         buff.write(struct.pack('<I%ss'%length, length, val1))
00410       length = len(self.traj.points)
00411       buff.write(_struct_I.pack(length))
00412       for val1 in self.traj.points:
00413         length = len(val1.positions)
00414         buff.write(_struct_I.pack(length))
00415         pattern = '<%sd'%length
00416         buff.write(struct.pack(pattern, *val1.positions))
00417         length = len(val1.velocities)
00418         buff.write(_struct_I.pack(length))
00419         pattern = '<%sd'%length
00420         buff.write(struct.pack(pattern, *val1.velocities))
00421         length = len(val1.accelerations)
00422         buff.write(_struct_I.pack(length))
00423         pattern = '<%sd'%length
00424         buff.write(struct.pack(pattern, *val1.accelerations))
00425         _v1 = val1.time_from_start
00426         _x = _v1
00427         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00428     except struct.error as se: self._check_types(se)
00429     except TypeError as te: self._check_types(te)
00430 
00431   def deserialize(self, str):
00432     """
00433     unpack serialized message in str into this message instance
00434     :param str: byte array of serialized message, ``str``
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 = struct.unpack(pattern, str[start:end])
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 = struct.unpack(pattern, str[start:end])
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 = struct.unpack(pattern, str[start:end])
00495         _v2 = val1.time_from_start
00496         _x = _v2
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 
00506   def serialize_numpy(self, buff, numpy):
00507     """
00508     serialize message with numpy array types into buffer
00509     :param buff: buffer, ``StringIO``
00510     :param numpy: numpy python module
00511     """
00512     try:
00513       _x = self
00514       buff.write(_struct_3I.pack(_x.traj.header.seq, _x.traj.header.stamp.secs, _x.traj.header.stamp.nsecs))
00515       _x = self.traj.header.frame_id
00516       length = len(_x)
00517       if python3 or type(_x) == unicode:
00518         _x = _x.encode('utf-8')
00519         length = len(_x)
00520       buff.write(struct.pack('<I%ss'%length, length, _x))
00521       length = len(self.traj.joint_names)
00522       buff.write(_struct_I.pack(length))
00523       for val1 in self.traj.joint_names:
00524         length = len(val1)
00525         if python3 or type(val1) == unicode:
00526           val1 = val1.encode('utf-8')
00527           length = len(val1)
00528         buff.write(struct.pack('<I%ss'%length, length, val1))
00529       length = len(self.traj.points)
00530       buff.write(_struct_I.pack(length))
00531       for val1 in self.traj.points:
00532         length = len(val1.positions)
00533         buff.write(_struct_I.pack(length))
00534         pattern = '<%sd'%length
00535         buff.write(val1.positions.tostring())
00536         length = len(val1.velocities)
00537         buff.write(_struct_I.pack(length))
00538         pattern = '<%sd'%length
00539         buff.write(val1.velocities.tostring())
00540         length = len(val1.accelerations)
00541         buff.write(_struct_I.pack(length))
00542         pattern = '<%sd'%length
00543         buff.write(val1.accelerations.tostring())
00544         _v3 = val1.time_from_start
00545         _x = _v3
00546         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00547     except struct.error as se: self._check_types(se)
00548     except TypeError as te: self._check_types(te)
00549 
00550   def deserialize_numpy(self, str, numpy):
00551     """
00552     unpack serialized message in str into this message instance using numpy for array types
00553     :param str: byte array of serialized message, ``str``
00554     :param numpy: numpy python module
00555     """
00556     try:
00557       if self.traj is None:
00558         self.traj = trajectory_msgs.msg.JointTrajectory()
00559       end = 0
00560       _x = self
00561       start = end
00562       end += 12
00563       (_x.traj.header.seq, _x.traj.header.stamp.secs, _x.traj.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00564       start = end
00565       end += 4
00566       (length,) = _struct_I.unpack(str[start:end])
00567       start = end
00568       end += length
00569       if python3:
00570         self.traj.header.frame_id = str[start:end].decode('utf-8')
00571       else:
00572         self.traj.header.frame_id = str[start:end]
00573       start = end
00574       end += 4
00575       (length,) = _struct_I.unpack(str[start:end])
00576       self.traj.joint_names = []
00577       for i in range(0, length):
00578         start = end
00579         end += 4
00580         (length,) = _struct_I.unpack(str[start:end])
00581         start = end
00582         end += length
00583         if python3:
00584           val1 = str[start:end].decode('utf-8')
00585         else:
00586           val1 = str[start:end]
00587         self.traj.joint_names.append(val1)
00588       start = end
00589       end += 4
00590       (length,) = _struct_I.unpack(str[start:end])
00591       self.traj.points = []
00592       for i in range(0, length):
00593         val1 = trajectory_msgs.msg.JointTrajectoryPoint()
00594         start = end
00595         end += 4
00596         (length,) = _struct_I.unpack(str[start:end])
00597         pattern = '<%sd'%length
00598         start = end
00599         end += struct.calcsize(pattern)
00600         val1.positions = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00601         start = end
00602         end += 4
00603         (length,) = _struct_I.unpack(str[start:end])
00604         pattern = '<%sd'%length
00605         start = end
00606         end += struct.calcsize(pattern)
00607         val1.velocities = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00608         start = end
00609         end += 4
00610         (length,) = _struct_I.unpack(str[start:end])
00611         pattern = '<%sd'%length
00612         start = end
00613         end += struct.calcsize(pattern)
00614         val1.accelerations = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
00615         _v4 = val1.time_from_start
00616         _x = _v4
00617         start = end
00618         end += 8
00619         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00620         self.traj.points.append(val1)
00621       return self
00622     except struct.error as e:
00623       raise genpy.DeserializationError(e) #most likely buffer underfill
00624 
00625 _struct_I = genpy.struct_I
00626 _struct_3I = struct.Struct("<3I")
00627 _struct_2i = struct.Struct("<2i")
00628 class MoveToHandPosition(object):
00629   _type          = 'orrosplanning/MoveToHandPosition'
00630   _md5sum = '6647c9faa66df7b4a3c457211e5586dc'
00631   _request_class  = MoveToHandPositionRequest
00632   _response_class = MoveToHandPositionResponse
 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