00001 """autogenerated by genpy from door_perception_old/Door.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
00010 class Door(genpy.Message):
00011 _md5sum = "fce3feccaee01f73aacec4ee0cc19829"
00012 _type = "door_perception_old/Door"
00013 _has_header = True
00014 _full_text = """# Axis shall be aligned s.t. the y axis is along the closed door, while the z
00015 # axis is the up vector and the x axis designates the direction in which the
00016 # door opens
00017
00018 std_msgs/Header header
00019 geometry_msgs/Pose axis
00020 float64 radius
00021
00022 ================================================================================
00023 MSG: std_msgs/Header
00024 # Standard metadata for higher-level stamped data types.
00025 # This is generally used to communicate timestamped data
00026 # in a particular coordinate frame.
00027 #
00028 # sequence ID: consecutively increasing ID
00029 uint32 seq
00030 #Two-integer timestamp that is expressed as:
00031 # * stamp.secs: seconds (stamp_secs) since epoch
00032 # * stamp.nsecs: nanoseconds since stamp_secs
00033 # time-handling sugar is provided by the client library
00034 time stamp
00035 #Frame this data is associated with
00036 # 0: no frame
00037 # 1: global frame
00038 string frame_id
00039
00040 ================================================================================
00041 MSG: geometry_msgs/Pose
00042 # A representation of pose in free space, composed of postion and orientation.
00043 Point position
00044 Quaternion orientation
00045
00046 ================================================================================
00047 MSG: geometry_msgs/Point
00048 # This contains the position of a point in free space
00049 float64 x
00050 float64 y
00051 float64 z
00052
00053 ================================================================================
00054 MSG: geometry_msgs/Quaternion
00055 # This represents an orientation in free space in quaternion form.
00056
00057 float64 x
00058 float64 y
00059 float64 z
00060 float64 w
00061
00062 """
00063 __slots__ = ['header','axis','radius']
00064 _slot_types = ['std_msgs/Header','geometry_msgs/Pose','float64']
00065
00066 def __init__(self, *args, **kwds):
00067 """
00068 Constructor. Any message fields that are implicitly/explicitly
00069 set to None will be assigned a default value. The recommend
00070 use is keyword arguments as this is more robust to future message
00071 changes. You cannot mix in-order arguments and keyword arguments.
00072
00073 The available fields are:
00074 header,axis,radius
00075
00076 :param args: complete set of field values, in .msg order
00077 :param kwds: use keyword arguments corresponding to message field names
00078 to set specific fields.
00079 """
00080 if args or kwds:
00081 super(Door, self).__init__(*args, **kwds)
00082
00083 if self.header is None:
00084 self.header = std_msgs.msg.Header()
00085 if self.axis is None:
00086 self.axis = geometry_msgs.msg.Pose()
00087 if self.radius is None:
00088 self.radius = 0.
00089 else:
00090 self.header = std_msgs.msg.Header()
00091 self.axis = geometry_msgs.msg.Pose()
00092 self.radius = 0.
00093
00094 def _get_types(self):
00095 """
00096 internal API method
00097 """
00098 return self._slot_types
00099
00100 def serialize(self, buff):
00101 """
00102 serialize message into buffer
00103 :param buff: buffer, ``StringIO``
00104 """
00105 try:
00106 _x = self
00107 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00108 _x = self.header.frame_id
00109 length = len(_x)
00110 if python3 or type(_x) == unicode:
00111 _x = _x.encode('utf-8')
00112 length = len(_x)
00113 buff.write(struct.pack('<I%ss'%length, length, _x))
00114 _x = self
00115 buff.write(_struct_8d.pack(_x.axis.position.x, _x.axis.position.y, _x.axis.position.z, _x.axis.orientation.x, _x.axis.orientation.y, _x.axis.orientation.z, _x.axis.orientation.w, _x.radius))
00116 except struct.error as se: self._check_types(se)
00117 except TypeError as te: self._check_types(te)
00118
00119 def deserialize(self, str):
00120 """
00121 unpack serialized message in str into this message instance
00122 :param str: byte array of serialized message, ``str``
00123 """
00124 try:
00125 if self.header is None:
00126 self.header = std_msgs.msg.Header()
00127 if self.axis is None:
00128 self.axis = geometry_msgs.msg.Pose()
00129 end = 0
00130 _x = self
00131 start = end
00132 end += 12
00133 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00134 start = end
00135 end += 4
00136 (length,) = _struct_I.unpack(str[start:end])
00137 start = end
00138 end += length
00139 if python3:
00140 self.header.frame_id = str[start:end].decode('utf-8')
00141 else:
00142 self.header.frame_id = str[start:end]
00143 _x = self
00144 start = end
00145 end += 64
00146 (_x.axis.position.x, _x.axis.position.y, _x.axis.position.z, _x.axis.orientation.x, _x.axis.orientation.y, _x.axis.orientation.z, _x.axis.orientation.w, _x.radius,) = _struct_8d.unpack(str[start:end])
00147 return self
00148 except struct.error as e:
00149 raise genpy.DeserializationError(e)
00150
00151
00152 def serialize_numpy(self, buff, numpy):
00153 """
00154 serialize message with numpy array types into buffer
00155 :param buff: buffer, ``StringIO``
00156 :param numpy: numpy python module
00157 """
00158 try:
00159 _x = self
00160 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00161 _x = self.header.frame_id
00162 length = len(_x)
00163 if python3 or type(_x) == unicode:
00164 _x = _x.encode('utf-8')
00165 length = len(_x)
00166 buff.write(struct.pack('<I%ss'%length, length, _x))
00167 _x = self
00168 buff.write(_struct_8d.pack(_x.axis.position.x, _x.axis.position.y, _x.axis.position.z, _x.axis.orientation.x, _x.axis.orientation.y, _x.axis.orientation.z, _x.axis.orientation.w, _x.radius))
00169 except struct.error as se: self._check_types(se)
00170 except TypeError as te: self._check_types(te)
00171
00172 def deserialize_numpy(self, str, numpy):
00173 """
00174 unpack serialized message in str into this message instance using numpy for array types
00175 :param str: byte array of serialized message, ``str``
00176 :param numpy: numpy python module
00177 """
00178 try:
00179 if self.header is None:
00180 self.header = std_msgs.msg.Header()
00181 if self.axis is None:
00182 self.axis = geometry_msgs.msg.Pose()
00183 end = 0
00184 _x = self
00185 start = end
00186 end += 12
00187 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00188 start = end
00189 end += 4
00190 (length,) = _struct_I.unpack(str[start:end])
00191 start = end
00192 end += length
00193 if python3:
00194 self.header.frame_id = str[start:end].decode('utf-8')
00195 else:
00196 self.header.frame_id = str[start:end]
00197 _x = self
00198 start = end
00199 end += 64
00200 (_x.axis.position.x, _x.axis.position.y, _x.axis.position.z, _x.axis.orientation.x, _x.axis.orientation.y, _x.axis.orientation.z, _x.axis.orientation.w, _x.radius,) = _struct_8d.unpack(str[start:end])
00201 return self
00202 except struct.error as e:
00203 raise genpy.DeserializationError(e)
00204
00205 _struct_I = genpy.struct_I
00206 _struct_3I = struct.Struct("<3I")
00207 _struct_8d = struct.Struct("<8d")