Austin Schuh | 5e34162 | 2019-03-08 21:19:35 -0800 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | cd "$(dirname "${BASH_SOURCE[0]}")" |
| 6 | |
| 7 | # We need to rebuild to save the old constants since the .cc file is baked into |
| 8 | # the executable. |
| 9 | calibration() { |
| 10 | bazel build -c opt //y2019/vision:global_calibration |
| 11 | |
| 12 | ../../bazel-bin/y2019/vision/global_calibration "$@" |
| 13 | } |
| 14 | |
| 15 | # Calibrate the comp robot. This is assuming the data file captured has been |
| 16 | # extracted into the data folder in //y2019/vision/ |
| 17 | calibration \ |
| 18 | --camera_id 10 \ |
| 19 | --tape_start_x=-12.5 \ |
| 20 | --tape_start_y=0.0 \ |
| 21 | --tape_direction_x=-1.0 \ |
| 22 | --tape_direction_y=0.0 \ |
| 23 | --beginning_tape_measure_reading=11 \ |
| 24 | --image_count=75 \ |
| 25 | --constants=constants.cc \ |
| 26 | --prefix data/cam10_0/debug_viewer_jpeg_ |
| 27 | |
| 28 | calibration \ |
| 29 | --camera_id 6 \ |
| 30 | --tape_start_x=12.5 \ |
| 31 | --tape_start_y=0.0 \ |
| 32 | --tape_direction_x=1.0 \ |
| 33 | --tape_direction_y=0.0 \ |
| 34 | --beginning_tape_measure_reading=11 \ |
| 35 | --image_count=75 \ |
| 36 | --constants=constants.cc \ |
| 37 | --prefix data/cam6_0/debug_viewer_jpeg_ |
| 38 | |
| 39 | calibration \ |
| 40 | --camera_id 7 \ |
| 41 | --tape_start_x=12.5 \ |
| 42 | --tape_start_y=0.0 \ |
| 43 | --tape_direction_x=1.0 \ |
| 44 | --tape_direction_y=0.0 \ |
| 45 | --beginning_tape_measure_reading=21 \ |
| 46 | --image_count=65 \ |
| 47 | --constants=constants.cc \ |
| 48 | --prefix data/cam7_0/debug_viewer_jpeg_ |
| 49 | |
| 50 | calibration \ |
| 51 | --camera_id 9 \ |
| 52 | --tape_start_x=-6.5 \ |
| 53 | --tape_start_y=11.0 \ |
| 54 | --tape_direction_x=0.0 \ |
| 55 | --tape_direction_y=-1.0 \ |
| 56 | --beginning_tape_measure_reading=30 \ |
| 57 | --image_count=56 \ |
| 58 | --constants=constants.cc \ |
| 59 | --prefix data/cam9_0/debug_viewer_jpeg_ |
| 60 | |
| 61 | calibration \ |
| 62 | --camera_id 8 \ |
| 63 | --tape_start_x=6.5 \ |
| 64 | --tape_start_y=-11.0 \ |
| 65 | --tape_direction_x=0.0 \ |
| 66 | --tape_direction_y=1.0 \ |
| 67 | --beginning_tape_measure_reading=25 \ |
| 68 | --image_count=61 \ |
| 69 | --constants=constants.cc \ |
| 70 | --prefix data/cam8_0/debug_viewer_jpeg_ |