Original location for project: https://github.com/iscumd/ohm2017
Files pertaining to ECE 4881 final project have been copied to this repo so that they are all under one location instead of multiple folders
-
Place wooden calibration stick named "Ohm Calibration Stick" so that the wooden protrusion that is on the short end of stick is flush with the front of robot and inline with the centerline of the robot.
-
Place cardboard tri-fold flat with the non-white side flat on the ground and infront of calibration stick so that the center line of tri-fold is inline with the robot's centerline.
-
From the center of lidar measure the X and Y distances in meters (round to the nearest cm) of 2 diagonal corners i.e O and M Note. Left of the centerline is negative from the perspective of the robot
L---------------M | | | tri-fold | Height is always perpendicular to the robot | | Width is always parallel to the robot O---------------N | | <-- wooden stick | ------- robot
-
Open Cheese and change resolution to 640x480, take photo.
-
Open image in GIMP and get the pixel coodinates of each corner.
-
In vision_test.launch under "Pixel coordinates go here" plug the pixel coordinates into their respective locations
ex. param name="white_line_detection_topLeftXpix" value="247"
-
Calculate ratio. ratio = Width/Height ( if using the 48x36in tri-fold ratio is 1.3333) plug the value into the vision_test.launch under "ratio".
-
Now run white_line_detection.cpp using ros, and save the image in the window labeled "WARPED" (there is a save icon)
-
Open the image labeled "WARPED" and get the new pixel coordinates of the diagonal corners that you found their respective XY distances.
-
To calculate the constants, use either the source "calibration_formula.cpp", or the executable "calibrate" located in Ohm2017/Camera_Calibration, and plug in values for the new pixel coordinates from step 9 and their respective XY distances from step 3.
-
To enable video recording or drawing overlays, in vision_test.launch under "Enable recording" and "Enable drawing" respectively, change false to true. Recording records the raw footage.