Configuring Camera and Servos - GMU-ASRC/turbopi GitHub Wiki
How to center the camera on the TurboPi?
Whenever the TurboPi robots are initialized the cameras often become uncentered. In order to make sure they can properly re-center, we must find the correct servo values for each of the robots.
- Connect to the TurboPi with your computer using a VNC.
- Open up the
LAB_Tool
located near the top right corner of the desktop screen. Click onExecute
when prompted. - Adjust the sliders on the far right of the window
servo1
(up-down tilt) andservo2
(side-to-side pan) until the camera is pointing directly in the center and is parallel to the ground. - Once both values are adjusted, hit the large
Save
button at the bottom right
How to adjust the color thresholding on the TurboPi Camera?
The factory settings for detecting various color are pretty general. Since we want the robots to detect the particular shade of green of the included ping pong balls, we need to adjust what it considers green to be.
-
Connect to the TurboPi with your computer using a VNC.
-
Open up the
LAB_Tool
located near the top right corner of the desktop screen. Click onExecute
when prompted. -
The 6 center sliders correspond to the LAB min and max values on the right and left respectively. For more information on how exactly they work, check out https://geraldbakker.nl/psnumbers/lab-explained.html
-
Select
green
from the drop down menu. The sliders in the image below usually does a good job at detecting these ping pong balls but there may always be slight differences from robot to robot, therefore you may need to adjust the values slightly to improve the detection rate. -
Once the sliders are set, make sure to hit the smaller
Save
button in the middle of the window.