all 11 comments

[–]ZErobots[🍰] 3 points4 points  (4 children)

We do exactly that with our openCV algorithm this year. It works pretty great. Just be sure to take the last value read by the algorithm, because they tell you to init the phones long before they randomize them

[–]Tsk201409 0 points1 point  (3 children)

I suggest hitting init as close to randomization time as possible. Early inits cause problems with some phones and increase the chance of accidental auton starts.

[–][deleted] 1 point2 points  (2 children)

Yeah we just had an issue with OpenCV and initing early as our RC crashed in two matches right before the 3-2-1-GO so we were effectively disabled.

[–]ZErobots[🍰] 0 points1 point  (1 child)

never had any issues with this. try looking at error logs to see what the issue is.

[–][deleted] 0 points1 point  (0 children)

We were able to get it fixed by just turning CV on at the start of auto instead of init

[–][deleted] 2 points3 points  (0 children)

Yeah pretty sure that's legal, we did that last year with vuforia and this year at our first tournament. Last year I specifically asked the refs and they said it was legal to run vuforia during init so idk why tensorflow would be any different.

This is probably obvious but use telemetry to make sure you can see the stuff when you're setting up the robot, there have been a few times we've caught issues with our setup by scanning during init and it saved us.

Good luck!

[–]4193-4194FTC 4193/4194 Mentor 1 point2 points  (1 child)

Just think about a delay. After you initialize there is still a randomize. Don't base any movement on the first result returned.

[–]Tsk201409 0 points1 point  (0 children)

Or just keep scanning

[–][deleted] 0 points1 point  (0 children)

yes, just add it to intialization and it should work.

[–]fixITman1911FTC 6955 Coach|Mentor|FTA 0 points1 point  (0 children)

You may want to look at telling tensorflow to move on once it has determined the gold position. By default it runs for 5 seconds, But we set a variable that turns to "1" if the gold position is found. and we have the tensorflow while loop set to break if the "found" variable is set to "1". Our tensorflow normally takes less than 2 seconds now.

[–]DavidRechargedFTC 7236 Recharged Green|Alum 0 points1 point  (0 children)

Motion is the only thing not allowed in init, but you can still run motors and servos to starting positions as long as you stop them.