00001 """autogenerated by genmsg_py from GetSnapshotGoal.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class GetSnapshotGoal(roslib.message.Message):
00007 _md5sum = "464673531a0e6172d0d965e354c952f0"
00008 _type = "pr2_tilt_laser_interface/GetSnapshotGoal"
00009 _has_header = False
00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00011 # Goal
00012 # We always want to command. Don't need this bool
00013 # bool command_laser # True: Use the command below. False: Use existing profile
00014 float32 start_angle
00015 float32 end_angle
00016 float32 speed
00017 bool hi_fidelity
00018 bool continuous
00019
00020 """
00021 __slots__ = ['start_angle','end_angle','speed','hi_fidelity','continuous']
00022 _slot_types = ['float32','float32','float32','bool','bool']
00023
00024 def __init__(self, *args, **kwds):
00025 """
00026 Constructor. Any message fields that are implicitly/explicitly
00027 set to None will be assigned a default value. The recommend
00028 use is keyword arguments as this is more robust to future message
00029 changes. You cannot mix in-order arguments and keyword arguments.
00030
00031 The available fields are:
00032 start_angle,end_angle,speed,hi_fidelity,continuous
00033
00034 @param args: complete set of field values, in .msg order
00035 @param kwds: use keyword arguments corresponding to message field names
00036 to set specific fields.
00037 """
00038 if args or kwds:
00039 super(GetSnapshotGoal, self).__init__(*args, **kwds)
00040
00041 if self.start_angle is None:
00042 self.start_angle = 0.
00043 if self.end_angle is None:
00044 self.end_angle = 0.
00045 if self.speed is None:
00046 self.speed = 0.
00047 if self.hi_fidelity is None:
00048 self.hi_fidelity = False
00049 if self.continuous is None:
00050 self.continuous = False
00051 else:
00052 self.start_angle = 0.
00053 self.end_angle = 0.
00054 self.speed = 0.
00055 self.hi_fidelity = False
00056 self.continuous = False
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_3f2B.pack(_x.start_angle, _x.end_angle, _x.speed, _x.hi_fidelity, _x.continuous))
00073 except struct.error, se: self._check_types(se)
00074 except TypeError, 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 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, e:
00092 raise roslib.message.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
00099 @type buff: StringIO
00100 @param numpy: numpy python module
00101 @type numpy module
00102 """
00103 try:
00104 _x = self
00105 buff.write(_struct_3f2B.pack(_x.start_angle, _x.end_angle, _x.speed, _x.hi_fidelity, _x.continuous))
00106 except struct.error, se: self._check_types(se)
00107 except TypeError, 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 end = 0
00119 _x = self
00120 start = end
00121 end += 14
00122 (_x.start_angle, _x.end_angle, _x.speed, _x.hi_fidelity, _x.continuous,) = _struct_3f2B.unpack(str[start:end])
00123 self.hi_fidelity = bool(self.hi_fidelity)
00124 self.continuous = bool(self.continuous)
00125 return self
00126 except struct.error, e:
00127 raise roslib.message.DeserializationError(e)
00128
00129 _struct_I = roslib.message.struct_I
00130 _struct_3f2B = struct.Struct("<3f2B")