$search
00001 """autogenerated by genmsg_py from PointHeadActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import pr2_controllers_msgs.msg 00006 import geometry_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class PointHeadActionGoal(roslib.message.Message): 00012 _md5sum = "b53a8323d0ba7b310ba17a2d3a82a6b8" 00013 _type = "pr2_controllers_msgs/PointHeadActionGoal" 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 PointHeadGoal 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_controllers_msgs/PointHeadGoal 00054 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00055 geometry_msgs/PointStamped target 00056 geometry_msgs/Vector3 pointing_axis 00057 string pointing_frame 00058 duration min_duration 00059 float64 max_velocity 00060 00061 ================================================================================ 00062 MSG: geometry_msgs/PointStamped 00063 # This represents a Point with reference coordinate frame and timestamp 00064 Header header 00065 Point point 00066 00067 ================================================================================ 00068 MSG: geometry_msgs/Point 00069 # This contains the position of a point in free space 00070 float64 x 00071 float64 y 00072 float64 z 00073 00074 ================================================================================ 00075 MSG: geometry_msgs/Vector3 00076 # This represents a vector in free space. 00077 00078 float64 x 00079 float64 y 00080 float64 z 00081 """ 00082 __slots__ = ['header','goal_id','goal'] 00083 _slot_types = ['Header','actionlib_msgs/GoalID','pr2_controllers_msgs/PointHeadGoal'] 00084 00085 def __init__(self, *args, **kwds): 00086 """ 00087 Constructor. Any message fields that are implicitly/explicitly 00088 set to None will be assigned a default value. The recommend 00089 use is keyword arguments as this is more robust to future message 00090 changes. You cannot mix in-order arguments and keyword arguments. 00091 00092 The available fields are: 00093 header,goal_id,goal 00094 00095 @param args: complete set of field values, in .msg order 00096 @param kwds: use keyword arguments corresponding to message field names 00097 to set specific fields. 00098 """ 00099 if args or kwds: 00100 super(PointHeadActionGoal, self).__init__(*args, **kwds) 00101 #message fields cannot be None, assign default values for those that are 00102 if self.header is None: 00103 self.header = std_msgs.msg._Header.Header() 00104 if self.goal_id is None: 00105 self.goal_id = actionlib_msgs.msg.GoalID() 00106 if self.goal is None: 00107 self.goal = pr2_controllers_msgs.msg.PointHeadGoal() 00108 else: 00109 self.header = std_msgs.msg._Header.Header() 00110 self.goal_id = actionlib_msgs.msg.GoalID() 00111 self.goal = pr2_controllers_msgs.msg.PointHeadGoal() 00112 00113 def _get_types(self): 00114 """ 00115 internal API method 00116 """ 00117 return self._slot_types 00118 00119 def serialize(self, buff): 00120 """ 00121 serialize message into buffer 00122 @param buff: buffer 00123 @type buff: StringIO 00124 """ 00125 try: 00126 _x = self 00127 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00128 _x = self.header.frame_id 00129 length = len(_x) 00130 buff.write(struct.pack('<I%ss'%length, length, _x)) 00131 _x = self 00132 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00133 _x = self.goal_id.id 00134 length = len(_x) 00135 buff.write(struct.pack('<I%ss'%length, length, _x)) 00136 _x = self 00137 buff.write(_struct_3I.pack(_x.goal.target.header.seq, _x.goal.target.header.stamp.secs, _x.goal.target.header.stamp.nsecs)) 00138 _x = self.goal.target.header.frame_id 00139 length = len(_x) 00140 buff.write(struct.pack('<I%ss'%length, length, _x)) 00141 _x = self 00142 buff.write(_struct_6d.pack(_x.goal.target.point.x, _x.goal.target.point.y, _x.goal.target.point.z, _x.goal.pointing_axis.x, _x.goal.pointing_axis.y, _x.goal.pointing_axis.z)) 00143 _x = self.goal.pointing_frame 00144 length = len(_x) 00145 buff.write(struct.pack('<I%ss'%length, length, _x)) 00146 _x = self 00147 buff.write(_struct_2id.pack(_x.goal.min_duration.secs, _x.goal.min_duration.nsecs, _x.goal.max_velocity)) 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_controllers_msgs.msg.PointHeadGoal() 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.target.header.seq, _x.goal.target.header.stamp.secs, _x.goal.target.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.target.header.frame_id = str[start:end] 00195 _x = self 00196 start = end 00197 end += 48 00198 (_x.goal.target.point.x, _x.goal.target.point.y, _x.goal.target.point.z, _x.goal.pointing_axis.x, _x.goal.pointing_axis.y, _x.goal.pointing_axis.z,) = _struct_6d.unpack(str[start:end]) 00199 start = end 00200 end += 4 00201 (length,) = _struct_I.unpack(str[start:end]) 00202 start = end 00203 end += length 00204 self.goal.pointing_frame = str[start:end] 00205 _x = self 00206 start = end 00207 end += 16 00208 (_x.goal.min_duration.secs, _x.goal.min_duration.nsecs, _x.goal.max_velocity,) = _struct_2id.unpack(str[start:end]) 00209 return self 00210 except struct.error as e: 00211 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00212 00213 00214 def serialize_numpy(self, buff, numpy): 00215 """ 00216 serialize message with numpy array types into buffer 00217 @param buff: buffer 00218 @type buff: StringIO 00219 @param numpy: numpy python module 00220 @type numpy module 00221 """ 00222 try: 00223 _x = self 00224 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00225 _x = self.header.frame_id 00226 length = len(_x) 00227 buff.write(struct.pack('<I%ss'%length, length, _x)) 00228 _x = self 00229 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00230 _x = self.goal_id.id 00231 length = len(_x) 00232 buff.write(struct.pack('<I%ss'%length, length, _x)) 00233 _x = self 00234 buff.write(_struct_3I.pack(_x.goal.target.header.seq, _x.goal.target.header.stamp.secs, _x.goal.target.header.stamp.nsecs)) 00235 _x = self.goal.target.header.frame_id 00236 length = len(_x) 00237 buff.write(struct.pack('<I%ss'%length, length, _x)) 00238 _x = self 00239 buff.write(_struct_6d.pack(_x.goal.target.point.x, _x.goal.target.point.y, _x.goal.target.point.z, _x.goal.pointing_axis.x, _x.goal.pointing_axis.y, _x.goal.pointing_axis.z)) 00240 _x = self.goal.pointing_frame 00241 length = len(_x) 00242 buff.write(struct.pack('<I%ss'%length, length, _x)) 00243 _x = self 00244 buff.write(_struct_2id.pack(_x.goal.min_duration.secs, _x.goal.min_duration.nsecs, _x.goal.max_velocity)) 00245 except struct.error as se: self._check_types(se) 00246 except TypeError as te: self._check_types(te) 00247 00248 def deserialize_numpy(self, str, numpy): 00249 """ 00250 unpack serialized message in str into this message instance using numpy for array types 00251 @param str: byte array of serialized message 00252 @type str: str 00253 @param numpy: numpy python module 00254 @type numpy: module 00255 """ 00256 try: 00257 if self.header is None: 00258 self.header = std_msgs.msg._Header.Header() 00259 if self.goal_id is None: 00260 self.goal_id = actionlib_msgs.msg.GoalID() 00261 if self.goal is None: 00262 self.goal = pr2_controllers_msgs.msg.PointHeadGoal() 00263 end = 0 00264 _x = self 00265 start = end 00266 end += 12 00267 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00268 start = end 00269 end += 4 00270 (length,) = _struct_I.unpack(str[start:end]) 00271 start = end 00272 end += length 00273 self.header.frame_id = str[start:end] 00274 _x = self 00275 start = end 00276 end += 8 00277 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00278 start = end 00279 end += 4 00280 (length,) = _struct_I.unpack(str[start:end]) 00281 start = end 00282 end += length 00283 self.goal_id.id = str[start:end] 00284 _x = self 00285 start = end 00286 end += 12 00287 (_x.goal.target.header.seq, _x.goal.target.header.stamp.secs, _x.goal.target.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00288 start = end 00289 end += 4 00290 (length,) = _struct_I.unpack(str[start:end]) 00291 start = end 00292 end += length 00293 self.goal.target.header.frame_id = str[start:end] 00294 _x = self 00295 start = end 00296 end += 48 00297 (_x.goal.target.point.x, _x.goal.target.point.y, _x.goal.target.point.z, _x.goal.pointing_axis.x, _x.goal.pointing_axis.y, _x.goal.pointing_axis.z,) = _struct_6d.unpack(str[start:end]) 00298 start = end 00299 end += 4 00300 (length,) = _struct_I.unpack(str[start:end]) 00301 start = end 00302 end += length 00303 self.goal.pointing_frame = str[start:end] 00304 _x = self 00305 start = end 00306 end += 16 00307 (_x.goal.min_duration.secs, _x.goal.min_duration.nsecs, _x.goal.max_velocity,) = _struct_2id.unpack(str[start:end]) 00308 return self 00309 except struct.error as e: 00310 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00311 00312 _struct_I = roslib.message.struct_I 00313 _struct_3I = struct.Struct("<3I") 00314 _struct_6d = struct.Struct("<6d") 00315 _struct_2I = struct.Struct("<2I") 00316 _struct_2id = struct.Struct("<2id")