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