_DoorCmd.py
Go to the documentation of this file.
00001 """autogenerated by genpy from door_msgs/DoorCmd.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 DoorCmd(genpy.Message):
00012   _md5sum = "5cc30e56a9970953e15b3f2cd05f9d0c"
00013   _type = "door_msgs/DoorCmd"
00014   _has_header = False #flag to mark the presence of a Header object
00015   _full_text = """door_msgs/Door door
00016 int32 side
00017 int32 PULL=0
00018 int32 PUSH=1
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   # Pseudo-constants
00089   PULL = 0
00090   PUSH = 1
00091 
00092   __slots__ = ['door','side']
00093   _slot_types = ['door_msgs/Door','int32']
00094 
00095   def __init__(self, *args, **kwds):
00096     """
00097     Constructor. Any message fields that are implicitly/explicitly
00098     set to None will be assigned a default value. The recommend
00099     use is keyword arguments as this is more robust to future message
00100     changes.  You cannot mix in-order arguments and keyword arguments.
00101 
00102     The available fields are:
00103        door,side
00104 
00105     :param args: complete set of field values, in .msg order
00106     :param kwds: use keyword arguments corresponding to message field names
00107     to set specific fields.
00108     """
00109     if args or kwds:
00110       super(DoorCmd, self).__init__(*args, **kwds)
00111       #message fields cannot be None, assign default values for those that are
00112       if self.door is None:
00113         self.door = door_msgs.msg.Door()
00114       if self.side is None:
00115         self.side = 0
00116     else:
00117       self.door = door_msgs.msg.Door()
00118       self.side = 0
00119 
00120   def _get_types(self):
00121     """
00122     internal API method
00123     """
00124     return self._slot_types
00125 
00126   def serialize(self, buff):
00127     """
00128     serialize message into buffer
00129     :param buff: buffer, ``StringIO``
00130     """
00131     try:
00132       _x = self
00133       buff.write(_struct_3I.pack(_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs))
00134       _x = self.door.header.frame_id
00135       length = len(_x)
00136       if python3 or type(_x) == unicode:
00137         _x = _x.encode('utf-8')
00138         length = len(_x)
00139       buff.write(struct.pack('<I%ss'%length, length, _x))
00140       _x = self
00141       buff.write(_struct_16f3i3dfi.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, _x.side))
00142     except struct.error as se: self._check_types(se)
00143     except TypeError as te: self._check_types(te)
00144 
00145   def deserialize(self, str):
00146     """
00147     unpack serialized message in str into this message instance
00148     :param str: byte array of serialized message, ``str``
00149     """
00150     try:
00151       if self.door is None:
00152         self.door = door_msgs.msg.Door()
00153       end = 0
00154       _x = self
00155       start = end
00156       end += 12
00157       (_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00158       start = end
00159       end += 4
00160       (length,) = _struct_I.unpack(str[start:end])
00161       start = end
00162       end += length
00163       if python3:
00164         self.door.header.frame_id = str[start:end].decode('utf-8')
00165       else:
00166         self.door.header.frame_id = str[start:end]
00167       _x = self
00168       start = end
00169       end += 108
00170       (_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, _x.side,) = _struct_16f3i3dfi.unpack(str[start:end])
00171       return self
00172     except struct.error as e:
00173       raise genpy.DeserializationError(e) #most likely buffer underfill
00174 
00175 
00176   def serialize_numpy(self, buff, numpy):
00177     """
00178     serialize message with numpy array types into buffer
00179     :param buff: buffer, ``StringIO``
00180     :param numpy: numpy python module
00181     """
00182     try:
00183       _x = self
00184       buff.write(_struct_3I.pack(_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs))
00185       _x = self.door.header.frame_id
00186       length = len(_x)
00187       if python3 or type(_x) == unicode:
00188         _x = _x.encode('utf-8')
00189         length = len(_x)
00190       buff.write(struct.pack('<I%ss'%length, length, _x))
00191       _x = self
00192       buff.write(_struct_16f3i3dfi.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, _x.side))
00193     except struct.error as se: self._check_types(se)
00194     except TypeError as te: self._check_types(te)
00195 
00196   def deserialize_numpy(self, str, numpy):
00197     """
00198     unpack serialized message in str into this message instance using numpy for array types
00199     :param str: byte array of serialized message, ``str``
00200     :param numpy: numpy python module
00201     """
00202     try:
00203       if self.door is None:
00204         self.door = door_msgs.msg.Door()
00205       end = 0
00206       _x = self
00207       start = end
00208       end += 12
00209       (_x.door.header.seq, _x.door.header.stamp.secs, _x.door.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00210       start = end
00211       end += 4
00212       (length,) = _struct_I.unpack(str[start:end])
00213       start = end
00214       end += length
00215       if python3:
00216         self.door.header.frame_id = str[start:end].decode('utf-8')
00217       else:
00218         self.door.header.frame_id = str[start:end]
00219       _x = self
00220       start = end
00221       end += 108
00222       (_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, _x.side,) = _struct_16f3i3dfi.unpack(str[start:end])
00223       return self
00224     except struct.error as e:
00225       raise genpy.DeserializationError(e) #most likely buffer underfill
00226 
00227 _struct_I = genpy.struct_I
00228 _struct_3I = struct.Struct("<3I")
00229 _struct_16f3i3dfi = struct.Struct("<16f3i3dfi")


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