Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 1.89 KB

magnetic-calibration.md

File metadata and controls

27 lines (21 loc) · 1.89 KB

Dynamic calibration

The dynamic calibration lets the vehicle compensate for the variable magnetic fields generated by its eight thrusters.

  1. Kill the controller (rosnode kill /rise_6dof)
  2. Make sure the submarine is unkilled (by pressing 2)
  3. Lock the submarine in place (by pressing 3). This corresponds to holding the submarine still on the bottom of the pool.
  4. Run the dynamic compensation by running "rosrun thruster_driver do_all_calibration". Each thruster will successively go from 0 to full power forward to full power backward back to 0. The calibration script will record magnetic field data during that, do a least squares regression, and save the resulting configuration.
  5. The configuration files in subsim/launch should be updated with new values. You can verify this with "git diff launch" from within the subsim directory (roscd subsim). On the actual submarine, the files in sub_launch/launch would be updated.

Hard/soft calibration

The hard/soft calibration lets the vehicle compensate for hard and soft iron effects caused by metals in the submarine that generate magnetic fields and distort the external magnetic field.

  1. Kill the submarine (by pressing 1)
  2. Start recording raw magnetic data (rosbag record /imu/mag_raw)
  3. Rotate the submarine, sampling every possible rotation (look at subsim's README.md)
  4. Stop recording (press Ctrl-c on rosbag)
  5. Generate the calibration result (rosrun magnetic_hardsoft_compensation generate_config NAME_OF_THE_BAG_FILE_YOU_PRODUCED). Make sure that the points cover the entire sphere. If they don't, re-record the data. Close the window.
  6. Paste the generated configuration (the last 5 lines of output after closing the window) into sub_launch/launch/common.xml, replacing the similar 5 lines that are already there.
  7. Stop and restart the main "roslaunch subsim run.launch" process to load the new configuration.