As i’ve been getting into odometry, i’ve ran across lots of resources on the forums for writing the algorithms like this post here (No output from Odometry code), but can’t find much on how to actually make the base move based off of the data these ints return in VEXcode. I’m not sure where to start with integrating the algorithm other than it involves multithreading somehow. Can I get some help/example code for this?
Hello, as many people want to just start programming something new, it is very important to start with the basics. Whats the point of attempting to program without learning c++ in the first place.
I would suggest starting with this learncpp. This a good website that can teach you how to better format your progamming and will make complex motion algorithms easier to code in the future. Hope this helps.
Thanks for the resource but are there any more specific pointers you could offer? I can find plenty of tutorials for c++ elsewhere
I’m not exactly sure if you’re confused about multithreading or odometry itself, so I’ll explain both.
Multithreading allows you to run 2 loops at the same time. You can learn more about it here: How to use VEX Threads
On the other hand, odometry is purely position tracking. In other words, all it does is track the position of the chassis. For the chassis to actually move, you can use something like PID. For example, if you wanted to move to the position (5_in, 4_in), you can use trig to figure out the angle you need to turn to, and the distance you need to travel to reach the point.