00001 """autogenerated by genmsg_py from ModelObjectInHandActionGoal.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import pr2_create_object_model.msg
00006 import roslib.rostime
00007 import actionlib_msgs.msg
00008 import std_msgs.msg
00009
00010 class ModelObjectInHandActionGoal(roslib.message.Message):
00011 _md5sum = "ee87bb98c5542ced4580f452de67872b"
00012 _type = "pr2_create_object_model/ModelObjectInHandActionGoal"
00013 _has_header = True
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 Header header
00017 actionlib_msgs/GoalID goal_id
00018 ModelObjectInHandGoal goal
00019
00020 ================================================================================
00021 MSG: std_msgs/Header
00022 # Standard metadata for higher-level stamped data types.
00023 # This is generally used to communicate timestamped data
00024 # in a particular coordinate frame.
00025 #
00026 # sequence ID: consecutively increasing ID
00027 uint32 seq
00028 #Two-integer timestamp that is expressed as:
00029 # * stamp.secs: seconds (stamp_secs) since epoch
00030 # * stamp.nsecs: nanoseconds since stamp_secs
00031 # time-handling sugar is provided by the client library
00032 time stamp
00033 #Frame this data is associated with
00034 # 0: no frame
00035 # 1: global frame
00036 string frame_id
00037
00038 ================================================================================
00039 MSG: actionlib_msgs/GoalID
00040 # The stamp should store the time at which this goal was requested.
00041 # It is used by an action server when it tries to preempt all
00042 # goals that were requested before a certain time
00043 time stamp
00044
00045 # The id provides a way to associate feedback and
00046 # result message with specific goal requests. The id
00047 # specified must be unique.
00048 string id
00049
00050
00051 ================================================================================
00052 MSG: pr2_create_object_model/ModelObjectInHandGoal
00053 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00054 string arm_name
00055 uint8 move_arm
00056 uint8 keep_level
00057 uint8 add_to_collision_map
00058
00059
00060 """
00061 __slots__ = ['header','goal_id','goal']
00062 _slot_types = ['Header','actionlib_msgs/GoalID','pr2_create_object_model/ModelObjectInHandGoal']
00063
00064 def __init__(self, *args, **kwds):
00065 """
00066 Constructor. Any message fields that are implicitly/explicitly
00067 set to None will be assigned a default value. The recommend
00068 use is keyword arguments as this is more robust to future message
00069 changes. You cannot mix in-order arguments and keyword arguments.
00070
00071 The available fields are:
00072 header,goal_id,goal
00073
00074 @param args: complete set of field values, in .msg order
00075 @param kwds: use keyword arguments corresponding to message field names
00076 to set specific fields.
00077 """
00078 if args or kwds:
00079 super(ModelObjectInHandActionGoal, self).__init__(*args, **kwds)
00080
00081 if self.header is None:
00082 self.header = std_msgs.msg._Header.Header()
00083 if self.goal_id is None:
00084 self.goal_id = actionlib_msgs.msg.GoalID()
00085 if self.goal is None:
00086 self.goal = pr2_create_object_model.msg.ModelObjectInHandGoal()
00087 else:
00088 self.header = std_msgs.msg._Header.Header()
00089 self.goal_id = actionlib_msgs.msg.GoalID()
00090 self.goal = pr2_create_object_model.msg.ModelObjectInHandGoal()
00091
00092 def _get_types(self):
00093 """
00094 internal API method
00095 """
00096 return self._slot_types
00097
00098 def serialize(self, buff):
00099 """
00100 serialize message into buffer
00101 @param buff: buffer
00102 @type buff: StringIO
00103 """
00104 try:
00105 _x = self
00106 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00107 _x = self.header.frame_id
00108 length = len(_x)
00109 buff.write(struct.pack('<I%ss'%length, length, _x))
00110 _x = self
00111 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00112 _x = self.goal_id.id
00113 length = len(_x)
00114 buff.write(struct.pack('<I%ss'%length, length, _x))
00115 _x = self.goal.arm_name
00116 length = len(_x)
00117 buff.write(struct.pack('<I%ss'%length, length, _x))
00118 _x = self
00119 buff.write(_struct_3B.pack(_x.goal.move_arm, _x.goal.keep_level, _x.goal.add_to_collision_map))
00120 except struct.error, se: self._check_types(se)
00121 except TypeError, te: self._check_types(te)
00122
00123 def deserialize(self, str):
00124 """
00125 unpack serialized message in str into this message instance
00126 @param str: byte array of serialized message
00127 @type str: str
00128 """
00129 try:
00130 if self.header is None:
00131 self.header = std_msgs.msg._Header.Header()
00132 if self.goal_id is None:
00133 self.goal_id = actionlib_msgs.msg.GoalID()
00134 if self.goal is None:
00135 self.goal = pr2_create_object_model.msg.ModelObjectInHandGoal()
00136 end = 0
00137 _x = self
00138 start = end
00139 end += 12
00140 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00141 start = end
00142 end += 4
00143 (length,) = _struct_I.unpack(str[start:end])
00144 start = end
00145 end += length
00146 self.header.frame_id = str[start:end]
00147 _x = self
00148 start = end
00149 end += 8
00150 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00151 start = end
00152 end += 4
00153 (length,) = _struct_I.unpack(str[start:end])
00154 start = end
00155 end += length
00156 self.goal_id.id = str[start:end]
00157 start = end
00158 end += 4
00159 (length,) = _struct_I.unpack(str[start:end])
00160 start = end
00161 end += length
00162 self.goal.arm_name = str[start:end]
00163 _x = self
00164 start = end
00165 end += 3
00166 (_x.goal.move_arm, _x.goal.keep_level, _x.goal.add_to_collision_map,) = _struct_3B.unpack(str[start:end])
00167 return self
00168 except struct.error, e:
00169 raise roslib.message.DeserializationError(e)
00170
00171
00172 def serialize_numpy(self, buff, numpy):
00173 """
00174 serialize message with numpy array types into buffer
00175 @param buff: buffer
00176 @type buff: StringIO
00177 @param numpy: numpy python module
00178 @type numpy module
00179 """
00180 try:
00181 _x = self
00182 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00183 _x = self.header.frame_id
00184 length = len(_x)
00185 buff.write(struct.pack('<I%ss'%length, length, _x))
00186 _x = self
00187 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00188 _x = self.goal_id.id
00189 length = len(_x)
00190 buff.write(struct.pack('<I%ss'%length, length, _x))
00191 _x = self.goal.arm_name
00192 length = len(_x)
00193 buff.write(struct.pack('<I%ss'%length, length, _x))
00194 _x = self
00195 buff.write(_struct_3B.pack(_x.goal.move_arm, _x.goal.keep_level, _x.goal.add_to_collision_map))
00196 except struct.error, se: self._check_types(se)
00197 except TypeError, te: self._check_types(te)
00198
00199 def deserialize_numpy(self, str, numpy):
00200 """
00201 unpack serialized message in str into this message instance using numpy for array types
00202 @param str: byte array of serialized message
00203 @type str: str
00204 @param numpy: numpy python module
00205 @type numpy: module
00206 """
00207 try:
00208 if self.header is None:
00209 self.header = std_msgs.msg._Header.Header()
00210 if self.goal_id is None:
00211 self.goal_id = actionlib_msgs.msg.GoalID()
00212 if self.goal is None:
00213 self.goal = pr2_create_object_model.msg.ModelObjectInHandGoal()
00214 end = 0
00215 _x = self
00216 start = end
00217 end += 12
00218 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00219 start = end
00220 end += 4
00221 (length,) = _struct_I.unpack(str[start:end])
00222 start = end
00223 end += length
00224 self.header.frame_id = str[start:end]
00225 _x = self
00226 start = end
00227 end += 8
00228 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00229 start = end
00230 end += 4
00231 (length,) = _struct_I.unpack(str[start:end])
00232 start = end
00233 end += length
00234 self.goal_id.id = str[start:end]
00235 start = end
00236 end += 4
00237 (length,) = _struct_I.unpack(str[start:end])
00238 start = end
00239 end += length
00240 self.goal.arm_name = str[start:end]
00241 _x = self
00242 start = end
00243 end += 3
00244 (_x.goal.move_arm, _x.goal.keep_level, _x.goal.add_to_collision_map,) = _struct_3B.unpack(str[start:end])
00245 return self
00246 except struct.error, e:
00247 raise roslib.message.DeserializationError(e)
00248
00249 _struct_I = roslib.message.struct_I
00250 _struct_3B = struct.Struct("<3B")
00251 _struct_3I = struct.Struct("<3I")
00252 _struct_2I = struct.Struct("<2I")