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