_DoorActionResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from door_msgs/DoorActionResult.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import geometry_msgs.msg
00008 import door_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012 
00013 class DoorActionResult(genpy.Message):
00014   _md5sum = "0349b3f6fe79ac1d1ba4b5fb520eb928"
00015   _type = "door_msgs/DoorActionResult"
00016   _has_header = True #flag to mark the presence of a Header object
00017   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018 
00019 Header header
00020 actionlib_msgs/GoalStatus status
00021 DoorResult result
00022 
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data 
00027 # in a particular coordinate frame.
00028 # 
00029 # sequence ID: consecutively increasing ID 
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040 
00041 ================================================================================
00042 MSG: actionlib_msgs/GoalStatus
00043 GoalID goal_id
00044 uint8 status
00045 uint8 PENDING         = 0   # The goal has yet to be processed by the action server
00046 uint8 ACTIVE          = 1   # The goal is currently being processed by the action server
00047 uint8 PREEMPTED       = 2   # The goal received a cancel request after it started executing
00048                             #   and has since completed its execution (Terminal State)
00049 uint8 SUCCEEDED       = 3   # The goal was achieved successfully by the action server (Terminal State)
00050 uint8 ABORTED         = 4   # The goal was aborted during execution by the action server due
00051                             #    to some failure (Terminal State)
00052 uint8 REJECTED        = 5   # The goal was rejected by the action server without being processed,
00053                             #    because the goal was unattainable or invalid (Terminal State)
00054 uint8 PREEMPTING      = 6   # The goal received a cancel request after it started executing
00055                             #    and has not yet completed execution
00056 uint8 RECALLING       = 7   # The goal received a cancel request before it started executing,
00057                             #    but the action server has not yet confirmed that the goal is canceled
00058 uint8 RECALLED        = 8   # The goal received a cancel request before it started executing
00059                             #    and was successfully cancelled (Terminal State)
00060 uint8 LOST            = 9   # An action client can determine that a goal is LOST. This should not be
00061                             #    sent over the wire by an action server
00062 
00063 #Allow for the user to associate a string with GoalStatus for debugging
00064 string text
00065 
00066 
00067 ================================================================================
00068 MSG: actionlib_msgs/GoalID
00069 # The stamp should store the time at which this goal was requested.
00070 # It is used by an action server when it tries to preempt all
00071 # goals that were requested before a certain time
00072 time stamp
00073 
00074 # The id provides a way to associate feedback and
00075 # result message with specific goal requests. The id
00076 # specified must be unique.
00077 string id
00078 
00079 
00080 ================================================================================
00081 MSG: door_msgs/DoorResult
00082 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00083 # result
00084 door_msgs/Door door
00085 
00086 ================================================================================
00087 MSG: door_msgs/Door
00088 Header header
00089 geometry_msgs/Point32 frame_p1  ## position of the door frame
00090 geometry_msgs/Point32 frame_p2  ## position of the door frame
00091 geometry_msgs/Point32 door_p1   ## Ground plane projection of a point on the plane of the door 
00092 geometry_msgs/Point32 door_p2   ## Ground plane projection of a point on the plane of the door
00093 geometry_msgs/Point32 handle    ## Position of the door handle
00094 float32 height               ## Height of the door
00095 
00096 int32 UNKNOWN=0
00097 
00098 int32 HINGE_P1=1
00099 int32 HINGE_P2=2
00100 int32 hinge                  
00101 
00102 int32 ROT_DIR_CLOCKWISE=1
00103 int32 ROT_DIR_COUNTERCLOCKWISE=2
00104 int32 rot_dir                
00105 
00106 int32 LOCKED=1
00107 int32 LATCHED=2
00108 int32 UNLATCHED=3
00109 int32 latch_state            
00110 
00111 geometry_msgs/Vector3 travel_dir           ## vector pointing in the direction the robot is going to travel through the door
00112 float32 weight               ## @Sachin: what do we use this for?
00113 
00114 
00115 
00116 ================================================================================
00117 MSG: geometry_msgs/Point32
00118 # This contains the position of a point in free space(with 32 bits of precision).
00119 # It is recommeded to use Point wherever possible instead of Point32.  
00120 # 
00121 # This recommendation is to promote interoperability.  
00122 #
00123 # This message is designed to take up less space when sending
00124 # lots of points at once, as in the case of a PointCloud.  
00125 
00126 float32 x
00127 float32 y
00128 float32 z
00129 ================================================================================
00130 MSG: geometry_msgs/Vector3
00131 # This represents a vector in free space. 
00132 
00133 float64 x
00134 float64 y
00135 float64 z
00136 """
00137   __slots__ = ['header','status','result']
00138   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','door_msgs/DoorResult']
00139 
00140   def __init__(self, *args, **kwds):
00141     """
00142     Constructor. Any message fields that are implicitly/explicitly
00143     set to None will be assigned a default value. The recommend
00144     use is keyword arguments as this is more robust to future message
00145     changes.  You cannot mix in-order arguments and keyword arguments.
00146 
00147     The available fields are:
00148        header,status,result
00149 
00150     :param args: complete set of field values, in .msg order
00151     :param kwds: use keyword arguments corresponding to message field names
00152     to set specific fields.
00153     """
00154     if args or kwds:
00155       super(DoorActionResult, self).__init__(*args, **kwds)
00156       #message fields cannot be None, assign default values for those that are
00157       if self.header is None:
00158         self.header = std_msgs.msg.Header()
00159       if self.status is None:
00160         self.status = actionlib_msgs.msg.GoalStatus()
00161       if self.result is None:
00162         self.result = door_msgs.msg.DoorResult()
00163     else:
00164       self.header = std_msgs.msg.Header()
00165       self.status = actionlib_msgs.msg.GoalStatus()
00166       self.result = door_msgs.msg.DoorResult()
00167 
00168   def _get_types(self):
00169     """
00170     internal API method
00171     """
00172     return self._slot_types
00173 
00174   def serialize(self, buff):
00175     """
00176     serialize message into buffer
00177     :param buff: buffer, ``StringIO``
00178     """
00179     try:
00180       _x = self
00181       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00182       _x = self.header.frame_id
00183       length = len(_x)
00184       if python3 or type(_x) == unicode:
00185         _x = _x.encode('utf-8')
00186         length = len(_x)
00187       buff.write(struct.pack('<I%ss'%length, length, _x))
00188       _x = self
00189       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00190       _x = self.status.goal_id.id
00191       length = len(_x)
00192       if python3 or type(_x) == unicode:
00193         _x = _x.encode('utf-8')
00194         length = len(_x)
00195       buff.write(struct.pack('<I%ss'%length, length, _x))
00196       buff.write(_struct_B.pack(self.status.status))
00197       _x = self.status.text
00198       length = len(_x)
00199       if python3 or type(_x) == unicode:
00200         _x = _x.encode('utf-8')
00201         length = len(_x)
00202       buff.write(struct.pack('<I%ss'%length, length, _x))
00203       _x = self
00204       buff.write(_struct_3I.pack(_x.result.door.header.seq, _x.result.door.header.stamp.secs, _x.result.door.header.stamp.nsecs))
00205       _x = self.result.door.header.frame_id
00206       length = len(_x)
00207       if python3 or type(_x) == unicode:
00208         _x = _x.encode('utf-8')
00209         length = len(_x)
00210       buff.write(struct.pack('<I%ss'%length, length, _x))
00211       _x = self
00212       buff.write(_struct_16f3i3df.pack(_x.result.door.frame_p1.x, _x.result.door.frame_p1.y, _x.result.door.frame_p1.z, _x.result.door.frame_p2.x, _x.result.door.frame_p2.y, _x.result.door.frame_p2.z, _x.result.door.door_p1.x, _x.result.door.door_p1.y, _x.result.door.door_p1.z, _x.result.door.door_p2.x, _x.result.door.door_p2.y, _x.result.door.door_p2.z, _x.result.door.handle.x, _x.result.door.handle.y, _x.result.door.handle.z, _x.result.door.height, _x.result.door.hinge, _x.result.door.rot_dir, _x.result.door.latch_state, _x.result.door.travel_dir.x, _x.result.door.travel_dir.y, _x.result.door.travel_dir.z, _x.result.door.weight))
00213     except struct.error as se: self._check_types(se)
00214     except TypeError as te: self._check_types(te)
00215 
00216   def deserialize(self, str):
00217     """
00218     unpack serialized message in str into this message instance
00219     :param str: byte array of serialized message, ``str``
00220     """
00221     try:
00222       if self.header is None:
00223         self.header = std_msgs.msg.Header()
00224       if self.status is None:
00225         self.status = actionlib_msgs.msg.GoalStatus()
00226       if self.result is None:
00227         self.result = door_msgs.msg.DoorResult()
00228       end = 0
00229       _x = self
00230       start = end
00231       end += 12
00232       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00233       start = end
00234       end += 4
00235       (length,) = _struct_I.unpack(str[start:end])
00236       start = end
00237       end += length
00238       if python3:
00239         self.header.frame_id = str[start:end].decode('utf-8')
00240       else:
00241         self.header.frame_id = str[start:end]
00242       _x = self
00243       start = end
00244       end += 8
00245       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00246       start = end
00247       end += 4
00248       (length,) = _struct_I.unpack(str[start:end])
00249       start = end
00250       end += length
00251       if python3:
00252         self.status.goal_id.id = str[start:end].decode('utf-8')
00253       else:
00254         self.status.goal_id.id = str[start:end]
00255       start = end
00256       end += 1
00257       (self.status.status,) = _struct_B.unpack(str[start:end])
00258       start = end
00259       end += 4
00260       (length,) = _struct_I.unpack(str[start:end])
00261       start = end
00262       end += length
00263       if python3:
00264         self.status.text = str[start:end].decode('utf-8')
00265       else:
00266         self.status.text = str[start:end]
00267       _x = self
00268       start = end
00269       end += 12
00270       (_x.result.door.header.seq, _x.result.door.header.stamp.secs, _x.result.door.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00271       start = end
00272       end += 4
00273       (length,) = _struct_I.unpack(str[start:end])
00274       start = end
00275       end += length
00276       if python3:
00277         self.result.door.header.frame_id = str[start:end].decode('utf-8')
00278       else:
00279         self.result.door.header.frame_id = str[start:end]
00280       _x = self
00281       start = end
00282       end += 104
00283       (_x.result.door.frame_p1.x, _x.result.door.frame_p1.y, _x.result.door.frame_p1.z, _x.result.door.frame_p2.x, _x.result.door.frame_p2.y, _x.result.door.frame_p2.z, _x.result.door.door_p1.x, _x.result.door.door_p1.y, _x.result.door.door_p1.z, _x.result.door.door_p2.x, _x.result.door.door_p2.y, _x.result.door.door_p2.z, _x.result.door.handle.x, _x.result.door.handle.y, _x.result.door.handle.z, _x.result.door.height, _x.result.door.hinge, _x.result.door.rot_dir, _x.result.door.latch_state, _x.result.door.travel_dir.x, _x.result.door.travel_dir.y, _x.result.door.travel_dir.z, _x.result.door.weight,) = _struct_16f3i3df.unpack(str[start:end])
00284       return self
00285     except struct.error as e:
00286       raise genpy.DeserializationError(e) #most likely buffer underfill
00287 
00288 
00289   def serialize_numpy(self, buff, numpy):
00290     """
00291     serialize message with numpy array types into buffer
00292     :param buff: buffer, ``StringIO``
00293     :param numpy: numpy python module
00294     """
00295     try:
00296       _x = self
00297       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00298       _x = self.header.frame_id
00299       length = len(_x)
00300       if python3 or type(_x) == unicode:
00301         _x = _x.encode('utf-8')
00302         length = len(_x)
00303       buff.write(struct.pack('<I%ss'%length, length, _x))
00304       _x = self
00305       buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00306       _x = self.status.goal_id.id
00307       length = len(_x)
00308       if python3 or type(_x) == unicode:
00309         _x = _x.encode('utf-8')
00310         length = len(_x)
00311       buff.write(struct.pack('<I%ss'%length, length, _x))
00312       buff.write(_struct_B.pack(self.status.status))
00313       _x = self.status.text
00314       length = len(_x)
00315       if python3 or type(_x) == unicode:
00316         _x = _x.encode('utf-8')
00317         length = len(_x)
00318       buff.write(struct.pack('<I%ss'%length, length, _x))
00319       _x = self
00320       buff.write(_struct_3I.pack(_x.result.door.header.seq, _x.result.door.header.stamp.secs, _x.result.door.header.stamp.nsecs))
00321       _x = self.result.door.header.frame_id
00322       length = len(_x)
00323       if python3 or type(_x) == unicode:
00324         _x = _x.encode('utf-8')
00325         length = len(_x)
00326       buff.write(struct.pack('<I%ss'%length, length, _x))
00327       _x = self
00328       buff.write(_struct_16f3i3df.pack(_x.result.door.frame_p1.x, _x.result.door.frame_p1.y, _x.result.door.frame_p1.z, _x.result.door.frame_p2.x, _x.result.door.frame_p2.y, _x.result.door.frame_p2.z, _x.result.door.door_p1.x, _x.result.door.door_p1.y, _x.result.door.door_p1.z, _x.result.door.door_p2.x, _x.result.door.door_p2.y, _x.result.door.door_p2.z, _x.result.door.handle.x, _x.result.door.handle.y, _x.result.door.handle.z, _x.result.door.height, _x.result.door.hinge, _x.result.door.rot_dir, _x.result.door.latch_state, _x.result.door.travel_dir.x, _x.result.door.travel_dir.y, _x.result.door.travel_dir.z, _x.result.door.weight))
00329     except struct.error as se: self._check_types(se)
00330     except TypeError as te: self._check_types(te)
00331 
00332   def deserialize_numpy(self, str, numpy):
00333     """
00334     unpack serialized message in str into this message instance using numpy for array types
00335     :param str: byte array of serialized message, ``str``
00336     :param numpy: numpy python module
00337     """
00338     try:
00339       if self.header is None:
00340         self.header = std_msgs.msg.Header()
00341       if self.status is None:
00342         self.status = actionlib_msgs.msg.GoalStatus()
00343       if self.result is None:
00344         self.result = door_msgs.msg.DoorResult()
00345       end = 0
00346       _x = self
00347       start = end
00348       end += 12
00349       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00350       start = end
00351       end += 4
00352       (length,) = _struct_I.unpack(str[start:end])
00353       start = end
00354       end += length
00355       if python3:
00356         self.header.frame_id = str[start:end].decode('utf-8')
00357       else:
00358         self.header.frame_id = str[start:end]
00359       _x = self
00360       start = end
00361       end += 8
00362       (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00363       start = end
00364       end += 4
00365       (length,) = _struct_I.unpack(str[start:end])
00366       start = end
00367       end += length
00368       if python3:
00369         self.status.goal_id.id = str[start:end].decode('utf-8')
00370       else:
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       if python3:
00381         self.status.text = str[start:end].decode('utf-8')
00382       else:
00383         self.status.text = str[start:end]
00384       _x = self
00385       start = end
00386       end += 12
00387       (_x.result.door.header.seq, _x.result.door.header.stamp.secs, _x.result.door.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00388       start = end
00389       end += 4
00390       (length,) = _struct_I.unpack(str[start:end])
00391       start = end
00392       end += length
00393       if python3:
00394         self.result.door.header.frame_id = str[start:end].decode('utf-8')
00395       else:
00396         self.result.door.header.frame_id = str[start:end]
00397       _x = self
00398       start = end
00399       end += 104
00400       (_x.result.door.frame_p1.x, _x.result.door.frame_p1.y, _x.result.door.frame_p1.z, _x.result.door.frame_p2.x, _x.result.door.frame_p2.y, _x.result.door.frame_p2.z, _x.result.door.door_p1.x, _x.result.door.door_p1.y, _x.result.door.door_p1.z, _x.result.door.door_p2.x, _x.result.door.door_p2.y, _x.result.door.door_p2.z, _x.result.door.handle.x, _x.result.door.handle.y, _x.result.door.handle.z, _x.result.door.height, _x.result.door.hinge, _x.result.door.rot_dir, _x.result.door.latch_state, _x.result.door.travel_dir.x, _x.result.door.travel_dir.y, _x.result.door.travel_dir.z, _x.result.door.weight,) = _struct_16f3i3df.unpack(str[start:end])
00401       return self
00402     except struct.error as e:
00403       raise genpy.DeserializationError(e) #most likely buffer underfill
00404 
00405 _struct_I = genpy.struct_I
00406 _struct_3I = struct.Struct("<3I")
00407 _struct_B = struct.Struct("<B")
00408 _struct_16f3i3df = struct.Struct("<16f3i3df")
00409 _struct_2I = struct.Struct("<2I")


door_msgs
Author(s): Wim Meeussen
autogenerated on Wed Dec 11 2013 14:16:35