IMPORTANT UPDATE: EOCV has released 1.5.3, a version that doesn't need you to install the lib435 file anymore. Simply change from 1.5.2 to 1.5.3 in build.dependencies.gradle, and gradle sync. Skip the instructions on putting the lib435 file on the hub. For more info, see github.com/OpenFTC/EasyOpenCV. Hey everyone! Thanks for the 10K views! Glad this tutorial is helping you! One bug fix in the video: On 24:25, you actually need to check if the tagOfInterest is null separately, if not then you can check the tagOfInterest.id Originally this was unchecked and resulted in teams getting a Null Pointer Error when the code failed to detect a tag. You can see how its used here: github.com/cobalt-colts/AprilTag-Workshop/blob/master/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auton/AutonTemplate.java Another thing: I originally said that AprilTags wasn't available on OnBot. However, I didn't notice that OBJ had ways to upload .aar files. For now, there are OBJ instructions on github.com/OpenFTC/EOCV-AprilTag-Plugin I do plan on making a tutorial on how to use OBJ sometime soon. Best wishes, Sriram
@@FTC_6547 not quite yet still working through a few problems, I'm having a few trouble with tuning it since the github I found for this asks for the focal center which isn't really a thing as far as I could tell, I think I've figured that out but it would be really nice if you made a video on how to tune it and detect which specific apriltags.
@@franmcgu2378 Hmmm- for me there was no need to tune it- I just left all the fx,fy,cx,cy constants the same and it works. For specific april tags, you can just change the values of LEFT, MIDDLE, and RIGHT to the apriltag you want (I use 1,2,3).
I'm a bit late, but you'd simply adjust the code initializing the camera. Easiest way to do this would be to replace line #67 in sample code (camera = OpenCvCameraFactory.getInstance().createWebcam(hardwareMap.get(WebcamName.class, "Webcam 1"), cameraMonitorViewId);) with the following code camera = OpenCvCameraFactory.getInstance().createInternalCamera(OpenCvInternalCamera.CameraDirection.BACK, cameraMonitorViewId); which just creates an internal camera instance that is using the back camera instead of a new webcam.
Thanks for the video, will definitely be using this for our next competition! Is there a way to customize the apriltag and use one of the 20 provided? Honestly just want to make a smiley face with it and some other pixel art on our team sleeve. Thanks again!
Glad to see some tutorials here. I'm a rookie coach coaching a rookie team and we're just using the FIRST "robot controller console" to do our java programming through the onbot java tool. Is it possible to use this with that? I'm not familiar with OpenCV, android studio, griddles or anything else :). Please let me know. Thanks!
After touching INIT, touch 3-dots menu icon, then choose Camera Stream. It's not live video, touch image to refresh. Select Camera Stream again, to close the preview and continue with the START arrow.
Hello a question How did you do with your console to get the program that is there? I was checking it and I didn't understand what you're really doing :(
Hi! Your tutorial is awsome! I was wondering if you knew how to access Expansion Hub's internal storage in order to upload the EasyOpenCV file in it. My team rocks the dual expansion hubs and we don't have a Control Hub unfortunately.
Hello! You're gonna scroll down and follow step #7 here: github.com/OpenFTC/EasyOpenCV to get the .so file onto it. Essentially, you connect the Robot Controller Phone (with MTP mode on) to the computer, and send the file there :)
excuse me please. I have a question if we want to make this whole code in to the op mode. Can we do that because I will use it when for the robot mobility too.
There is now a tutorial for using OnBot Java! th-cam.com/video/jWT7CPGd484/w-d-xo.html
sriram not even in our team and still carrying us
I'm coaching a first year 7th grader team this year. As rookie coach and rookie team, this is tremendous help! Thank you.
Glad to help!
IMPORTANT UPDATE: EOCV has released 1.5.3, a version that doesn't need you to install the lib435 file anymore. Simply change from 1.5.2 to 1.5.3 in build.dependencies.gradle, and gradle sync. Skip the instructions on putting the lib435 file on the hub. For more info, see github.com/OpenFTC/EasyOpenCV.
Hey everyone! Thanks for the 10K views! Glad this tutorial is helping you!
One bug fix in the video: On 24:25, you actually need to check if the tagOfInterest is null separately, if not then you can check the tagOfInterest.id
Originally this was unchecked and resulted in teams getting a Null Pointer Error when the code failed to detect a tag. You can see how its used here:
github.com/cobalt-colts/AprilTag-Workshop/blob/master/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/auton/AutonTemplate.java
Another thing:
I originally said that AprilTags wasn't available on OnBot. However, I didn't notice that OBJ had ways to upload .aar files. For now, there are OBJ instructions on
github.com/OpenFTC/EOCV-AprilTag-Plugin
I do plan on making a tutorial on how to use OBJ sometime soon.
Best wishes,
Sriram
thank you so much, this is a literal life saver
You are welcome! Is the detection working well? :)
@@FTC_6547 not quite yet still working through a few problems, I'm having a few trouble with tuning it since the github I found for this asks for the focal center which isn't really a thing as far as I could tell, I think I've figured that out but it would be really nice if you made a video on how to tune it and detect which specific apriltags.
@@franmcgu2378 Hmmm- for me there was no need to tune it- I just left all the fx,fy,cx,cy constants the same and it works.
For specific april tags, you can just change the values of LEFT, MIDDLE, and RIGHT to the apriltag you want (I use 1,2,3).
@@goosegoinggone oh ok, yeah It's working for me now even though I didn't tune it. Thanks!
Thank you so much for this! Such a good tutorial
No problem! Good luck this year :)
I just saw your video it is possible to change the thing, i.e. by scanning barcodes of objects???
Thank you for sharing. Very helpful. Any suggestions on what changes to make it work with phone's camera instead of a web cam? Thank you
I think you'd switch the code that hardwaremaps the webcam to code that hardwaremaps the phone. Haven't really tested with phones however.
I'm a bit late, but you'd simply adjust the code initializing the camera. Easiest way to do this would be to replace line #67 in sample code (camera = OpenCvCameraFactory.getInstance().createWebcam(hardwareMap.get(WebcamName.class, "Webcam 1"), cameraMonitorViewId);)
with the following code
camera = OpenCvCameraFactory.getInstance().createInternalCamera(OpenCvInternalCamera.CameraDirection.BACK, cameraMonitorViewId);
which just creates an internal camera instance that is using the back camera instead of a new webcam.
Rookie team checkmate 21879 thanks you for this awesome video! Your mentorship was greatly appreciated!
No problem! Good luck this year!
Thanks for the video, will definitely be using this for our next competition! Is there a way to customize the apriltag and use one of the 20 provided? Honestly just want to make a smiley face with it and some other pixel art on our team sleeve. Thanks again!
Hello! I wouldn't suggest modifying AprilTags, however what you can do is have 2 of the sides have tags, and the 3rd one be pixel art!
Good video, but I'd like to know more details. Can AprilTag be used for block programming?
I have a video for OnBot java: th-cam.com/video/jWT7CPGd484/w-d-xo.html
Thank you so much this was very informative I have one question though how do you connect the control hub to the macbook with adb
Try to just use a cable; its much faster.
You're awesome :)
Glad to see some tutorials here. I'm a rookie coach coaching a rookie team and we're just using the FIRST "robot controller console" to do our java programming through the onbot java tool. Is it possible to use this with that? I'm not familiar with OpenCV, android studio, griddles or anything else :). Please let me know. Thanks!
Hello! I just made a video on this yesterday: th-cam.com/video/jWT7CPGd484/w-d-xo.html
:)
I just made the code public! Sorry I didn't catch that :)
is the sleeve template in the description using the same apriltags ids as the ones you used in the video
Yep!
Hey I was wondering how you were able to get the web cam video to the driver hub?
After touching INIT, touch 3-dots menu icon, then choose Camera Stream.
It's not live video, touch image to refresh.
Select Camera Stream again, to close the preview and continue with the START arrow.
Hello a question How did you do with your console to get the program that is there? I was checking it and I didn't understand what you're really doing :(
Could you elaborate more on the problem?
Hi! Your tutorial is awsome! I was wondering if you knew how to access Expansion Hub's internal storage in order to upload the EasyOpenCV file in it. My team rocks the dual expansion hubs and we don't have a Control Hub unfortunately.
Hello! You're gonna scroll down and follow step #7 here: github.com/OpenFTC/EasyOpenCV to get the .so file onto it. Essentially, you connect the Robot Controller Phone (with MTP mode on) to the computer, and send the file there :)
Very good tutorial!
Thanks!
excuse me please. I have a question if we want to make this whole code in to the op mode. Can we do that because I will use it when for the robot mobility too.
Yep, you can add the rest of auton code in the opmode!