Calibrating

Share for us
Share on facebook
Share on twitter
Share on pinterest
Share on whatsapp

During the installation, errors may happen to mechanical connection. So you need to calibrate the robot to make sure the accuracy.

Uploading Code for Calibration

Open Crawler.ino under CD\code\3.Crawl\Crawler.

Modify Line 32-34 as follows (uncomment the Line 33 #define ADJUST), compile the code, upload it to the SunFounder Servo Control Board, and then remove the USB cable.

Switch on SunFounder Servo Control Board. At this point, the crawling robot will keep the calibration poses.

Calibrating

Measure the 3D (x, y, z) coordinates of toe tip the four legs, put them in the array real_site[4][3] at Line 36 to calibrate the error during the installation.

a. Place the robot on the Calibration Chart (a piece of paper included in the package) as shown in the following

picture. Measure the coordinates (x, y, z) of leg 1 with a ruler. Here it is (108, 68, 44).

Please pay attention to the direction of the robot and refer to the orange arrow below.

The yellow lines below are not the exact X, Y, and Z axes of the robot; they are marked just for your better understanding of the values at three axes.

b. Measure the coordinate (x, y, z) of leg 2. Here it is (100, 65, 55). 

c. Rotate the robot as shown in the following figure, and measure the coordinates (x, y, z) of leg 3. Here it is (92, 72, 52).

Please pay attention to the direction of the robot and refer to the orange arrow below.

 d. Measure the coordinate (x, y, z) of leg 4. Here it is (90, 75, 55).

So, the coordinates filled in the array are (108,68,44), (100,65,55), (92,72,52), and (90,75,55), as shown below:

Fill in the values according to your actual measurements to calibrate the robot correctly.

Uploading Code for Verification

Modify Line 32-34 as follows (uncomment the Line 34 #define VERIFY), compile and upload the sketch to the SunFounder Servo Control Board, and then remove the USB cable.

Switch on SunFounder Servo Control Board. At this point, the crawling robot will keep the verification poses.

Verifying

Place the crawling robot on the calibration chart, and then measure the 3D coordinates (x, y, z) with a ruler. If it is close to the calibration coordinates (100, 80, 42) set in adjust_site[3] and the error of each axis is less than 10mm, it means calibration is successful. Otherwise, recalibrate it until it succeeds.