_ModelObjectInHandActionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_create_object_model/ModelObjectInHandActionGoal.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 pr2_create_object_model.msg
00008 import geometry_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012 
00013 class ModelObjectInHandActionGoal(genpy.Message):
00014   _md5sum = "a8491f28c088bcf34352bff94e068ce7"
00015   _type = "pr2_create_object_model/ModelObjectInHandActionGoal"
00016   _has_header = True #flag to mark the presence of a Header object
00017   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018 
00019 Header header
00020 actionlib_msgs/GoalID goal_id
00021 ModelObjectInHandGoal goal
00022 
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data 
00027 # in a particular coordinate frame.
00028 # 
00029 # sequence ID: consecutively increasing ID 
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040 
00041 ================================================================================
00042 MSG: actionlib_msgs/GoalID
00043 # The stamp should store the time at which this goal was requested.
00044 # It is used by an action server when it tries to preempt all
00045 # goals that were requested before a certain time
00046 time stamp
00047 
00048 # The id provides a way to associate feedback and
00049 # result message with specific goal requests. The id
00050 # specified must be unique.
00051 string id
00052 
00053 
00054 ================================================================================
00055 MSG: pr2_create_object_model/ModelObjectInHandGoal
00056 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00057 # which arm to use
00058 string arm_name
00059 
00060 # the relative motion in which to move the gripper to get it clear of objects 
00061 #(if left unfilled, will not move)
00062 geometry_msgs/Vector3Stamped clear_move
00063 
00064 # the pose to go to for rotating (if left unfilled, will not go)
00065 geometry_msgs/PoseStamped rotate_pose
00066 
00067 # whether to rotate the object at rotate_pose to build up the model
00068 uint8 rotate_object
00069 
00070 # whether to add the object to the collision map 
00071 uint8 add_to_collision_map
00072 
00073 # whether to keep the object level while rotating
00074 uint8 keep_level
00075 
00076 
00077 ================================================================================
00078 MSG: geometry_msgs/Vector3Stamped
00079 # This represents a Vector3 with reference coordinate frame and timestamp
00080 Header header
00081 Vector3 vector
00082 
00083 ================================================================================
00084 MSG: geometry_msgs/Vector3
00085 # This represents a vector in free space. 
00086 
00087 float64 x
00088 float64 y
00089 float64 z
00090 ================================================================================
00091 MSG: geometry_msgs/PoseStamped
00092 # A Pose with reference coordinate frame and timestamp
00093 Header header
00094 Pose pose
00095 
00096 ================================================================================
00097 MSG: geometry_msgs/Pose
00098 # A representation of pose in free space, composed of postion and orientation. 
00099 Point position
00100 Quaternion orientation
00101 
00102 ================================================================================
00103 MSG: geometry_msgs/Point
00104 # This contains the position of a point in free space
00105 float64 x
00106 float64 y
00107 float64 z
00108 
00109 ================================================================================
00110 MSG: geometry_msgs/Quaternion
00111 # This represents an orientation in free space in quaternion form.
00112 
00113 float64 x
00114 float64 y
00115 float64 z
00116 float64 w
00117 
00118 """
00119   __slots__ = ['header','goal_id','goal']
00120   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','pr2_create_object_model/ModelObjectInHandGoal']
00121 
00122   def __init__(self, *args, **kwds):
00123     """
00124     Constructor. Any message fields that are implicitly/explicitly
00125     set to None will be assigned a default value. The recommend
00126     use is keyword arguments as this is more robust to future message
00127     changes.  You cannot mix in-order arguments and keyword arguments.
00128 
00129     The available fields are:
00130        header,goal_id,goal
00131 
00132     :param args: complete set of field values, in .msg order
00133     :param kwds: use keyword arguments corresponding to message field names
00134     to set specific fields.
00135     """
00136     if args or kwds:
00137       super(ModelObjectInHandActionGoal, self).__init__(*args, **kwds)
00138       #message fields cannot be None, assign default values for those that are
00139       if self.header is None:
00140         self.header = std_msgs.msg.Header()
00141       if self.goal_id is None:
00142         self.goal_id = actionlib_msgs.msg.GoalID()
00143       if self.goal is None:
00144         self.goal = pr2_create_object_model.msg.ModelObjectInHandGoal()
00145     else:
00146       self.header = std_msgs.msg.Header()
00147       self.goal_id = actionlib_msgs.msg.GoalID()
00148       self.goal = pr2_create_object_model.msg.ModelObjectInHandGoal()
00149 
00150   def _get_types(self):
00151     """
00152     internal API method
00153     """
00154     return self._slot_types
00155 
00156   def serialize(self, buff):
00157     """
00158     serialize message into buffer
00159     :param buff: buffer, ``StringIO``
00160     """
00161     try:
00162       _x = self
00163       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00164       _x = self.header.frame_id
00165       length = len(_x)
00166       if python3 or type(_x) == unicode:
00167         _x = _x.encode('utf-8')
00168         length = len(_x)
00169       buff.write(struct.pack('<I%ss'%length, length, _x))
00170       _x = self
00171       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00172       _x = self.goal_id.id
00173       length = len(_x)
00174       if python3 or type(_x) == unicode:
00175         _x = _x.encode('utf-8')
00176         length = len(_x)
00177       buff.write(struct.pack('<I%ss'%length, length, _x))
00178       _x = self.goal.arm_name
00179       length = len(_x)
00180       if python3 or type(_x) == unicode:
00181         _x = _x.encode('utf-8')
00182         length = len(_x)
00183       buff.write(struct.pack('<I%ss'%length, length, _x))
00184       _x = self
00185       buff.write(_struct_3I.pack(_x.goal.clear_move.header.seq, _x.goal.clear_move.header.stamp.secs, _x.goal.clear_move.header.stamp.nsecs))
00186       _x = self.goal.clear_move.header.frame_id
00187       length = len(_x)
00188       if python3 or type(_x) == unicode:
00189         _x = _x.encode('utf-8')
00190         length = len(_x)
00191       buff.write(struct.pack('<I%ss'%length, length, _x))
00192       _x = self
00193       buff.write(_struct_3d3I.pack(_x.goal.clear_move.vector.x, _x.goal.clear_move.vector.y, _x.goal.clear_move.vector.z, _x.goal.rotate_pose.header.seq, _x.goal.rotate_pose.header.stamp.secs, _x.goal.rotate_pose.header.stamp.nsecs))
00194       _x = self.goal.rotate_pose.header.frame_id
00195       length = len(_x)
00196       if python3 or type(_x) == unicode:
00197         _x = _x.encode('utf-8')
00198         length = len(_x)
00199       buff.write(struct.pack('<I%ss'%length, length, _x))
00200       _x = self
00201       buff.write(_struct_7d3B.pack(_x.goal.rotate_pose.pose.position.x, _x.goal.rotate_pose.pose.position.y, _x.goal.rotate_pose.pose.position.z, _x.goal.rotate_pose.pose.orientation.x, _x.goal.rotate_pose.pose.orientation.y, _x.goal.rotate_pose.pose.orientation.z, _x.goal.rotate_pose.pose.orientation.w, _x.goal.rotate_object, _x.goal.add_to_collision_map, _x.goal.keep_level))
00202     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00203     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00204 
00205   def deserialize(self, str):
00206     """
00207     unpack serialized message in str into this message instance
00208     :param str: byte array of serialized message, ``str``
00209     """
00210     try:
00211       if self.header is None:
00212         self.header = std_msgs.msg.Header()
00213       if self.goal_id is None:
00214         self.goal_id = actionlib_msgs.msg.GoalID()
00215       if self.goal is None:
00216         self.goal = pr2_create_object_model.msg.ModelObjectInHandGoal()
00217       end = 0
00218       _x = self
00219       start = end
00220       end += 12
00221       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00222       start = end
00223       end += 4
00224       (length,) = _struct_I.unpack(str[start:end])
00225       start = end
00226       end += length
00227       if python3:
00228         self.header.frame_id = str[start:end].decode('utf-8')
00229       else:
00230         self.header.frame_id = str[start:end]
00231       _x = self
00232       start = end
00233       end += 8
00234       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00235       start = end
00236       end += 4
00237       (length,) = _struct_I.unpack(str[start:end])
00238       start = end
00239       end += length
00240       if python3:
00241         self.goal_id.id = str[start:end].decode('utf-8')
00242       else:
00243         self.goal_id.id = str[start:end]
00244       start = end
00245       end += 4
00246       (length,) = _struct_I.unpack(str[start:end])
00247       start = end
00248       end += length
00249       if python3:
00250         self.goal.arm_name = str[start:end].decode('utf-8')
00251       else:
00252         self.goal.arm_name = str[start:end]
00253       _x = self
00254       start = end
00255       end += 12
00256       (_x.goal.clear_move.header.seq, _x.goal.clear_move.header.stamp.secs, _x.goal.clear_move.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00257       start = end
00258       end += 4
00259       (length,) = _struct_I.unpack(str[start:end])
00260       start = end
00261       end += length
00262       if python3:
00263         self.goal.clear_move.header.frame_id = str[start:end].decode('utf-8')
00264       else:
00265         self.goal.clear_move.header.frame_id = str[start:end]
00266       _x = self
00267       start = end
00268       end += 36
00269       (_x.goal.clear_move.vector.x, _x.goal.clear_move.vector.y, _x.goal.clear_move.vector.z, _x.goal.rotate_pose.header.seq, _x.goal.rotate_pose.header.stamp.secs, _x.goal.rotate_pose.header.stamp.nsecs,) = _struct_3d3I.unpack(str[start:end])
00270       start = end
00271       end += 4
00272       (length,) = _struct_I.unpack(str[start:end])
00273       start = end
00274       end += length
00275       if python3:
00276         self.goal.rotate_pose.header.frame_id = str[start:end].decode('utf-8')
00277       else:
00278         self.goal.rotate_pose.header.frame_id = str[start:end]
00279       _x = self
00280       start = end
00281       end += 59
00282       (_x.goal.rotate_pose.pose.position.x, _x.goal.rotate_pose.pose.position.y, _x.goal.rotate_pose.pose.position.z, _x.goal.rotate_pose.pose.orientation.x, _x.goal.rotate_pose.pose.orientation.y, _x.goal.rotate_pose.pose.orientation.z, _x.goal.rotate_pose.pose.orientation.w, _x.goal.rotate_object, _x.goal.add_to_collision_map, _x.goal.keep_level,) = _struct_7d3B.unpack(str[start:end])
00283       return self
00284     except struct.error as e:
00285       raise genpy.DeserializationError(e) #most likely buffer underfill
00286 
00287 
00288   def serialize_numpy(self, buff, numpy):
00289     """
00290     serialize message with numpy array types into buffer
00291     :param buff: buffer, ``StringIO``
00292     :param numpy: numpy python module
00293     """
00294     try:
00295       _x = self
00296       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00297       _x = self.header.frame_id
00298       length = len(_x)
00299       if python3 or type(_x) == unicode:
00300         _x = _x.encode('utf-8')
00301         length = len(_x)
00302       buff.write(struct.pack('<I%ss'%length, length, _x))
00303       _x = self
00304       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00305       _x = self.goal_id.id
00306       length = len(_x)
00307       if python3 or type(_x) == unicode:
00308         _x = _x.encode('utf-8')
00309         length = len(_x)
00310       buff.write(struct.pack('<I%ss'%length, length, _x))
00311       _x = self.goal.arm_name
00312       length = len(_x)
00313       if python3 or type(_x) == unicode:
00314         _x = _x.encode('utf-8')
00315         length = len(_x)
00316       buff.write(struct.pack('<I%ss'%length, length, _x))
00317       _x = self
00318       buff.write(_struct_3I.pack(_x.goal.clear_move.header.seq, _x.goal.clear_move.header.stamp.secs, _x.goal.clear_move.header.stamp.nsecs))
00319       _x = self.goal.clear_move.header.frame_id
00320       length = len(_x)
00321       if python3 or type(_x) == unicode:
00322         _x = _x.encode('utf-8')
00323         length = len(_x)
00324       buff.write(struct.pack('<I%ss'%length, length, _x))
00325       _x = self
00326       buff.write(_struct_3d3I.pack(_x.goal.clear_move.vector.x, _x.goal.clear_move.vector.y, _x.goal.clear_move.vector.z, _x.goal.rotate_pose.header.seq, _x.goal.rotate_pose.header.stamp.secs, _x.goal.rotate_pose.header.stamp.nsecs))
00327       _x = self.goal.rotate_pose.header.frame_id
00328       length = len(_x)
00329       if python3 or type(_x) == unicode:
00330         _x = _x.encode('utf-8')
00331         length = len(_x)
00332       buff.write(struct.pack('<I%ss'%length, length, _x))
00333       _x = self
00334       buff.write(_struct_7d3B.pack(_x.goal.rotate_pose.pose.position.x, _x.goal.rotate_pose.pose.position.y, _x.goal.rotate_pose.pose.position.z, _x.goal.rotate_pose.pose.orientation.x, _x.goal.rotate_pose.pose.orientation.y, _x.goal.rotate_pose.pose.orientation.z, _x.goal.rotate_pose.pose.orientation.w, _x.goal.rotate_object, _x.goal.add_to_collision_map, _x.goal.keep_level))
00335     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00336     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00337 
00338   def deserialize_numpy(self, str, numpy):
00339     """
00340     unpack serialized message in str into this message instance using numpy for array types
00341     :param str: byte array of serialized message, ``str``
00342     :param numpy: numpy python module
00343     """
00344     try:
00345       if self.header is None:
00346         self.header = std_msgs.msg.Header()
00347       if self.goal_id is None:
00348         self.goal_id = actionlib_msgs.msg.GoalID()
00349       if self.goal is None:
00350         self.goal = pr2_create_object_model.msg.ModelObjectInHandGoal()
00351       end = 0
00352       _x = self
00353       start = end
00354       end += 12
00355       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00356       start = end
00357       end += 4
00358       (length,) = _struct_I.unpack(str[start:end])
00359       start = end
00360       end += length
00361       if python3:
00362         self.header.frame_id = str[start:end].decode('utf-8')
00363       else:
00364         self.header.frame_id = str[start:end]
00365       _x = self
00366       start = end
00367       end += 8
00368       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00369       start = end
00370       end += 4
00371       (length,) = _struct_I.unpack(str[start:end])
00372       start = end
00373       end += length
00374       if python3:
00375         self.goal_id.id = str[start:end].decode('utf-8')
00376       else:
00377         self.goal_id.id = str[start:end]
00378       start = end
00379       end += 4
00380       (length,) = _struct_I.unpack(str[start:end])
00381       start = end
00382       end += length
00383       if python3:
00384         self.goal.arm_name = str[start:end].decode('utf-8')
00385       else:
00386         self.goal.arm_name = str[start:end]
00387       _x = self
00388       start = end
00389       end += 12
00390       (_x.goal.clear_move.header.seq, _x.goal.clear_move.header.stamp.secs, _x.goal.clear_move.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00391       start = end
00392       end += 4
00393       (length,) = _struct_I.unpack(str[start:end])
00394       start = end
00395       end += length
00396       if python3:
00397         self.goal.clear_move.header.frame_id = str[start:end].decode('utf-8')
00398       else:
00399         self.goal.clear_move.header.frame_id = str[start:end]
00400       _x = self
00401       start = end
00402       end += 36
00403       (_x.goal.clear_move.vector.x, _x.goal.clear_move.vector.y, _x.goal.clear_move.vector.z, _x.goal.rotate_pose.header.seq, _x.goal.rotate_pose.header.stamp.secs, _x.goal.rotate_pose.header.stamp.nsecs,) = _struct_3d3I.unpack(str[start:end])
00404       start = end
00405       end += 4
00406       (length,) = _struct_I.unpack(str[start:end])
00407       start = end
00408       end += length
00409       if python3:
00410         self.goal.rotate_pose.header.frame_id = str[start:end].decode('utf-8')
00411       else:
00412         self.goal.rotate_pose.header.frame_id = str[start:end]
00413       _x = self
00414       start = end
00415       end += 59
00416       (_x.goal.rotate_pose.pose.position.x, _x.goal.rotate_pose.pose.position.y, _x.goal.rotate_pose.pose.position.z, _x.goal.rotate_pose.pose.orientation.x, _x.goal.rotate_pose.pose.orientation.y, _x.goal.rotate_pose.pose.orientation.z, _x.goal.rotate_pose.pose.orientation.w, _x.goal.rotate_object, _x.goal.add_to_collision_map, _x.goal.keep_level,) = _struct_7d3B.unpack(str[start:end])
00417       return self
00418     except struct.error as e:
00419       raise genpy.DeserializationError(e) #most likely buffer underfill
00420 
00421 _struct_I = genpy.struct_I
00422 _struct_3d3I = struct.Struct("<3d3I")
00423 _struct_3I = struct.Struct("<3I")
00424 _struct_2I = struct.Struct("<2I")
00425 _struct_7d3B = struct.Struct("<7d3B")


pr2_create_object_model
Author(s): Kaijen Hsiao
autogenerated on Mon Oct 6 2014 11:49:24