$search
00001 """autogenerated by genmsg_py from FurnitureGeometry.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 00007 class FurnitureGeometry(roslib.message.Message): 00008 _md5sum = "9eadcd72801a473181cb7b090c264a15" 00009 _type = "srs_symbolic_grounding/FurnitureGeometry" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """geometry_msgs/Pose2D pose 00012 float32 l 00013 float32 w 00014 float32 h 00015 00016 ================================================================================ 00017 MSG: geometry_msgs/Pose2D 00018 # This expresses a position and orientation on a 2D manifold. 00019 00020 float64 x 00021 float64 y 00022 float64 theta 00023 """ 00024 __slots__ = ['pose','l','w','h'] 00025 _slot_types = ['geometry_msgs/Pose2D','float32','float32','float32'] 00026 00027 def __init__(self, *args, **kwds): 00028 """ 00029 Constructor. Any message fields that are implicitly/explicitly 00030 set to None will be assigned a default value. The recommend 00031 use is keyword arguments as this is more robust to future message 00032 changes. You cannot mix in-order arguments and keyword arguments. 00033 00034 The available fields are: 00035 pose,l,w,h 00036 00037 @param args: complete set of field values, in .msg order 00038 @param kwds: use keyword arguments corresponding to message field names 00039 to set specific fields. 00040 """ 00041 if args or kwds: 00042 super(FurnitureGeometry, self).__init__(*args, **kwds) 00043 #message fields cannot be None, assign default values for those that are 00044 if self.pose is None: 00045 self.pose = geometry_msgs.msg.Pose2D() 00046 if self.l is None: 00047 self.l = 0. 00048 if self.w is None: 00049 self.w = 0. 00050 if self.h is None: 00051 self.h = 0. 00052 else: 00053 self.pose = geometry_msgs.msg.Pose2D() 00054 self.l = 0. 00055 self.w = 0. 00056 self.h = 0. 00057 00058 def _get_types(self): 00059 """ 00060 internal API method 00061 """ 00062 return self._slot_types 00063 00064 def serialize(self, buff): 00065 """ 00066 serialize message into buffer 00067 @param buff: buffer 00068 @type buff: StringIO 00069 """ 00070 try: 00071 _x = self 00072 buff.write(_struct_3d3f.pack(_x.pose.x, _x.pose.y, _x.pose.theta, _x.l, _x.w, _x.h)) 00073 except struct.error as se: self._check_types(se) 00074 except TypeError as te: self._check_types(te) 00075 00076 def deserialize(self, str): 00077 """ 00078 unpack serialized message in str into this message instance 00079 @param str: byte array of serialized message 00080 @type str: str 00081 """ 00082 try: 00083 if self.pose is None: 00084 self.pose = geometry_msgs.msg.Pose2D() 00085 end = 0 00086 _x = self 00087 start = end 00088 end += 36 00089 (_x.pose.x, _x.pose.y, _x.pose.theta, _x.l, _x.w, _x.h,) = _struct_3d3f.unpack(str[start:end]) 00090 return self 00091 except struct.error as e: 00092 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00093 00094 00095 def serialize_numpy(self, buff, numpy): 00096 """ 00097 serialize message with numpy array types into buffer 00098 @param buff: buffer 00099 @type buff: StringIO 00100 @param numpy: numpy python module 00101 @type numpy module 00102 """ 00103 try: 00104 _x = self 00105 buff.write(_struct_3d3f.pack(_x.pose.x, _x.pose.y, _x.pose.theta, _x.l, _x.w, _x.h)) 00106 except struct.error as se: self._check_types(se) 00107 except TypeError as te: self._check_types(te) 00108 00109 def deserialize_numpy(self, str, numpy): 00110 """ 00111 unpack serialized message in str into this message instance using numpy for array types 00112 @param str: byte array of serialized message 00113 @type str: str 00114 @param numpy: numpy python module 00115 @type numpy: module 00116 """ 00117 try: 00118 if self.pose is None: 00119 self.pose = geometry_msgs.msg.Pose2D() 00120 end = 0 00121 _x = self 00122 start = end 00123 end += 36 00124 (_x.pose.x, _x.pose.y, _x.pose.theta, _x.l, _x.w, _x.h,) = _struct_3d3f.unpack(str[start:end]) 00125 return self 00126 except struct.error as e: 00127 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00128 00129 _struct_I = roslib.message.struct_I 00130 _struct_3d3f = struct.Struct("<3d3f")