_DoorResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from door_msgs/DoorResult.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 std_msgs.msg
00009 import door_msgs.msg
00010 
00011 class DoorResult(genpy.Message):
00012   _md5sum = "72afb754afb6ff619fa1a692675498c0"
00013   _type = "door_msgs/DoorResult"
00014   _has_header = False #flag to mark the presence of a Header object
00015   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00016 # result
00017 door_msgs/Door door
00018 
00019 ================================================================================
00020 MSG: door_msgs/Door
00021 Header header
00022 geometry_msgs/Point32 frame_p1  ## position of the door frame
00023 geometry_msgs/Point32 frame_p2  ## position of the door frame
00024 geometry_msgs/Point32 door_p1   ## Ground plane projection of a point on the plane of the door 
00025 geometry_msgs/Point32 door_p2   ## Ground plane projection of a point on the plane of the door
00026 geometry_msgs/Point32 handle    ## Position of the door handle
00027 float32 height               ## Height of the door
00028 
00029 int32 UNKNOWN=0
00030 
00031 int32 HINGE_P1=1
00032 int32 HINGE_P2=2
00033 int32 hinge                  
00034 
00035 int32 ROT_DIR_CLOCKWISE=1
00036 int32 ROT_DIR_COUNTERCLOCKWISE=2
00037 int32 rot_dir                
00038 
00039 int32 LOCKED=1
00040 int32 LATCHED=2
00041 int32 UNLATCHED=3
00042 int32 latch_state            
00043 
00044 geometry_msgs/Vector3 travel_dir           ## vector pointing in the direction the robot is going to travel through the door
00045 float32 weight               ## @Sachin: what do we use this for?
00046 
00047 
00048 
00049 ================================================================================
00050 MSG: std_msgs/Header
00051 # Standard metadata for higher-level stamped data types.
00052 # This is generally used to communicate timestamped data 
00053 # in a particular coordinate frame.
00054 # 
00055 # sequence ID: consecutively increasing ID 
00056 uint32 seq
00057 #Two-integer timestamp that is expressed as:
00058 # * stamp.secs: seconds (stamp_secs) since epoch
00059 # * stamp.nsecs: nanoseconds since stamp_secs
00060 # time-handling sugar is provided by the client library
00061 time stamp
00062 #Frame this data is associated with
00063 # 0: no frame
00064 # 1: global frame
00065 string frame_id
00066 
00067 ================================================================================
00068 MSG: geometry_msgs/Point32
00069 # This contains the position of a point in free space(with 32 bits of precision).
00070 # It is recommeded to use Point wherever possible instead of Point32.  
00071 # 
00072 # This recommendation is to promote interoperability.  
00073 #
00074 # This message is designed to take up less space when sending
00075 # lots of points at once, as in the case of a PointCloud.  
00076 
00077 float32 x
00078 float32 y
00079 float32 z
00080 ================================================================================
00081 MSG: geometry_msgs/Vector3
00082 # This represents a vector in free space. 
00083 
00084 float64 x
00085 float64 y
00086 float64 z
00087 """
00088   __slots__ = ['door']
00089   _slot_types = ['door_msgs/Door']
00090 
00091   def __init__(self, *args, **kwds):
00092     """
00093     Constructor. Any message fields that are implicitly/explicitly
00094     set to None will be assigned a default value. The recommend
00095     use is keyword arguments as this is more robust to future message
00096     changes.  You cannot mix in-order arguments and keyword arguments.
00097 
00098     The available fields are:
00099        door
00100 
00101     :param args: complete set of field values, in .msg order
00102     :param kwds: use keyword arguments corresponding to message field names
00103     to set specific fields.
00104     """
00105     if args or kwds:
00106       super(DoorResult, self).__init__(*args, **kwds)
00107       #message fields cannot be None, assign default values for those that are
00108       if self.door is None:
00109         self.door = door_msgs.msg.Door()
00110     else:
00111       self.door = door_msgs.msg.Door()
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, ``StringIO``
00123     """
00124     try:
00125       _x = self
00126       buff.write(_struct_3I.pack(_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs))
00127       _x = self.door.header.frame_id
00128       length = len(_x)
00129       if python3 or type(_x) == unicode:
00130         _x = _x.encode('utf-8')
00131         length = len(_x)
00132       buff.write(struct.pack('<I%ss'%length, length, _x))
00133       _x = self
00134       buff.write(_struct_16f3i3df.pack(_x.door.frame_p1.x, _x.door.frame_p1.y, _x.door.frame_p1.z, _x.door.frame_p2.x, _x.door.frame_p2.y, _x.door.frame_p2.z, _x.door.door_p1.x, _x.door.door_p1.y, _x.door.door_p1.z, _x.door.door_p2.x, _x.door.door_p2.y, _x.door.door_p2.z, _x.door.handle.x, _x.door.handle.y, _x.door.handle.z, _x.door.height, _x.door.hinge, _x.door.rot_dir, _x.door.latch_state, _x.door.travel_dir.x, _x.door.travel_dir.y, _x.door.travel_dir.z, _x.door.weight))
00135     except struct.error as se: self._check_types(se)
00136     except TypeError as te: self._check_types(te)
00137 
00138   def deserialize(self, str):
00139     """
00140     unpack serialized message in str into this message instance
00141     :param str: byte array of serialized message, ``str``
00142     """
00143     try:
00144       if self.door is None:
00145         self.door = door_msgs.msg.Door()
00146       end = 0
00147       _x = self
00148       start = end
00149       end += 12
00150       (_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00151       start = end
00152       end += 4
00153       (length,) = _struct_I.unpack(str[start:end])
00154       start = end
00155       end += length
00156       if python3:
00157         self.door.header.frame_id = str[start:end].decode('utf-8')
00158       else:
00159         self.door.header.frame_id = str[start:end]
00160       _x = self
00161       start = end
00162       end += 104
00163       (_x.door.frame_p1.x, _x.door.frame_p1.y, _x.door.frame_p1.z, _x.door.frame_p2.x, _x.door.frame_p2.y, _x.door.frame_p2.z, _x.door.door_p1.x, _x.door.door_p1.y, _x.door.door_p1.z, _x.door.door_p2.x, _x.door.door_p2.y, _x.door.door_p2.z, _x.door.handle.x, _x.door.handle.y, _x.door.handle.z, _x.door.height, _x.door.hinge, _x.door.rot_dir, _x.door.latch_state, _x.door.travel_dir.x, _x.door.travel_dir.y, _x.door.travel_dir.z, _x.door.weight,) = _struct_16f3i3df.unpack(str[start:end])
00164       return self
00165     except struct.error as e:
00166       raise genpy.DeserializationError(e) #most likely buffer underfill
00167 
00168 
00169   def serialize_numpy(self, buff, numpy):
00170     """
00171     serialize message with numpy array types into buffer
00172     :param buff: buffer, ``StringIO``
00173     :param numpy: numpy python module
00174     """
00175     try:
00176       _x = self
00177       buff.write(_struct_3I.pack(_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs))
00178       _x = self.door.header.frame_id
00179       length = len(_x)
00180       if python3 or type(_x) == unicode:
00181         _x = _x.encode('utf-8')
00182         length = len(_x)
00183       buff.write(struct.pack('<I%ss'%length, length, _x))
00184       _x = self
00185       buff.write(_struct_16f3i3df.pack(_x.door.frame_p1.x, _x.door.frame_p1.y, _x.door.frame_p1.z, _x.door.frame_p2.x, _x.door.frame_p2.y, _x.door.frame_p2.z, _x.door.door_p1.x, _x.door.door_p1.y, _x.door.door_p1.z, _x.door.door_p2.x, _x.door.door_p2.y, _x.door.door_p2.z, _x.door.handle.x, _x.door.handle.y, _x.door.handle.z, _x.door.height, _x.door.hinge, _x.door.rot_dir, _x.door.latch_state, _x.door.travel_dir.x, _x.door.travel_dir.y, _x.door.travel_dir.z, _x.door.weight))
00186     except struct.error as se: self._check_types(se)
00187     except TypeError as te: self._check_types(te)
00188 
00189   def deserialize_numpy(self, str, numpy):
00190     """
00191     unpack serialized message in str into this message instance using numpy for array types
00192     :param str: byte array of serialized message, ``str``
00193     :param numpy: numpy python module
00194     """
00195     try:
00196       if self.door is None:
00197         self.door = door_msgs.msg.Door()
00198       end = 0
00199       _x = self
00200       start = end
00201       end += 12
00202       (_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00203       start = end
00204       end += 4
00205       (length,) = _struct_I.unpack(str[start:end])
00206       start = end
00207       end += length
00208       if python3:
00209         self.door.header.frame_id = str[start:end].decode('utf-8')
00210       else:
00211         self.door.header.frame_id = str[start:end]
00212       _x = self
00213       start = end
00214       end += 104
00215       (_x.door.frame_p1.x, _x.door.frame_p1.y, _x.door.frame_p1.z, _x.door.frame_p2.x, _x.door.frame_p2.y, _x.door.frame_p2.z, _x.door.door_p1.x, _x.door.door_p1.y, _x.door.door_p1.z, _x.door.door_p2.x, _x.door.door_p2.y, _x.door.door_p2.z, _x.door.handle.x, _x.door.handle.y, _x.door.handle.z, _x.door.height, _x.door.hinge, _x.door.rot_dir, _x.door.latch_state, _x.door.travel_dir.x, _x.door.travel_dir.y, _x.door.travel_dir.z, _x.door.weight,) = _struct_16f3i3df.unpack(str[start:end])
00216       return self
00217     except struct.error as e:
00218       raise genpy.DeserializationError(e) #most likely buffer underfill
00219 
00220 _struct_I = genpy.struct_I
00221 _struct_3I = struct.Struct("<3I")
00222 _struct_16f3i3df = struct.Struct("<16f3i3df")


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