00001 """autogenerated by genpy from pr2_tilt_laser_interface/GetSnapshotGoal.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class GetSnapshotGoal(genpy.Message):
00009 _md5sum = "464673531a0e6172d0d965e354c952f0"
00010 _type = "pr2_tilt_laser_interface/GetSnapshotGoal"
00011 _has_header = False
00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 # Goal
00014 # We always want to command. Don't need this bool
00015 # bool command_laser # True: Use the command below. False: Use existing profile
00016 float32 start_angle
00017 float32 end_angle
00018 float32 speed
00019 bool hi_fidelity
00020 bool continuous
00021
00022 """
00023 __slots__ = ['start_angle','end_angle','speed','hi_fidelity','continuous']
00024 _slot_types = ['float32','float32','float32','bool','bool']
00025
00026 def __init__(self, *args, **kwds):
00027 """
00028 Constructor. Any message fields that are implicitly/explicitly
00029 set to None will be assigned a default value. The recommend
00030 use is keyword arguments as this is more robust to future message
00031 changes. You cannot mix in-order arguments and keyword arguments.
00032
00033 The available fields are:
00034 start_angle,end_angle,speed,hi_fidelity,continuous
00035
00036 :param args: complete set of field values, in .msg order
00037 :param kwds: use keyword arguments corresponding to message field names
00038 to set specific fields.
00039 """
00040 if args or kwds:
00041 super(GetSnapshotGoal, self).__init__(*args, **kwds)
00042
00043 if self.start_angle is None:
00044 self.start_angle = 0.
00045 if self.end_angle is None:
00046 self.end_angle = 0.
00047 if self.speed is None:
00048 self.speed = 0.
00049 if self.hi_fidelity is None:
00050 self.hi_fidelity = False
00051 if self.continuous is None:
00052 self.continuous = False
00053 else:
00054 self.start_angle = 0.
00055 self.end_angle = 0.
00056 self.speed = 0.
00057 self.hi_fidelity = False
00058 self.continuous = False
00059
00060 def _get_types(self):
00061 """
00062 internal API method
00063 """
00064 return self._slot_types
00065
00066 def serialize(self, buff):
00067 """
00068 serialize message into buffer
00069 :param buff: buffer, ``StringIO``
00070 """
00071 try:
00072 _x = self
00073 buff.write(_struct_3f2B.pack(_x.start_angle, _x.end_angle, _x.speed, _x.hi_fidelity, _x.continuous))
00074 except struct.error as se: self._check_types(se)
00075 except TypeError as 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, ``str``
00081 """
00082 try:
00083 end = 0
00084 _x = self
00085 start = end
00086 end += 14
00087 (_x.start_angle, _x.end_angle, _x.speed, _x.hi_fidelity, _x.continuous,) = _struct_3f2B.unpack(str[start:end])
00088 self.hi_fidelity = bool(self.hi_fidelity)
00089 self.continuous = bool(self.continuous)
00090 return self
00091 except struct.error as e:
00092 raise genpy.DeserializationError(e)
00093
00094
00095 def serialize_numpy(self, buff, numpy):
00096 """
00097 serialize message with numpy array types into buffer
00098 :param buff: buffer, ``StringIO``
00099 :param numpy: numpy python module
00100 """
00101 try:
00102 _x = self
00103 buff.write(_struct_3f2B.pack(_x.start_angle, _x.end_angle, _x.speed, _x.hi_fidelity, _x.continuous))
00104 except struct.error as se: self._check_types(se)
00105 except TypeError as te: self._check_types(te)
00106
00107 def deserialize_numpy(self, str, numpy):
00108 """
00109 unpack serialized message in str into this message instance using numpy for array types
00110 :param str: byte array of serialized message, ``str``
00111 :param numpy: numpy python module
00112 """
00113 try:
00114 end = 0
00115 _x = self
00116 start = end
00117 end += 14
00118 (_x.start_angle, _x.end_angle, _x.speed, _x.hi_fidelity, _x.continuous,) = _struct_3f2B.unpack(str[start:end])
00119 self.hi_fidelity = bool(self.hi_fidelity)
00120 self.continuous = bool(self.continuous)
00121 return self
00122 except struct.error as e:
00123 raise genpy.DeserializationError(e)
00124
00125 _struct_I = genpy.struct_I
00126 _struct_3f2B = struct.Struct("<3f2B")