00001 """autogenerated by genpy from srs_msgs/SRSSpatialInfo.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
00009 class SRSSpatialInfo(genpy.Message):
00010 _md5sum = "258ee9bd984fca3e863d2c8404dc39e3"
00011 _type = "srs_msgs/SRSSpatialInfo"
00012 _has_header = False
00013 _full_text = """# Point point
00014 # Orientation angles
00015 float32 l
00016 float32 w
00017 float32 h
00018
00019 geometry_msgs/Pose pose
00020
00021 ================================================================================
00022 MSG: geometry_msgs/Pose
00023 # A representation of pose in free space, composed of postion and orientation.
00024 Point position
00025 Quaternion orientation
00026
00027 ================================================================================
00028 MSG: geometry_msgs/Point
00029 # This contains the position of a point in free space
00030 float64 x
00031 float64 y
00032 float64 z
00033
00034 ================================================================================
00035 MSG: geometry_msgs/Quaternion
00036 # This represents an orientation in free space in quaternion form.
00037
00038 float64 x
00039 float64 y
00040 float64 z
00041 float64 w
00042
00043 """
00044 __slots__ = ['l','w','h','pose']
00045 _slot_types = ['float32','float32','float32','geometry_msgs/Pose']
00046
00047 def __init__(self, *args, **kwds):
00048 """
00049 Constructor. Any message fields that are implicitly/explicitly
00050 set to None will be assigned a default value. The recommend
00051 use is keyword arguments as this is more robust to future message
00052 changes. You cannot mix in-order arguments and keyword arguments.
00053
00054 The available fields are:
00055 l,w,h,pose
00056
00057 :param args: complete set of field values, in .msg order
00058 :param kwds: use keyword arguments corresponding to message field names
00059 to set specific fields.
00060 """
00061 if args or kwds:
00062 super(SRSSpatialInfo, self).__init__(*args, **kwds)
00063
00064 if self.l is None:
00065 self.l = 0.
00066 if self.w is None:
00067 self.w = 0.
00068 if self.h is None:
00069 self.h = 0.
00070 if self.pose is None:
00071 self.pose = geometry_msgs.msg.Pose()
00072 else:
00073 self.l = 0.
00074 self.w = 0.
00075 self.h = 0.
00076 self.pose = geometry_msgs.msg.Pose()
00077
00078 def _get_types(self):
00079 """
00080 internal API method
00081 """
00082 return self._slot_types
00083
00084 def serialize(self, buff):
00085 """
00086 serialize message into buffer
00087 :param buff: buffer, ``StringIO``
00088 """
00089 try:
00090 _x = self
00091 buff.write(_struct_3f7d.pack(_x.l, _x.w, _x.h, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w))
00092 except struct.error as se: self._check_types(se)
00093 except TypeError as te: self._check_types(te)
00094
00095 def deserialize(self, str):
00096 """
00097 unpack serialized message in str into this message instance
00098 :param str: byte array of serialized message, ``str``
00099 """
00100 try:
00101 if self.pose is None:
00102 self.pose = geometry_msgs.msg.Pose()
00103 end = 0
00104 _x = self
00105 start = end
00106 end += 68
00107 (_x.l, _x.w, _x.h, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w,) = _struct_3f7d.unpack(str[start:end])
00108 return self
00109 except struct.error as e:
00110 raise genpy.DeserializationError(e)
00111
00112
00113 def serialize_numpy(self, buff, numpy):
00114 """
00115 serialize message with numpy array types into buffer
00116 :param buff: buffer, ``StringIO``
00117 :param numpy: numpy python module
00118 """
00119 try:
00120 _x = self
00121 buff.write(_struct_3f7d.pack(_x.l, _x.w, _x.h, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w))
00122 except struct.error as se: self._check_types(se)
00123 except TypeError as te: self._check_types(te)
00124
00125 def deserialize_numpy(self, str, numpy):
00126 """
00127 unpack serialized message in str into this message instance using numpy for array types
00128 :param str: byte array of serialized message, ``str``
00129 :param numpy: numpy python module
00130 """
00131 try:
00132 if self.pose is None:
00133 self.pose = geometry_msgs.msg.Pose()
00134 end = 0
00135 _x = self
00136 start = end
00137 end += 68
00138 (_x.l, _x.w, _x.h, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w,) = _struct_3f7d.unpack(str[start:end])
00139 return self
00140 except struct.error as e:
00141 raise genpy.DeserializationError(e)
00142
00143 _struct_I = genpy.struct_I
00144 _struct_3f7d = struct.Struct("<3f7d")