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