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