$search
00001 """autogenerated by genmsg_py from PoseStampedScriptedActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import pr2_object_manipulation_msgs.msg 00006 import geometry_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class PoseStampedScriptedActionGoal(roslib.message.Message): 00012 _md5sum = "2eb35aeaeedfba75ecc263cfd4657233" 00013 _type = "pr2_object_manipulation_msgs/PoseStampedScriptedActionGoal" 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 PoseStampedScriptedGoal 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_object_manipulation_msgs/PoseStampedScriptedGoal 00054 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00055 geometry_msgs/PoseStamped pose_stamped 00056 00057 00058 ================================================================================ 00059 MSG: geometry_msgs/PoseStamped 00060 # A Pose with reference coordinate frame and timestamp 00061 Header header 00062 Pose pose 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','pr2_object_manipulation_msgs/PoseStampedScriptedGoal'] 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(PoseStampedScriptedActionGoal, 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 = pr2_object_manipulation_msgs.msg.PoseStampedScriptedGoal() 00113 else: 00114 self.header = std_msgs.msg._Header.Header() 00115 self.goal_id = actionlib_msgs.msg.GoalID() 00116 self.goal = pr2_object_manipulation_msgs.msg.PoseStampedScriptedGoal() 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 00142 buff.write(_struct_3I.pack(_x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs)) 00143 _x = self.goal.pose_stamped.header.frame_id 00144 length = len(_x) 00145 buff.write(struct.pack('<I%ss'%length, length, _x)) 00146 _x = self 00147 buff.write(_struct_7d.pack(_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w)) 00148 except struct.error as se: self._check_types(se) 00149 except TypeError as te: self._check_types(te) 00150 00151 def deserialize(self, str): 00152 """ 00153 unpack serialized message in str into this message instance 00154 @param str: byte array of serialized message 00155 @type str: str 00156 """ 00157 try: 00158 if self.header is None: 00159 self.header = std_msgs.msg._Header.Header() 00160 if self.goal_id is None: 00161 self.goal_id = actionlib_msgs.msg.GoalID() 00162 if self.goal is None: 00163 self.goal = pr2_object_manipulation_msgs.msg.PoseStampedScriptedGoal() 00164 end = 0 00165 _x = self 00166 start = end 00167 end += 12 00168 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00169 start = end 00170 end += 4 00171 (length,) = _struct_I.unpack(str[start:end]) 00172 start = end 00173 end += length 00174 self.header.frame_id = str[start:end] 00175 _x = self 00176 start = end 00177 end += 8 00178 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00179 start = end 00180 end += 4 00181 (length,) = _struct_I.unpack(str[start:end]) 00182 start = end 00183 end += length 00184 self.goal_id.id = str[start:end] 00185 _x = self 00186 start = end 00187 end += 12 00188 (_x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00189 start = end 00190 end += 4 00191 (length,) = _struct_I.unpack(str[start:end]) 00192 start = end 00193 end += length 00194 self.goal.pose_stamped.header.frame_id = str[start:end] 00195 _x = self 00196 start = end 00197 end += 56 00198 (_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00199 return self 00200 except struct.error as e: 00201 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00202 00203 00204 def serialize_numpy(self, buff, numpy): 00205 """ 00206 serialize message with numpy array types into buffer 00207 @param buff: buffer 00208 @type buff: StringIO 00209 @param numpy: numpy python module 00210 @type numpy module 00211 """ 00212 try: 00213 _x = self 00214 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00215 _x = self.header.frame_id 00216 length = len(_x) 00217 buff.write(struct.pack('<I%ss'%length, length, _x)) 00218 _x = self 00219 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00220 _x = self.goal_id.id 00221 length = len(_x) 00222 buff.write(struct.pack('<I%ss'%length, length, _x)) 00223 _x = self 00224 buff.write(_struct_3I.pack(_x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs)) 00225 _x = self.goal.pose_stamped.header.frame_id 00226 length = len(_x) 00227 buff.write(struct.pack('<I%ss'%length, length, _x)) 00228 _x = self 00229 buff.write(_struct_7d.pack(_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w)) 00230 except struct.error as se: self._check_types(se) 00231 except TypeError as te: self._check_types(te) 00232 00233 def deserialize_numpy(self, str, numpy): 00234 """ 00235 unpack serialized message in str into this message instance using numpy for array types 00236 @param str: byte array of serialized message 00237 @type str: str 00238 @param numpy: numpy python module 00239 @type numpy: module 00240 """ 00241 try: 00242 if self.header is None: 00243 self.header = std_msgs.msg._Header.Header() 00244 if self.goal_id is None: 00245 self.goal_id = actionlib_msgs.msg.GoalID() 00246 if self.goal is None: 00247 self.goal = pr2_object_manipulation_msgs.msg.PoseStampedScriptedGoal() 00248 end = 0 00249 _x = self 00250 start = end 00251 end += 12 00252 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00253 start = end 00254 end += 4 00255 (length,) = _struct_I.unpack(str[start:end]) 00256 start = end 00257 end += length 00258 self.header.frame_id = str[start:end] 00259 _x = self 00260 start = end 00261 end += 8 00262 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00263 start = end 00264 end += 4 00265 (length,) = _struct_I.unpack(str[start:end]) 00266 start = end 00267 end += length 00268 self.goal_id.id = str[start:end] 00269 _x = self 00270 start = end 00271 end += 12 00272 (_x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs,) = _struct_3I.unpack(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.pose_stamped.header.frame_id = str[start:end] 00279 _x = self 00280 start = end 00281 end += 56 00282 (_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w,) = _struct_7d.unpack(str[start:end]) 00283 return self 00284 except struct.error as e: 00285 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00286 00287 _struct_I = roslib.message.struct_I 00288 _struct_3I = struct.Struct("<3I") 00289 _struct_7d = struct.Struct("<7d") 00290 _struct_2I = struct.Struct("<2I")