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