$search
00001 """autogenerated by genmsg_py from PickAndPlaceActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import turtlebot_block_manipulation.msg 00006 import geometry_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class PickAndPlaceActionGoal(roslib.message.Message): 00012 _md5sum = "414a1aaefb37f8efaa1fba6d43aa0061" 00013 _type = "turtlebot_block_manipulation/PickAndPlaceActionGoal" 00014 _has_header = True #flag to mark the presence of a Header object 00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00016 00017 Header header 00018 actionlib_msgs/GoalID goal_id 00019 PickAndPlaceGoal 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: turtlebot_block_manipulation/PickAndPlaceGoal 00054 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00055 #goal definition 00056 string frame 00057 float32 z_up 00058 float32 gripper_open 00059 float32 gripper_closed 00060 geometry_msgs/Pose pickup_pose 00061 geometry_msgs/Pose place_pose 00062 string topic 00063 00064 ================================================================================ 00065 MSG: geometry_msgs/Pose 00066 # A representation of pose in free space, composed of postion and orientation. 00067 Point position 00068 Quaternion orientation 00069 00070 ================================================================================ 00071 MSG: geometry_msgs/Point 00072 # This contains the position of a point in free space 00073 float64 x 00074 float64 y 00075 float64 z 00076 00077 ================================================================================ 00078 MSG: geometry_msgs/Quaternion 00079 # This represents an orientation in free space in quaternion form. 00080 00081 float64 x 00082 float64 y 00083 float64 z 00084 float64 w 00085 00086 """ 00087 __slots__ = ['header','goal_id','goal'] 00088 _slot_types = ['Header','actionlib_msgs/GoalID','turtlebot_block_manipulation/PickAndPlaceGoal'] 00089 00090 def __init__(self, *args, **kwds): 00091 """ 00092 Constructor. Any message fields that are implicitly/explicitly 00093 set to None will be assigned a default value. The recommend 00094 use is keyword arguments as this is more robust to future message 00095 changes. You cannot mix in-order arguments and keyword arguments. 00096 00097 The available fields are: 00098 header,goal_id,goal 00099 00100 @param args: complete set of field values, in .msg order 00101 @param kwds: use keyword arguments corresponding to message field names 00102 to set specific fields. 00103 """ 00104 if args or kwds: 00105 super(PickAndPlaceActionGoal, self).__init__(*args, **kwds) 00106 #message fields cannot be None, assign default values for those that are 00107 if self.header is None: 00108 self.header = std_msgs.msg._Header.Header() 00109 if self.goal_id is None: 00110 self.goal_id = actionlib_msgs.msg.GoalID() 00111 if self.goal is None: 00112 self.goal = turtlebot_block_manipulation.msg.PickAndPlaceGoal() 00113 else: 00114 self.header = std_msgs.msg._Header.Header() 00115 self.goal_id = actionlib_msgs.msg.GoalID() 00116 self.goal = turtlebot_block_manipulation.msg.PickAndPlaceGoal() 00117 00118 def _get_types(self): 00119 """ 00120 internal API method 00121 """ 00122 return self._slot_types 00123 00124 def serialize(self, buff): 00125 """ 00126 serialize message into buffer 00127 @param buff: buffer 00128 @type buff: StringIO 00129 """ 00130 try: 00131 _x = self 00132 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00133 _x = self.header.frame_id 00134 length = len(_x) 00135 buff.write(struct.pack('<I%ss'%length, length, _x)) 00136 _x = self 00137 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00138 _x = self.goal_id.id 00139 length = len(_x) 00140 buff.write(struct.pack('<I%ss'%length, length, _x)) 00141 _x = self.goal.frame 00142 length = len(_x) 00143 buff.write(struct.pack('<I%ss'%length, length, _x)) 00144 _x = self 00145 buff.write(_struct_3f14d.pack(_x.goal.z_up, _x.goal.gripper_open, _x.goal.gripper_closed, _x.goal.pickup_pose.position.x, _x.goal.pickup_pose.position.y, _x.goal.pickup_pose.position.z, _x.goal.pickup_pose.orientation.x, _x.goal.pickup_pose.orientation.y, _x.goal.pickup_pose.orientation.z, _x.goal.pickup_pose.orientation.w, _x.goal.place_pose.position.x, _x.goal.place_pose.position.y, _x.goal.place_pose.position.z, _x.goal.place_pose.orientation.x, _x.goal.place_pose.orientation.y, _x.goal.place_pose.orientation.z, _x.goal.place_pose.orientation.w)) 00146 _x = self.goal.topic 00147 length = len(_x) 00148 buff.write(struct.pack('<I%ss'%length, length, _x)) 00149 except struct.error as se: self._check_types(se) 00150 except TypeError as te: self._check_types(te) 00151 00152 def deserialize(self, str): 00153 """ 00154 unpack serialized message in str into this message instance 00155 @param str: byte array of serialized message 00156 @type str: str 00157 """ 00158 try: 00159 if self.header is None: 00160 self.header = std_msgs.msg._Header.Header() 00161 if self.goal_id is None: 00162 self.goal_id = actionlib_msgs.msg.GoalID() 00163 if self.goal is None: 00164 self.goal = turtlebot_block_manipulation.msg.PickAndPlaceGoal() 00165 end = 0 00166 _x = self 00167 start = end 00168 end += 12 00169 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00170 start = end 00171 end += 4 00172 (length,) = _struct_I.unpack(str[start:end]) 00173 start = end 00174 end += length 00175 self.header.frame_id = str[start:end] 00176 _x = self 00177 start = end 00178 end += 8 00179 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00180 start = end 00181 end += 4 00182 (length,) = _struct_I.unpack(str[start:end]) 00183 start = end 00184 end += length 00185 self.goal_id.id = str[start:end] 00186 start = end 00187 end += 4 00188 (length,) = _struct_I.unpack(str[start:end]) 00189 start = end 00190 end += length 00191 self.goal.frame = str[start:end] 00192 _x = self 00193 start = end 00194 end += 124 00195 (_x.goal.z_up, _x.goal.gripper_open, _x.goal.gripper_closed, _x.goal.pickup_pose.position.x, _x.goal.pickup_pose.position.y, _x.goal.pickup_pose.position.z, _x.goal.pickup_pose.orientation.x, _x.goal.pickup_pose.orientation.y, _x.goal.pickup_pose.orientation.z, _x.goal.pickup_pose.orientation.w, _x.goal.place_pose.position.x, _x.goal.place_pose.position.y, _x.goal.place_pose.position.z, _x.goal.place_pose.orientation.x, _x.goal.place_pose.orientation.y, _x.goal.place_pose.orientation.z, _x.goal.place_pose.orientation.w,) = _struct_3f14d.unpack(str[start:end]) 00196 start = end 00197 end += 4 00198 (length,) = _struct_I.unpack(str[start:end]) 00199 start = end 00200 end += length 00201 self.goal.topic = str[start:end] 00202 return self 00203 except struct.error as e: 00204 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00205 00206 00207 def serialize_numpy(self, buff, numpy): 00208 """ 00209 serialize message with numpy array types into buffer 00210 @param buff: buffer 00211 @type buff: StringIO 00212 @param numpy: numpy python module 00213 @type numpy module 00214 """ 00215 try: 00216 _x = self 00217 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00218 _x = self.header.frame_id 00219 length = len(_x) 00220 buff.write(struct.pack('<I%ss'%length, length, _x)) 00221 _x = self 00222 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00223 _x = self.goal_id.id 00224 length = len(_x) 00225 buff.write(struct.pack('<I%ss'%length, length, _x)) 00226 _x = self.goal.frame 00227 length = len(_x) 00228 buff.write(struct.pack('<I%ss'%length, length, _x)) 00229 _x = self 00230 buff.write(_struct_3f14d.pack(_x.goal.z_up, _x.goal.gripper_open, _x.goal.gripper_closed, _x.goal.pickup_pose.position.x, _x.goal.pickup_pose.position.y, _x.goal.pickup_pose.position.z, _x.goal.pickup_pose.orientation.x, _x.goal.pickup_pose.orientation.y, _x.goal.pickup_pose.orientation.z, _x.goal.pickup_pose.orientation.w, _x.goal.place_pose.position.x, _x.goal.place_pose.position.y, _x.goal.place_pose.position.z, _x.goal.place_pose.orientation.x, _x.goal.place_pose.orientation.y, _x.goal.place_pose.orientation.z, _x.goal.place_pose.orientation.w)) 00231 _x = self.goal.topic 00232 length = len(_x) 00233 buff.write(struct.pack('<I%ss'%length, length, _x)) 00234 except struct.error as se: self._check_types(se) 00235 except TypeError as te: self._check_types(te) 00236 00237 def deserialize_numpy(self, str, numpy): 00238 """ 00239 unpack serialized message in str into this message instance using numpy for array types 00240 @param str: byte array of serialized message 00241 @type str: str 00242 @param numpy: numpy python module 00243 @type numpy: module 00244 """ 00245 try: 00246 if self.header is None: 00247 self.header = std_msgs.msg._Header.Header() 00248 if self.goal_id is None: 00249 self.goal_id = actionlib_msgs.msg.GoalID() 00250 if self.goal is None: 00251 self.goal = turtlebot_block_manipulation.msg.PickAndPlaceGoal() 00252 end = 0 00253 _x = self 00254 start = end 00255 end += 12 00256 (_x.header.seq, _x.header.stamp.secs, _x.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 self.header.frame_id = str[start:end] 00263 _x = self 00264 start = end 00265 end += 8 00266 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00267 start = end 00268 end += 4 00269 (length,) = _struct_I.unpack(str[start:end]) 00270 start = end 00271 end += length 00272 self.goal_id.id = str[start:end] 00273 start = end 00274 end += 4 00275 (length,) = _struct_I.unpack(str[start:end]) 00276 start = end 00277 end += length 00278 self.goal.frame = str[start:end] 00279 _x = self 00280 start = end 00281 end += 124 00282 (_x.goal.z_up, _x.goal.gripper_open, _x.goal.gripper_closed, _x.goal.pickup_pose.position.x, _x.goal.pickup_pose.position.y, _x.goal.pickup_pose.position.z, _x.goal.pickup_pose.orientation.x, _x.goal.pickup_pose.orientation.y, _x.goal.pickup_pose.orientation.z, _x.goal.pickup_pose.orientation.w, _x.goal.place_pose.position.x, _x.goal.place_pose.position.y, _x.goal.place_pose.position.z, _x.goal.place_pose.orientation.x, _x.goal.place_pose.orientation.y, _x.goal.place_pose.orientation.z, _x.goal.place_pose.orientation.w,) = _struct_3f14d.unpack(str[start:end]) 00283 start = end 00284 end += 4 00285 (length,) = _struct_I.unpack(str[start:end]) 00286 start = end 00287 end += length 00288 self.goal.topic = str[start:end] 00289 return self 00290 except struct.error as e: 00291 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00292 00293 _struct_I = roslib.message.struct_I 00294 _struct_3f14d = struct.Struct("<3f14d") 00295 _struct_3I = struct.Struct("<3I") 00296 _struct_2I = struct.Struct("<2I")