X-Drive Autonomous

Ok here I need help with coding a X-drive to get mobile goal and bring it back. Problem is our school doesn’t own a field so I’m limited of how accurate I can code. In addition, we don’t own any cones or mobile goals so wondering if anyone has a code for autonomous for an X-Drive with 4 motors.

My ports are:

Port 6
Port 7
Port 8
Port 9

Thanks in advance

If you download the game manual, included is the game field decisions, including distances. With no field, or elements you’re shooting blind. But this is at least a good start. There is also an older program online that will assist you getting some of your code and distances.

What’s the program online

No More Autonomous Programming?! - VEX Autonomous Planner Walkthrough - YouTube from 323z from a bit ago, its for another game, but it will give you some help with distances and some of the bullk work.

We are still a very young team, we just passed our 1 year mark, and the softmore slump has hit us hard. We are still learning a lot, coding is our second biggest issue and we are learning it slowly.

We have all the tools, read, spend hours learning, you have to have the tools and parts or its never going to work correctly. although you may get lucky, We did.

You can use math to find how many rotations the wheels need to go to get to the mobile goal, and back again. Then, just put them into the program somewhat like this:

while (rotations is less than the target) {
     (set wheels to some speed)} 

Or, you can calculate how fast your robot is in ft/s, then find the distance from starting bar to mogo. Then divide speed of robot by distance and that’s your time, and then base your program off time

If you have encoders on your motors, you can pretty easily write some code to calculate the number of ticks you’d need to travel a certain distance. I’m assuming you already know the basic calculations for making an X-Drive move in driver control. By doing some basic math, you can determine your tick to inch ratio. Once you have that, you’ll be able to multiply that number by sqrt(2) to see the number of ticks you’d need to travel. This was a little vague, if you need more information, feel free to ask

Thanks everyone, I did use math and it worked and I did good in my recent competitions. Did the math and did some slight changes to make it work just took me some time figuring some off balances of our robot.

You might just be able to get away with using a touch sensor to see if the mogo is successfully captured, so you can say

run motors, if button is pressed, then lift mogo, drive back, put mogo in zone

(I’m in this weird situation where I know coding logic, but not the commands, so sorry bout that. =)

Really neat idea would be trying to make that today

I am in the exact situation. I know TI-BASIC, so I know code but not all the syntax and commands of RobotC or PROS. Which is also why I’m doing the free RobotC tutorial that @Luke323Z is making.