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


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