Do you guys think that it is possible to use the new V5 vision sensor and use that to make auto-correct for adjusting the robot position to shoot the flag? If yes can you show the code?
I can’t speak for code part of that but if you look here at another thread
https://vexforum.com/t/visual-sensor-and-painted-robot/48035/1
You’ll find info on how the vision sensor works. It is modeled off of the CMU Pixy camera (to which there is a video description of in the thread)
From VEX’s V5 architecture website:
You could definitely use the vision sensor to aid in positioning the robot to shoot at the flags.
// coordinates of the middle of the object (computed from the values above)
uint16_t x_middle_coord;
uint16_t y_middle_coord;
You could definitely use
x_middle_coord
as a current parameter for PID control to help align the robot with the flag, though I don’t have any code with me to show an example with right now.
According to someone I know who does FRC, Robonauts did this for 2017 and got it working really well to accurately shoot from anywhere on the field. Though this will take an absurd amount of testing to make sure that there aren’t some exceptions the program doesn’t catch.
Yeah, I’m pretty sure Robonauts did this in 2017, though it wasn’t 100% accurate. Having multiple targets may add some complications though, because there isn’t just one target that you can stay locked onto.
For all the talk about the game-changing nature of the V5 Vision Sensor, because the field is pretty static, I’d imagine you’d get similar results merely by having accurate drive and turn functions, and wall squaring at the right time
@MayorMonty Yeah, you could, however that would be affected by a variety of different factors, and the vision sensor makes it so that even in the driver controlled period, you can always hit the target without aiming. Look at FRC team 254’s 2016 robot as an example. They had vision automatically targeting the goal, meaning their robot could pick up a ball, and shoot it in without needing to reposition or anything. Also, sensor error can cause problems as well.
Wouldn’t that require an accurate field position tracking system, something that AFAIK only two teams (1826 and 323Z) have ever made work consistently?
If your robot shoots far enough from the flags, a vision sensor should see all 3 flags vertically (But there is nothing stopping you from mounting your sensor sideways, so it sees more vertically. You’d be able to get away with a closer shot). I think it would be pretty easy to implement an aim corrector that positions the robot just right to shoot the flag chosen by a user (Maybe a 2 button setup, 1 button per one of the top 2 rows). It would just choose the column of flags that are closest to the center of the screen.
I played against that 323Z design…didn’t work out so well for me Brilliant coding on that robot.
My thought is that you’ll want to limit the positions that you’re shooting from. If you want to adjust your launcher to shoot from anywhere on the field, then it would be a very good idea to use the V5 Vision Sensor
@sazrocks It depends on the vision sensor, because you can use a combination of target size(in pixels), a lookup table, and linear interpolation between points to do a very similar thing