Code suggestions

Hello. I am building a robot for the upcoming game, Spin Up. I am wondering what the most efficient/best way to get to a specific location is, and a specific angle. Autonomous is specifically what I am talking about, but it would also be nice to be able to click a button and the bot finds the closest spot to launch a pancake. I have thought about a gps sensor, but I do not know if they can do angles or anything like that. Thank you! Also, if it changes anything, I am planning on a X drive.

I would suggest a vision sensor to position you robot in the right orientation. If you have one you could also use a gps sensor to get the specific vertical angle or rpm needed. However there was an earlier post (idk what one) about using math to make sure the discs are on a path that can hit the ‘bounding box’ of the goal (if a disc hits anywhere on the chains it will fall into the basket) from almost anywhere on the field.
Edit: this discussion Spin Up Kinematics Graphing Tool - #7 by 7996B

This is an extremely complex question you are asking, and one with many solutions as well. As @Cosmic2605 pointed out, you could use the vision sensor. You can also use odometry, which uses tracking wheels mounted on your bot. Another way is using the gps sensor to get your location on the field.

During auto, it might be easiest for you to just move based on time, turn based on time, and then shoot based on that. You can use the inertial sensor for turning with a simple p loop or a full scale pid.

There are many different solutions to your problem, and I would suggest looking at the sensors you have, reading through the documentation provided in the knowledge base articles, and then making your decision. https://kb.vex.com/hc/en-us/categories/360002333191-V5?sc=electronics

1 Like