StimDc / FTC_2022-2023

de ce merge?
BSD 3-Clause Clear License
3 stars 0 forks source link

Add camera and camera detection #3

Open StimDc opened 1 year ago

StimDc commented 1 year ago

For more points, the robot should use a webcam and detect diferent images and the team's mascot

TO DO:

RunaAM commented 1 year ago

Update 18.01.23

To implement camera we debated which library we should use, if Vuforia was the better option or if OpenCV was. After what felt like one hour , we decided to use OpenCV and AprilTags because the implementation was easy and we only wanted for the robot to detect images. We found a repository called EasyOpenCV with precompiled images and it was farely easy to use that. For testing we have created new files, one called TestareCamere for testing the camera and the other named AprilTagsDetectionPipeline used as an interface between the library and the opmodes. We have chosen 3 AprilTags from the 36h11 family (ids: 17 ,18,19). If the robot sees the AprilTags with the id of 17, it will park on the left , if the id is 18 , it will park on the center and for 19 to the right. After debugging the code and refactored it to get rid of unecessary lines of code like the function tagToTelemetry() the result was good enought to implement to our opModes.