$search
00001 """autogenerated by genmsg_py from JointAnglesWithSpeedActionResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import nao_msgs.msg 00006 import sensor_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class JointAnglesWithSpeedActionResult(roslib.message.Message): 00012 _md5sum = "8863b007f420d5f94fcdaa0f865d1767" 00013 _type = "nao_msgs/JointAnglesWithSpeedActionResult" 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/GoalStatus status 00019 JointAnglesWithSpeedResult result 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/GoalStatus 00041 GoalID goal_id 00042 uint8 status 00043 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00044 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00045 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00046 # and has since completed its execution (Terminal State) 00047 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00048 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00049 # to some failure (Terminal State) 00050 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00051 # because the goal was unattainable or invalid (Terminal State) 00052 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00053 # and has not yet completed execution 00054 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00055 # but the action server has not yet confirmed that the goal is canceled 00056 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00057 # and was successfully cancelled (Terminal State) 00058 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00059 # sent over the wire by an action server 00060 00061 #Allow for the user to associate a string with GoalStatus for debugging 00062 string text 00063 00064 00065 ================================================================================ 00066 MSG: actionlib_msgs/GoalID 00067 # The stamp should store the time at which this goal was requested. 00068 # It is used by an action server when it tries to preempt all 00069 # goals that were requested before a certain time 00070 time stamp 00071 00072 # The id provides a way to associate feedback and 00073 # result message with specific goal requests. The id 00074 # specified must be unique. 00075 string id 00076 00077 00078 ================================================================================ 00079 MSG: nao_msgs/JointAnglesWithSpeedResult 00080 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00081 # result is the actually reached position 00082 sensor_msgs/JointState goal_position 00083 00084 ================================================================================ 00085 MSG: sensor_msgs/JointState 00086 # This is a message that holds data to describe the state of a set of torque controlled joints. 00087 # 00088 # The state of each joint (revolute or prismatic) is defined by: 00089 # * the position of the joint (rad or m), 00090 # * the velocity of the joint (rad/s or m/s) and 00091 # * the effort that is applied in the joint (Nm or N). 00092 # 00093 # Each joint is uniquely identified by its name 00094 # The header specifies the time at which the joint states were recorded. All the joint states 00095 # in one message have to be recorded at the same time. 00096 # 00097 # This message consists of a multiple arrays, one for each part of the joint state. 00098 # The goal is to make each of the fields optional. When e.g. your joints have no 00099 # effort associated with them, you can leave the effort array empty. 00100 # 00101 # All arrays in this message should have the same size, or be empty. 00102 # This is the only way to uniquely associate the joint name with the correct 00103 # states. 00104 00105 00106 Header header 00107 00108 string[] name 00109 float64[] position 00110 float64[] velocity 00111 float64[] effort 00112 00113 """ 00114 __slots__ = ['header','status','result'] 00115 _slot_types = ['Header','actionlib_msgs/GoalStatus','nao_msgs/JointAnglesWithSpeedResult'] 00116 00117 def __init__(self, *args, **kwds): 00118 """ 00119 Constructor. Any message fields that are implicitly/explicitly 00120 set to None will be assigned a default value. The recommend 00121 use is keyword arguments as this is more robust to future message 00122 changes. You cannot mix in-order arguments and keyword arguments. 00123 00124 The available fields are: 00125 header,status,result 00126 00127 @param args: complete set of field values, in .msg order 00128 @param kwds: use keyword arguments corresponding to message field names 00129 to set specific fields. 00130 """ 00131 if args or kwds: 00132 super(JointAnglesWithSpeedActionResult, self).__init__(*args, **kwds) 00133 #message fields cannot be None, assign default values for those that are 00134 if self.header is None: 00135 self.header = std_msgs.msg._Header.Header() 00136 if self.status is None: 00137 self.status = actionlib_msgs.msg.GoalStatus() 00138 if self.result is None: 00139 self.result = nao_msgs.msg.JointAnglesWithSpeedResult() 00140 else: 00141 self.header = std_msgs.msg._Header.Header() 00142 self.status = actionlib_msgs.msg.GoalStatus() 00143 self.result = nao_msgs.msg.JointAnglesWithSpeedResult() 00144 00145 def _get_types(self): 00146 """ 00147 internal API method 00148 """ 00149 return self._slot_types 00150 00151 def serialize(self, buff): 00152 """ 00153 serialize message into buffer 00154 @param buff: buffer 00155 @type buff: StringIO 00156 """ 00157 try: 00158 _x = self 00159 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00160 _x = self.header.frame_id 00161 length = len(_x) 00162 buff.write(struct.pack('<I%ss'%length, length, _x)) 00163 _x = self 00164 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00165 _x = self.status.goal_id.id 00166 length = len(_x) 00167 buff.write(struct.pack('<I%ss'%length, length, _x)) 00168 buff.write(_struct_B.pack(self.status.status)) 00169 _x = self.status.text 00170 length = len(_x) 00171 buff.write(struct.pack('<I%ss'%length, length, _x)) 00172 _x = self 00173 buff.write(_struct_3I.pack(_x.result.goal_position.header.seq, _x.result.goal_position.header.stamp.secs, _x.result.goal_position.header.stamp.nsecs)) 00174 _x = self.result.goal_position.header.frame_id 00175 length = len(_x) 00176 buff.write(struct.pack('<I%ss'%length, length, _x)) 00177 length = len(self.result.goal_position.name) 00178 buff.write(_struct_I.pack(length)) 00179 for val1 in self.result.goal_position.name: 00180 length = len(val1) 00181 buff.write(struct.pack('<I%ss'%length, length, val1)) 00182 length = len(self.result.goal_position.position) 00183 buff.write(_struct_I.pack(length)) 00184 pattern = '<%sd'%length 00185 buff.write(struct.pack(pattern, *self.result.goal_position.position)) 00186 length = len(self.result.goal_position.velocity) 00187 buff.write(_struct_I.pack(length)) 00188 pattern = '<%sd'%length 00189 buff.write(struct.pack(pattern, *self.result.goal_position.velocity)) 00190 length = len(self.result.goal_position.effort) 00191 buff.write(_struct_I.pack(length)) 00192 pattern = '<%sd'%length 00193 buff.write(struct.pack(pattern, *self.result.goal_position.effort)) 00194 except struct.error as se: self._check_types(se) 00195 except TypeError as te: self._check_types(te) 00196 00197 def deserialize(self, str): 00198 """ 00199 unpack serialized message in str into this message instance 00200 @param str: byte array of serialized message 00201 @type str: str 00202 """ 00203 try: 00204 if self.header is None: 00205 self.header = std_msgs.msg._Header.Header() 00206 if self.status is None: 00207 self.status = actionlib_msgs.msg.GoalStatus() 00208 if self.result is None: 00209 self.result = nao_msgs.msg.JointAnglesWithSpeedResult() 00210 end = 0 00211 _x = self 00212 start = end 00213 end += 12 00214 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00215 start = end 00216 end += 4 00217 (length,) = _struct_I.unpack(str[start:end]) 00218 start = end 00219 end += length 00220 self.header.frame_id = str[start:end] 00221 _x = self 00222 start = end 00223 end += 8 00224 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00225 start = end 00226 end += 4 00227 (length,) = _struct_I.unpack(str[start:end]) 00228 start = end 00229 end += length 00230 self.status.goal_id.id = str[start:end] 00231 start = end 00232 end += 1 00233 (self.status.status,) = _struct_B.unpack(str[start:end]) 00234 start = end 00235 end += 4 00236 (length,) = _struct_I.unpack(str[start:end]) 00237 start = end 00238 end += length 00239 self.status.text = str[start:end] 00240 _x = self 00241 start = end 00242 end += 12 00243 (_x.result.goal_position.header.seq, _x.result.goal_position.header.stamp.secs, _x.result.goal_position.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00244 start = end 00245 end += 4 00246 (length,) = _struct_I.unpack(str[start:end]) 00247 start = end 00248 end += length 00249 self.result.goal_position.header.frame_id = str[start:end] 00250 start = end 00251 end += 4 00252 (length,) = _struct_I.unpack(str[start:end]) 00253 self.result.goal_position.name = [] 00254 for i in range(0, length): 00255 start = end 00256 end += 4 00257 (length,) = _struct_I.unpack(str[start:end]) 00258 start = end 00259 end += length 00260 val1 = str[start:end] 00261 self.result.goal_position.name.append(val1) 00262 start = end 00263 end += 4 00264 (length,) = _struct_I.unpack(str[start:end]) 00265 pattern = '<%sd'%length 00266 start = end 00267 end += struct.calcsize(pattern) 00268 self.result.goal_position.position = struct.unpack(pattern, str[start:end]) 00269 start = end 00270 end += 4 00271 (length,) = _struct_I.unpack(str[start:end]) 00272 pattern = '<%sd'%length 00273 start = end 00274 end += struct.calcsize(pattern) 00275 self.result.goal_position.velocity = struct.unpack(pattern, str[start:end]) 00276 start = end 00277 end += 4 00278 (length,) = _struct_I.unpack(str[start:end]) 00279 pattern = '<%sd'%length 00280 start = end 00281 end += struct.calcsize(pattern) 00282 self.result.goal_position.effort = struct.unpack(pattern, str[start:end]) 00283 return self 00284 except struct.error as e: 00285 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00286 00287 00288 def serialize_numpy(self, buff, numpy): 00289 """ 00290 serialize message with numpy array types into buffer 00291 @param buff: buffer 00292 @type buff: StringIO 00293 @param numpy: numpy python module 00294 @type numpy module 00295 """ 00296 try: 00297 _x = self 00298 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00299 _x = self.header.frame_id 00300 length = len(_x) 00301 buff.write(struct.pack('<I%ss'%length, length, _x)) 00302 _x = self 00303 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00304 _x = self.status.goal_id.id 00305 length = len(_x) 00306 buff.write(struct.pack('<I%ss'%length, length, _x)) 00307 buff.write(_struct_B.pack(self.status.status)) 00308 _x = self.status.text 00309 length = len(_x) 00310 buff.write(struct.pack('<I%ss'%length, length, _x)) 00311 _x = self 00312 buff.write(_struct_3I.pack(_x.result.goal_position.header.seq, _x.result.goal_position.header.stamp.secs, _x.result.goal_position.header.stamp.nsecs)) 00313 _x = self.result.goal_position.header.frame_id 00314 length = len(_x) 00315 buff.write(struct.pack('<I%ss'%length, length, _x)) 00316 length = len(self.result.goal_position.name) 00317 buff.write(_struct_I.pack(length)) 00318 for val1 in self.result.goal_position.name: 00319 length = len(val1) 00320 buff.write(struct.pack('<I%ss'%length, length, val1)) 00321 length = len(self.result.goal_position.position) 00322 buff.write(_struct_I.pack(length)) 00323 pattern = '<%sd'%length 00324 buff.write(self.result.goal_position.position.tostring()) 00325 length = len(self.result.goal_position.velocity) 00326 buff.write(_struct_I.pack(length)) 00327 pattern = '<%sd'%length 00328 buff.write(self.result.goal_position.velocity.tostring()) 00329 length = len(self.result.goal_position.effort) 00330 buff.write(_struct_I.pack(length)) 00331 pattern = '<%sd'%length 00332 buff.write(self.result.goal_position.effort.tostring()) 00333 except struct.error as se: self._check_types(se) 00334 except TypeError as te: self._check_types(te) 00335 00336 def deserialize_numpy(self, str, numpy): 00337 """ 00338 unpack serialized message in str into this message instance using numpy for array types 00339 @param str: byte array of serialized message 00340 @type str: str 00341 @param numpy: numpy python module 00342 @type numpy: module 00343 """ 00344 try: 00345 if self.header is None: 00346 self.header = std_msgs.msg._Header.Header() 00347 if self.status is None: 00348 self.status = actionlib_msgs.msg.GoalStatus() 00349 if self.result is None: 00350 self.result = nao_msgs.msg.JointAnglesWithSpeedResult() 00351 end = 0 00352 _x = self 00353 start = end 00354 end += 12 00355 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00356 start = end 00357 end += 4 00358 (length,) = _struct_I.unpack(str[start:end]) 00359 start = end 00360 end += length 00361 self.header.frame_id = str[start:end] 00362 _x = self 00363 start = end 00364 end += 8 00365 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00366 start = end 00367 end += 4 00368 (length,) = _struct_I.unpack(str[start:end]) 00369 start = end 00370 end += length 00371 self.status.goal_id.id = str[start:end] 00372 start = end 00373 end += 1 00374 (self.status.status,) = _struct_B.unpack(str[start:end]) 00375 start = end 00376 end += 4 00377 (length,) = _struct_I.unpack(str[start:end]) 00378 start = end 00379 end += length 00380 self.status.text = str[start:end] 00381 _x = self 00382 start = end 00383 end += 12 00384 (_x.result.goal_position.header.seq, _x.result.goal_position.header.stamp.secs, _x.result.goal_position.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00385 start = end 00386 end += 4 00387 (length,) = _struct_I.unpack(str[start:end]) 00388 start = end 00389 end += length 00390 self.result.goal_position.header.frame_id = str[start:end] 00391 start = end 00392 end += 4 00393 (length,) = _struct_I.unpack(str[start:end]) 00394 self.result.goal_position.name = [] 00395 for i in range(0, length): 00396 start = end 00397 end += 4 00398 (length,) = _struct_I.unpack(str[start:end]) 00399 start = end 00400 end += length 00401 val1 = str[start:end] 00402 self.result.goal_position.name.append(val1) 00403 start = end 00404 end += 4 00405 (length,) = _struct_I.unpack(str[start:end]) 00406 pattern = '<%sd'%length 00407 start = end 00408 end += struct.calcsize(pattern) 00409 self.result.goal_position.position = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00410 start = end 00411 end += 4 00412 (length,) = _struct_I.unpack(str[start:end]) 00413 pattern = '<%sd'%length 00414 start = end 00415 end += struct.calcsize(pattern) 00416 self.result.goal_position.velocity = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00417 start = end 00418 end += 4 00419 (length,) = _struct_I.unpack(str[start:end]) 00420 pattern = '<%sd'%length 00421 start = end 00422 end += struct.calcsize(pattern) 00423 self.result.goal_position.effort = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length) 00424 return self 00425 except struct.error as e: 00426 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00427 00428 _struct_I = roslib.message.struct_I 00429 _struct_3I = struct.Struct("<3I") 00430 _struct_B = struct.Struct("<B") 00431 _struct_2I = struct.Struct("<2I")