00001 """autogenerated by genmsg_py from IMUCalcData.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import std_msgs.msg
00006
00007 class IMUCalcData(roslib.message.Message):
00008 _md5sum = "69fa9ec7b73af705eabe7dcbfd39ac85"
00009 _type = "asctec_msgs/IMUCalcData"
00010 _has_header = True
00011 _full_text = """# Software License Agreement (BSD License)
00012 #
00013 # Copyright (c) 2010
00014 # William Morris <morris@ee.ccny.cuny.edu>
00015 # Ivan Dryanovski <ivan.dryanovski@gmail.com>
00016 # All rights reserved.
00017 #
00018 # Redistribution and use in source and binary forms, with or without
00019 # modification, are permitted provided that the following conditions
00020 # are met:
00021 #
00022 # * Redistributions of source code must retain the above copyright
00023 # notice, this list of conditions and the following disclaimer.
00024 # * Redistributions in binary form must reproduce the above
00025 # copyright notice, this list of conditions and the following
00026 # disclaimer in the documentation and/or other materials provided
00027 # with the distribution.
00028 # * Neither the name of CCNY Robotics Lab nor the names of its
00029 # contributors may be used to endorse or promote products derived
00030 # from this software without specific prior written permission.
00031 #
00032 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00033 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00034 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00035 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00036 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00037 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00038 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00039 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00040 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00041 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00042 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00043 # POSSIBILITY OF SUCH DAMAGE.
00044
00045 Header header
00046 # angles derived by integration of gyro_outputs, drift compensated by data fusion;
00047 #-90000..+90000 pitch(nick) and roll, 0..360000 yaw; 1000 = 1 degree
00048
00049 int32 angle_nick
00050 int32 angle_roll
00051 int32 angle_yaw
00052
00053 # angular velocities, raw values [16 bit], bias free, in 0.0154 degree/s (=> 64.8 = 1 degree/s)
00054
00055 int32 angvel_nick
00056 int32 angvel_roll
00057 int32 angvel_yaw
00058
00059 # acc-sensor outputs, calibrated: -10000..+10000 = -1g..+1g
00060
00061 int16 acc_x_calib
00062 int16 acc_y_calib
00063 int16 acc_z_calib
00064
00065 # horizontal / vertical accelerations: -10000..+10000 = -1g..+1g
00066
00067 int16 acc_x
00068 int16 acc_y
00069 int16 acc_z
00070
00071 # reference angles derived by accelerations only: -90000..+90000; 1000 = 1 degree
00072
00073 int32 acc_angle_nick
00074 int32 acc_angle_roll
00075
00076 # total acceleration measured (10000 = 1g)
00077
00078 int32 acc_absolute_value
00079
00080 # magnetic field sensors output, offset free and scaled; units not determined,
00081 # as only the direction of the field vector is taken into account
00082
00083 int32 Hx
00084 int32 Hy
00085 int32 Hz
00086
00087 # compass reading: angle reference for angle_yaw: 0..360000; 1000 = 1 degree
00088
00089 int32 mag_heading
00090
00091 # pseudo speed measurements: integrated accelerations, pulled towards zero; units unknown;
00092 # used for short-term position stabilization
00093
00094 int32 speed_x
00095 int32 speed_y
00096 int32 speed_z
00097
00098 # height in mm (after data fusion)
00099
00100 int32 height
00101
00102 # diff. height in mm/s (after data fusion)
00103
00104 int32 dheight
00105
00106 # diff. height measured by the pressure sensor [mm/s]
00107
00108 int32 dheight_reference
00109
00110 # height measured by the pressure sensor [mm]
00111
00112 int32 height_reference
00113
00114
00115 ================================================================================
00116 MSG: std_msgs/Header
00117 # Standard metadata for higher-level stamped data types.
00118 # This is generally used to communicate timestamped data
00119 # in a particular coordinate frame.
00120 #
00121 # sequence ID: consecutively increasing ID
00122 uint32 seq
00123 #Two-integer timestamp that is expressed as:
00124 # * stamp.secs: seconds (stamp_secs) since epoch
00125 # * stamp.nsecs: nanoseconds since stamp_secs
00126 # time-handling sugar is provided by the client library
00127 time stamp
00128 #Frame this data is associated with
00129 # 0: no frame
00130 # 1: global frame
00131 string frame_id
00132
00133 """
00134 __slots__ = ['header','angle_nick','angle_roll','angle_yaw','angvel_nick','angvel_roll','angvel_yaw','acc_x_calib','acc_y_calib','acc_z_calib','acc_x','acc_y','acc_z','acc_angle_nick','acc_angle_roll','acc_absolute_value','Hx','Hy','Hz','mag_heading','speed_x','speed_y','speed_z','height','dheight','dheight_reference','height_reference']
00135 _slot_types = ['Header','int32','int32','int32','int32','int32','int32','int16','int16','int16','int16','int16','int16','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32']
00136
00137 def __init__(self, *args, **kwds):
00138 """
00139 Constructor. Any message fields that are implicitly/explicitly
00140 set to None will be assigned a default value. The recommend
00141 use is keyword arguments as this is more robust to future message
00142 changes. You cannot mix in-order arguments and keyword arguments.
00143
00144 The available fields are:
00145 header,angle_nick,angle_roll,angle_yaw,angvel_nick,angvel_roll,angvel_yaw,acc_x_calib,acc_y_calib,acc_z_calib,acc_x,acc_y,acc_z,acc_angle_nick,acc_angle_roll,acc_absolute_value,Hx,Hy,Hz,mag_heading,speed_x,speed_y,speed_z,height,dheight,dheight_reference,height_reference
00146
00147 @param args: complete set of field values, in .msg order
00148 @param kwds: use keyword arguments corresponding to message field names
00149 to set specific fields.
00150 """
00151 if args or kwds:
00152 super(IMUCalcData, self).__init__(*args, **kwds)
00153
00154 if self.header is None:
00155 self.header = std_msgs.msg._Header.Header()
00156 if self.angle_nick is None:
00157 self.angle_nick = 0
00158 if self.angle_roll is None:
00159 self.angle_roll = 0
00160 if self.angle_yaw is None:
00161 self.angle_yaw = 0
00162 if self.angvel_nick is None:
00163 self.angvel_nick = 0
00164 if self.angvel_roll is None:
00165 self.angvel_roll = 0
00166 if self.angvel_yaw is None:
00167 self.angvel_yaw = 0
00168 if self.acc_x_calib is None:
00169 self.acc_x_calib = 0
00170 if self.acc_y_calib is None:
00171 self.acc_y_calib = 0
00172 if self.acc_z_calib is None:
00173 self.acc_z_calib = 0
00174 if self.acc_x is None:
00175 self.acc_x = 0
00176 if self.acc_y is None:
00177 self.acc_y = 0
00178 if self.acc_z is None:
00179 self.acc_z = 0
00180 if self.acc_angle_nick is None:
00181 self.acc_angle_nick = 0
00182 if self.acc_angle_roll is None:
00183 self.acc_angle_roll = 0
00184 if self.acc_absolute_value is None:
00185 self.acc_absolute_value = 0
00186 if self.Hx is None:
00187 self.Hx = 0
00188 if self.Hy is None:
00189 self.Hy = 0
00190 if self.Hz is None:
00191 self.Hz = 0
00192 if self.mag_heading is None:
00193 self.mag_heading = 0
00194 if self.speed_x is None:
00195 self.speed_x = 0
00196 if self.speed_y is None:
00197 self.speed_y = 0
00198 if self.speed_z is None:
00199 self.speed_z = 0
00200 if self.height is None:
00201 self.height = 0
00202 if self.dheight is None:
00203 self.dheight = 0
00204 if self.dheight_reference is None:
00205 self.dheight_reference = 0
00206 if self.height_reference is None:
00207 self.height_reference = 0
00208 else:
00209 self.header = std_msgs.msg._Header.Header()
00210 self.angle_nick = 0
00211 self.angle_roll = 0
00212 self.angle_yaw = 0
00213 self.angvel_nick = 0
00214 self.angvel_roll = 0
00215 self.angvel_yaw = 0
00216 self.acc_x_calib = 0
00217 self.acc_y_calib = 0
00218 self.acc_z_calib = 0
00219 self.acc_x = 0
00220 self.acc_y = 0
00221 self.acc_z = 0
00222 self.acc_angle_nick = 0
00223 self.acc_angle_roll = 0
00224 self.acc_absolute_value = 0
00225 self.Hx = 0
00226 self.Hy = 0
00227 self.Hz = 0
00228 self.mag_heading = 0
00229 self.speed_x = 0
00230 self.speed_y = 0
00231 self.speed_z = 0
00232 self.height = 0
00233 self.dheight = 0
00234 self.dheight_reference = 0
00235 self.height_reference = 0
00236
00237 def _get_types(self):
00238 """
00239 internal API method
00240 """
00241 return self._slot_types
00242
00243 def serialize(self, buff):
00244 """
00245 serialize message into buffer
00246 @param buff: buffer
00247 @type buff: StringIO
00248 """
00249 try:
00250 _x = self
00251 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00252 _x = self.header.frame_id
00253 length = len(_x)
00254 buff.write(struct.pack('<I%ss'%length, length, _x))
00255 _x = self
00256 buff.write(_struct_6i6h14i.pack(_x.angle_nick, _x.angle_roll, _x.angle_yaw, _x.angvel_nick, _x.angvel_roll, _x.angvel_yaw, _x.acc_x_calib, _x.acc_y_calib, _x.acc_z_calib, _x.acc_x, _x.acc_y, _x.acc_z, _x.acc_angle_nick, _x.acc_angle_roll, _x.acc_absolute_value, _x.Hx, _x.Hy, _x.Hz, _x.mag_heading, _x.speed_x, _x.speed_y, _x.speed_z, _x.height, _x.dheight, _x.dheight_reference, _x.height_reference))
00257 except struct.error, se: self._check_types(se)
00258 except TypeError, te: self._check_types(te)
00259
00260 def deserialize(self, str):
00261 """
00262 unpack serialized message in str into this message instance
00263 @param str: byte array of serialized message
00264 @type str: str
00265 """
00266 try:
00267 if self.header is None:
00268 self.header = std_msgs.msg._Header.Header()
00269 end = 0
00270 _x = self
00271 start = end
00272 end += 12
00273 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00274 start = end
00275 end += 4
00276 (length,) = _struct_I.unpack(str[start:end])
00277 start = end
00278 end += length
00279 self.header.frame_id = str[start:end]
00280 _x = self
00281 start = end
00282 end += 92
00283 (_x.angle_nick, _x.angle_roll, _x.angle_yaw, _x.angvel_nick, _x.angvel_roll, _x.angvel_yaw, _x.acc_x_calib, _x.acc_y_calib, _x.acc_z_calib, _x.acc_x, _x.acc_y, _x.acc_z, _x.acc_angle_nick, _x.acc_angle_roll, _x.acc_absolute_value, _x.Hx, _x.Hy, _x.Hz, _x.mag_heading, _x.speed_x, _x.speed_y, _x.speed_z, _x.height, _x.dheight, _x.dheight_reference, _x.height_reference,) = _struct_6i6h14i.unpack(str[start:end])
00284 return self
00285 except struct.error, e:
00286 raise roslib.message.DeserializationError(e)
00287
00288
00289 def serialize_numpy(self, buff, numpy):
00290 """
00291 serialize message with numpy array types into buffer
00292 @param buff: buffer
00293 @type buff: StringIO
00294 @param numpy: numpy python module
00295 @type numpy module
00296 """
00297 try:
00298 _x = self
00299 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00300 _x = self.header.frame_id
00301 length = len(_x)
00302 buff.write(struct.pack('<I%ss'%length, length, _x))
00303 _x = self
00304 buff.write(_struct_6i6h14i.pack(_x.angle_nick, _x.angle_roll, _x.angle_yaw, _x.angvel_nick, _x.angvel_roll, _x.angvel_yaw, _x.acc_x_calib, _x.acc_y_calib, _x.acc_z_calib, _x.acc_x, _x.acc_y, _x.acc_z, _x.acc_angle_nick, _x.acc_angle_roll, _x.acc_absolute_value, _x.Hx, _x.Hy, _x.Hz, _x.mag_heading, _x.speed_x, _x.speed_y, _x.speed_z, _x.height, _x.dheight, _x.dheight_reference, _x.height_reference))
00305 except struct.error, se: self._check_types(se)
00306 except TypeError, te: self._check_types(te)
00307
00308 def deserialize_numpy(self, str, numpy):
00309 """
00310 unpack serialized message in str into this message instance using numpy for array types
00311 @param str: byte array of serialized message
00312 @type str: str
00313 @param numpy: numpy python module
00314 @type numpy: module
00315 """
00316 try:
00317 if self.header is None:
00318 self.header = std_msgs.msg._Header.Header()
00319 end = 0
00320 _x = self
00321 start = end
00322 end += 12
00323 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00324 start = end
00325 end += 4
00326 (length,) = _struct_I.unpack(str[start:end])
00327 start = end
00328 end += length
00329 self.header.frame_id = str[start:end]
00330 _x = self
00331 start = end
00332 end += 92
00333 (_x.angle_nick, _x.angle_roll, _x.angle_yaw, _x.angvel_nick, _x.angvel_roll, _x.angvel_yaw, _x.acc_x_calib, _x.acc_y_calib, _x.acc_z_calib, _x.acc_x, _x.acc_y, _x.acc_z, _x.acc_angle_nick, _x.acc_angle_roll, _x.acc_absolute_value, _x.Hx, _x.Hy, _x.Hz, _x.mag_heading, _x.speed_x, _x.speed_y, _x.speed_z, _x.height, _x.dheight, _x.dheight_reference, _x.height_reference,) = _struct_6i6h14i.unpack(str[start:end])
00334 return self
00335 except struct.error, e:
00336 raise roslib.message.DeserializationError(e)
00337
00338 _struct_I = roslib.message.struct_I
00339 _struct_3I = struct.Struct("<3I")
00340 _struct_6i6h14i = struct.Struct("<6i6h14i")