00001 """autogenerated by genmsg_py from GetSnapshotActionGoal.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import pr2_tilt_laser_interface.msg
00006 import roslib.rostime
00007 import actionlib_msgs.msg
00008 import std_msgs.msg
00009
00010 class GetSnapshotActionGoal(roslib.message.Message):
00011 _md5sum = "b7d8dfaa64edc35cd62f781639e44a0a"
00012 _type = "pr2_tilt_laser_interface/GetSnapshotActionGoal"
00013 _has_header = True
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 Header header
00017 actionlib_msgs/GoalID goal_id
00018 GetSnapshotGoal goal
00019
00020 ================================================================================
00021 MSG: std_msgs/Header
00022 # Standard metadata for higher-level stamped data types.
00023 # This is generally used to communicate timestamped data
00024 # in a particular coordinate frame.
00025 #
00026 # sequence ID: consecutively increasing ID
00027 uint32 seq
00028 #Two-integer timestamp that is expressed as:
00029 # * stamp.secs: seconds (stamp_secs) since epoch
00030 # * stamp.nsecs: nanoseconds since stamp_secs
00031 # time-handling sugar is provided by the client library
00032 time stamp
00033 #Frame this data is associated with
00034 # 0: no frame
00035 # 1: global frame
00036 string frame_id
00037
00038 ================================================================================
00039 MSG: actionlib_msgs/GoalID
00040 # The stamp should store the time at which this goal was requested.
00041 # It is used by an action server when it tries to preempt all
00042 # goals that were requested before a certain time
00043 time stamp
00044
00045 # The id provides a way to associate feedback and
00046 # result message with specific goal requests. The id
00047 # specified must be unique.
00048 string id
00049
00050
00051 ================================================================================
00052 MSG: pr2_tilt_laser_interface/GetSnapshotGoal
00053 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00054 # Goal
00055 # We always want to command. Don't need this bool
00056 # bool command_laser # True: Use the command below. False: Use existing profile
00057 float32 start_angle
00058 float32 end_angle
00059 float32 speed
00060 bool hi_fidelity
00061 bool continuous
00062
00063 """
00064 __slots__ = ['header','goal_id','goal']
00065 _slot_types = ['Header','actionlib_msgs/GoalID','pr2_tilt_laser_interface/GetSnapshotGoal']
00066
00067 def __init__(self, *args, **kwds):
00068 """
00069 Constructor. Any message fields that are implicitly/explicitly
00070 set to None will be assigned a default value. The recommend
00071 use is keyword arguments as this is more robust to future message
00072 changes. You cannot mix in-order arguments and keyword arguments.
00073
00074 The available fields are:
00075 header,goal_id,goal
00076
00077 @param args: complete set of field values, in .msg order
00078 @param kwds: use keyword arguments corresponding to message field names
00079 to set specific fields.
00080 """
00081 if args or kwds:
00082 super(GetSnapshotActionGoal, self).__init__(*args, **kwds)
00083
00084 if self.header is None:
00085 self.header = std_msgs.msg._Header.Header()
00086 if self.goal_id is None:
00087 self.goal_id = actionlib_msgs.msg.GoalID()
00088 if self.goal is None:
00089 self.goal = pr2_tilt_laser_interface.msg.GetSnapshotGoal()
00090 else:
00091 self.header = std_msgs.msg._Header.Header()
00092 self.goal_id = actionlib_msgs.msg.GoalID()
00093 self.goal = pr2_tilt_laser_interface.msg.GetSnapshotGoal()
00094
00095 def _get_types(self):
00096 """
00097 internal API method
00098 """
00099 return self._slot_types
00100
00101 def serialize(self, buff):
00102 """
00103 serialize message into buffer
00104 @param buff: buffer
00105 @type buff: StringIO
00106 """
00107 try:
00108 _x = self
00109 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00110 _x = self.header.frame_id
00111 length = len(_x)
00112 buff.write(struct.pack('<I%ss'%length, length, _x))
00113 _x = self
00114 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00115 _x = self.goal_id.id
00116 length = len(_x)
00117 buff.write(struct.pack('<I%ss'%length, length, _x))
00118 _x = self
00119 buff.write(_struct_3f2B.pack(_x.goal.start_angle, _x.goal.end_angle, _x.goal.speed, _x.goal.hi_fidelity, _x.goal.continuous))
00120 except struct.error, se: self._check_types(se)
00121 except TypeError, te: self._check_types(te)
00122
00123 def deserialize(self, str):
00124 """
00125 unpack serialized message in str into this message instance
00126 @param str: byte array of serialized message
00127 @type str: str
00128 """
00129 try:
00130 if self.header is None:
00131 self.header = std_msgs.msg._Header.Header()
00132 if self.goal_id is None:
00133 self.goal_id = actionlib_msgs.msg.GoalID()
00134 if self.goal is None:
00135 self.goal = pr2_tilt_laser_interface.msg.GetSnapshotGoal()
00136 end = 0
00137 _x = self
00138 start = end
00139 end += 12
00140 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00141 start = end
00142 end += 4
00143 (length,) = _struct_I.unpack(str[start:end])
00144 start = end
00145 end += length
00146 self.header.frame_id = str[start:end]
00147 _x = self
00148 start = end
00149 end += 8
00150 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00151 start = end
00152 end += 4
00153 (length,) = _struct_I.unpack(str[start:end])
00154 start = end
00155 end += length
00156 self.goal_id.id = str[start:end]
00157 _x = self
00158 start = end
00159 end += 14
00160 (_x.goal.start_angle, _x.goal.end_angle, _x.goal.speed, _x.goal.hi_fidelity, _x.goal.continuous,) = _struct_3f2B.unpack(str[start:end])
00161 self.goal.hi_fidelity = bool(self.goal.hi_fidelity)
00162 self.goal.continuous = bool(self.goal.continuous)
00163 return self
00164 except struct.error, e:
00165 raise roslib.message.DeserializationError(e)
00166
00167
00168 def serialize_numpy(self, buff, numpy):
00169 """
00170 serialize message with numpy array types into buffer
00171 @param buff: buffer
00172 @type buff: StringIO
00173 @param numpy: numpy python module
00174 @type numpy module
00175 """
00176 try:
00177 _x = self
00178 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00179 _x = self.header.frame_id
00180 length = len(_x)
00181 buff.write(struct.pack('<I%ss'%length, length, _x))
00182 _x = self
00183 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00184 _x = self.goal_id.id
00185 length = len(_x)
00186 buff.write(struct.pack('<I%ss'%length, length, _x))
00187 _x = self
00188 buff.write(_struct_3f2B.pack(_x.goal.start_angle, _x.goal.end_angle, _x.goal.speed, _x.goal.hi_fidelity, _x.goal.continuous))
00189 except struct.error, se: self._check_types(se)
00190 except TypeError, te: self._check_types(te)
00191
00192 def deserialize_numpy(self, str, numpy):
00193 """
00194 unpack serialized message in str into this message instance using numpy for array types
00195 @param str: byte array of serialized message
00196 @type str: str
00197 @param numpy: numpy python module
00198 @type numpy: module
00199 """
00200 try:
00201 if self.header is None:
00202 self.header = std_msgs.msg._Header.Header()
00203 if self.goal_id is None:
00204 self.goal_id = actionlib_msgs.msg.GoalID()
00205 if self.goal is None:
00206 self.goal = pr2_tilt_laser_interface.msg.GetSnapshotGoal()
00207 end = 0
00208 _x = self
00209 start = end
00210 end += 12
00211 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00212 start = end
00213 end += 4
00214 (length,) = _struct_I.unpack(str[start:end])
00215 start = end
00216 end += length
00217 self.header.frame_id = str[start:end]
00218 _x = self
00219 start = end
00220 end += 8
00221 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00222 start = end
00223 end += 4
00224 (length,) = _struct_I.unpack(str[start:end])
00225 start = end
00226 end += length
00227 self.goal_id.id = str[start:end]
00228 _x = self
00229 start = end
00230 end += 14
00231 (_x.goal.start_angle, _x.goal.end_angle, _x.goal.speed, _x.goal.hi_fidelity, _x.goal.continuous,) = _struct_3f2B.unpack(str[start:end])
00232 self.goal.hi_fidelity = bool(self.goal.hi_fidelity)
00233 self.goal.continuous = bool(self.goal.continuous)
00234 return self
00235 except struct.error, e:
00236 raise roslib.message.DeserializationError(e)
00237
00238 _struct_I = roslib.message.struct_I
00239 _struct_3I = struct.Struct("<3I")
00240 _struct_3f2B = struct.Struct("<3f2B")
00241 _struct_2I = struct.Struct("<2I")