5yler / metatron

Autonomous Power Racing Series Racecar - ROS Metapackage
4 stars 2 forks source link

Calibrate IMU on both cars #3

Open 5yler opened 7 years ago

5yler commented 7 years ago

See the Calibration section of the README.md in rtimulib_ros:

Calibration

The calibration needs to be performed by the RTIMULibCal utility provided by the library. In case of a several devices configuration, RTIMULibCal can be launched with an argument to change the name of the calibration file. Example:

   $ RTIMULibCal toto

Will produce the toto.ini file in the current directory.

Then, the file calibration file .ini needs to be placed in the config directory of the package.

If the calibration file has a custom name, it must be specified with the calibration_file_name parameter.

We probably want to save the .ini files in gigatron_hardware/config/<CAR_NAME>/imu_calibration.ini or something like that

Tasks

5yler commented 7 years ago

Yes we can load the resulting calibration files! If the resulting calibration file is gigatron_hardware/config/<CAR_NAME>/imu_calibration.ini, then the following lines in imu.launch

<arg name="calibration_file_path" default="$(find rtimulib_ros)/config" />
<arg name="calibration_file_name" default="RTIMULib" />

should change to

<arg name="calibration_file_path" default="$(find gigatron_hardware)/config/$(arg car)/" />
<arg name="calibration_file_name" default="imu_calibration" />
5yler commented 7 years ago

I tried running RTIMULibCal but the calibration instructions are kinda confusing:

Accelerometer Calibration
-------------------------
The code normally ignores readings until an axis has been enabled.
The idea is to orient the IMU near the current extrema (+x, -x, +y, -y, +z, -z)
and then enable the axis, moving the IMU very gently around to find the
extreme value. Now disable the axis again so that the IMU can be inverted.
When the IMU has been inverted, enable the axis again and find the extreme
point. Disable the axis again and press the space bar to move to the next
axis and repeat. The software will display the current axis and enable state.
Available options are:
  e - enable the current axis.
  d - disable the current axis.
  space bar - move to the next axis (x then y then z then x etc.
  r - reset the current axis (if enabled).
  s - save the data once all 6 extrema have been collected.
  x - abort and discard the data.

I want to see a video of someone doing this live. I get the general idea but am very confused about the order of the steps - is it (+x, -x, +y, -y, +z, -z) or (x then y then z then x etc.)?

5yler commented 7 years ago

I think I got it, but for the magnetometer calibration - maybe someone without a shitton of metal on both writsts?

See Kilotron calibration file

5yler commented 7 years ago

Seriously though, the metal is a problem. I need help