00001 """autogenerated by genmsg_py from PointHeadActionGoal.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import roslib.rostime
00007 import std_msgs.msg
00008
00009 class PointHeadActionGoal(roslib.message.Message):
00010 _md5sum = "8b92b1cd5e06c8a94c917dc3209a4c1d"
00011 _type = "control_msgs/PointHeadActionGoal"
00012 _has_header = False
00013 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00014 geometry_msgs/PointStamped target
00015 geometry_msgs/Vector3 pointing_axis
00016 string pointing_frame
00017 duration min_duration
00018 float64 max_velocity
00019
00020 ================================================================================
00021 MSG: geometry_msgs/PointStamped
00022 # This represents a Point with reference coordinate frame and timestamp
00023 Header header
00024 Point point
00025
00026 ================================================================================
00027 MSG: std_msgs/Header
00028 # Standard metadata for higher-level stamped data types.
00029 # This is generally used to communicate timestamped data
00030 # in a particular coordinate frame.
00031 #
00032 # sequence ID: consecutively increasing ID
00033 uint32 seq
00034 #Two-integer timestamp that is expressed as:
00035 # * stamp.secs: seconds (stamp_secs) since epoch
00036 # * stamp.nsecs: nanoseconds since stamp_secs
00037 # time-handling sugar is provided by the client library
00038 time stamp
00039 #Frame this data is associated with
00040 # 0: no frame
00041 # 1: global frame
00042 string frame_id
00043
00044 ================================================================================
00045 MSG: geometry_msgs/Point
00046 # This contains the position of a point in free space
00047 float64 x
00048 float64 y
00049 float64 z
00050
00051 ================================================================================
00052 MSG: geometry_msgs/Vector3
00053 # This represents a vector in free space.
00054
00055 float64 x
00056 float64 y
00057 float64 z
00058 """
00059 __slots__ = ['target','pointing_axis','pointing_frame','min_duration','max_velocity']
00060 _slot_types = ['geometry_msgs/PointStamped','geometry_msgs/Vector3','string','duration','float64']
00061
00062 def __init__(self, *args, **kwds):
00063 """
00064 Constructor. Any message fields that are implicitly/explicitly
00065 set to None will be assigned a default value. The recommend
00066 use is keyword arguments as this is more robust to future message
00067 changes. You cannot mix in-order arguments and keyword arguments.
00068
00069 The available fields are:
00070 target,pointing_axis,pointing_frame,min_duration,max_velocity
00071
00072 @param args: complete set of field values, in .msg order
00073 @param kwds: use keyword arguments corresponding to message field names
00074 to set specific fields.
00075 """
00076 if args or kwds:
00077 super(PointHeadActionGoal, self).__init__(*args, **kwds)
00078
00079 if self.target is None:
00080 self.target = geometry_msgs.msg.PointStamped()
00081 if self.pointing_axis is None:
00082 self.pointing_axis = geometry_msgs.msg.Vector3()
00083 if self.pointing_frame is None:
00084 self.pointing_frame = ''
00085 if self.min_duration is None:
00086 self.min_duration = roslib.rostime.Duration()
00087 if self.max_velocity is None:
00088 self.max_velocity = 0.
00089 else:
00090 self.target = geometry_msgs.msg.PointStamped()
00091 self.pointing_axis = geometry_msgs.msg.Vector3()
00092 self.pointing_frame = ''
00093 self.min_duration = roslib.rostime.Duration()
00094 self.max_velocity = 0.
00095
00096 def _get_types(self):
00097 """
00098 internal API method
00099 """
00100 return self._slot_types
00101
00102 def serialize(self, buff):
00103 """
00104 serialize message into buffer
00105 @param buff: buffer
00106 @type buff: StringIO
00107 """
00108 try:
00109 _x = self
00110 buff.write(_struct_3I.pack(_x.target.header.seq, _x.target.header.stamp.secs, _x.target.header.stamp.nsecs))
00111 _x = self.target.header.frame_id
00112 length = len(_x)
00113 buff.write(struct.pack('<I%ss'%length, length, _x))
00114 _x = self
00115 buff.write(_struct_6d.pack(_x.target.point.x, _x.target.point.y, _x.target.point.z, _x.pointing_axis.x, _x.pointing_axis.y, _x.pointing_axis.z))
00116 _x = self.pointing_frame
00117 length = len(_x)
00118 buff.write(struct.pack('<I%ss'%length, length, _x))
00119 _x = self
00120 buff.write(_struct_2id.pack(_x.min_duration.secs, _x.min_duration.nsecs, _x.max_velocity))
00121 except struct.error, se: self._check_types(se)
00122 except TypeError, te: self._check_types(te)
00123
00124 def deserialize(self, str):
00125 """
00126 unpack serialized message in str into this message instance
00127 @param str: byte array of serialized message
00128 @type str: str
00129 """
00130 try:
00131 if self.target is None:
00132 self.target = geometry_msgs.msg.PointStamped()
00133 if self.pointing_axis is None:
00134 self.pointing_axis = geometry_msgs.msg.Vector3()
00135 if self.min_duration is None:
00136 self.min_duration = roslib.rostime.Duration()
00137 end = 0
00138 _x = self
00139 start = end
00140 end += 12
00141 (_x.target.header.seq, _x.target.header.stamp.secs, _x.target.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00142 start = end
00143 end += 4
00144 (length,) = _struct_I.unpack(str[start:end])
00145 start = end
00146 end += length
00147 self.target.header.frame_id = str[start:end]
00148 _x = self
00149 start = end
00150 end += 48
00151 (_x.target.point.x, _x.target.point.y, _x.target.point.z, _x.pointing_axis.x, _x.pointing_axis.y, _x.pointing_axis.z,) = _struct_6d.unpack(str[start:end])
00152 start = end
00153 end += 4
00154 (length,) = _struct_I.unpack(str[start:end])
00155 start = end
00156 end += length
00157 self.pointing_frame = str[start:end]
00158 _x = self
00159 start = end
00160 end += 16
00161 (_x.min_duration.secs, _x.min_duration.nsecs, _x.max_velocity,) = _struct_2id.unpack(str[start:end])
00162 self.min_duration.canon()
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.target.header.seq, _x.target.header.stamp.secs, _x.target.header.stamp.nsecs))
00179 _x = self.target.header.frame_id
00180 length = len(_x)
00181 buff.write(struct.pack('<I%ss'%length, length, _x))
00182 _x = self
00183 buff.write(_struct_6d.pack(_x.target.point.x, _x.target.point.y, _x.target.point.z, _x.pointing_axis.x, _x.pointing_axis.y, _x.pointing_axis.z))
00184 _x = self.pointing_frame
00185 length = len(_x)
00186 buff.write(struct.pack('<I%ss'%length, length, _x))
00187 _x = self
00188 buff.write(_struct_2id.pack(_x.min_duration.secs, _x.min_duration.nsecs, _x.max_velocity))
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.target is None:
00202 self.target = geometry_msgs.msg.PointStamped()
00203 if self.pointing_axis is None:
00204 self.pointing_axis = geometry_msgs.msg.Vector3()
00205 if self.min_duration is None:
00206 self.min_duration = roslib.rostime.Duration()
00207 end = 0
00208 _x = self
00209 start = end
00210 end += 12
00211 (_x.target.header.seq, _x.target.header.stamp.secs, _x.target.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.target.header.frame_id = str[start:end]
00218 _x = self
00219 start = end
00220 end += 48
00221 (_x.target.point.x, _x.target.point.y, _x.target.point.z, _x.pointing_axis.x, _x.pointing_axis.y, _x.pointing_axis.z,) = _struct_6d.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.pointing_frame = str[start:end]
00228 _x = self
00229 start = end
00230 end += 16
00231 (_x.min_duration.secs, _x.min_duration.nsecs, _x.max_velocity,) = _struct_2id.unpack(str[start:end])
00232 self.min_duration.canon()
00233 return self
00234 except struct.error, e:
00235 raise roslib.message.DeserializationError(e)
00236
00237 _struct_I = roslib.message.struct_I
00238 _struct_3I = struct.Struct("<3I")
00239 _struct_6d = struct.Struct("<6d")
00240 _struct_2id = struct.Struct("<2id")