$search
00001 """autogenerated by genmsg_py from OrientedBoundingBox.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 00007 class OrientedBoundingBox(roslib.message.Message): 00008 _md5sum = "a9b13162620bd04a7cb84cf207e7a8ac" 00009 _type = "arm_navigation_msgs/OrientedBoundingBox" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """#the center of the box 00012 geometry_msgs/Point32 center 00013 00014 #the extents of the box, assuming the center is at the point 00015 geometry_msgs/Point32 extents 00016 00017 #the axis of the box 00018 geometry_msgs/Point32 axis 00019 00020 #the angle of rotation around the axis 00021 float32 angle 00022 00023 ================================================================================ 00024 MSG: geometry_msgs/Point32 00025 # This contains the position of a point in free space(with 32 bits of precision). 00026 # It is recommeded to use Point wherever possible instead of Point32. 00027 # 00028 # This recommendation is to promote interoperability. 00029 # 00030 # This message is designed to take up less space when sending 00031 # lots of points at once, as in the case of a PointCloud. 00032 00033 float32 x 00034 float32 y 00035 float32 z 00036 """ 00037 __slots__ = ['center','extents','axis','angle'] 00038 _slot_types = ['geometry_msgs/Point32','geometry_msgs/Point32','geometry_msgs/Point32','float32'] 00039 00040 def __init__(self, *args, **kwds): 00041 """ 00042 Constructor. Any message fields that are implicitly/explicitly 00043 set to None will be assigned a default value. The recommend 00044 use is keyword arguments as this is more robust to future message 00045 changes. You cannot mix in-order arguments and keyword arguments. 00046 00047 The available fields are: 00048 center,extents,axis,angle 00049 00050 @param args: complete set of field values, in .msg order 00051 @param kwds: use keyword arguments corresponding to message field names 00052 to set specific fields. 00053 """ 00054 if args or kwds: 00055 super(OrientedBoundingBox, self).__init__(*args, **kwds) 00056 #message fields cannot be None, assign default values for those that are 00057 if self.center is None: 00058 self.center = geometry_msgs.msg.Point32() 00059 if self.extents is None: 00060 self.extents = geometry_msgs.msg.Point32() 00061 if self.axis is None: 00062 self.axis = geometry_msgs.msg.Point32() 00063 if self.angle is None: 00064 self.angle = 0. 00065 else: 00066 self.center = geometry_msgs.msg.Point32() 00067 self.extents = geometry_msgs.msg.Point32() 00068 self.axis = geometry_msgs.msg.Point32() 00069 self.angle = 0. 00070 00071 def _get_types(self): 00072 """ 00073 internal API method 00074 """ 00075 return self._slot_types 00076 00077 def serialize(self, buff): 00078 """ 00079 serialize message into buffer 00080 @param buff: buffer 00081 @type buff: StringIO 00082 """ 00083 try: 00084 _x = self 00085 buff.write(_struct_10f.pack(_x.center.x, _x.center.y, _x.center.z, _x.extents.x, _x.extents.y, _x.extents.z, _x.axis.x, _x.axis.y, _x.axis.z, _x.angle)) 00086 except struct.error as se: self._check_types(se) 00087 except TypeError as te: self._check_types(te) 00088 00089 def deserialize(self, str): 00090 """ 00091 unpack serialized message in str into this message instance 00092 @param str: byte array of serialized message 00093 @type str: str 00094 """ 00095 try: 00096 if self.center is None: 00097 self.center = geometry_msgs.msg.Point32() 00098 if self.extents is None: 00099 self.extents = geometry_msgs.msg.Point32() 00100 if self.axis is None: 00101 self.axis = geometry_msgs.msg.Point32() 00102 end = 0 00103 _x = self 00104 start = end 00105 end += 40 00106 (_x.center.x, _x.center.y, _x.center.z, _x.extents.x, _x.extents.y, _x.extents.z, _x.axis.x, _x.axis.y, _x.axis.z, _x.angle,) = _struct_10f.unpack(str[start:end]) 00107 return self 00108 except struct.error as e: 00109 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00110 00111 00112 def serialize_numpy(self, buff, numpy): 00113 """ 00114 serialize message with numpy array types into buffer 00115 @param buff: buffer 00116 @type buff: StringIO 00117 @param numpy: numpy python module 00118 @type numpy module 00119 """ 00120 try: 00121 _x = self 00122 buff.write(_struct_10f.pack(_x.center.x, _x.center.y, _x.center.z, _x.extents.x, _x.extents.y, _x.extents.z, _x.axis.x, _x.axis.y, _x.axis.z, _x.angle)) 00123 except struct.error as se: self._check_types(se) 00124 except TypeError as te: self._check_types(te) 00125 00126 def deserialize_numpy(self, str, numpy): 00127 """ 00128 unpack serialized message in str into this message instance using numpy for array types 00129 @param str: byte array of serialized message 00130 @type str: str 00131 @param numpy: numpy python module 00132 @type numpy: module 00133 """ 00134 try: 00135 if self.center is None: 00136 self.center = geometry_msgs.msg.Point32() 00137 if self.extents is None: 00138 self.extents = geometry_msgs.msg.Point32() 00139 if self.axis is None: 00140 self.axis = geometry_msgs.msg.Point32() 00141 end = 0 00142 _x = self 00143 start = end 00144 end += 40 00145 (_x.center.x, _x.center.y, _x.center.z, _x.extents.x, _x.extents.y, _x.extents.z, _x.axis.x, _x.axis.y, _x.axis.z, _x.angle,) = _struct_10f.unpack(str[start:end]) 00146 return self 00147 except struct.error as e: 00148 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00149 00150 _struct_I = roslib.message.struct_I 00151 _struct_10f = struct.Struct("<10f")