Does anyone have any example codes or sources🙏
^That’s an older post of mine that contains my best information for pure pursuit.
I will not be releasing my pure pursuit code because it is a huge learning opportunity missed to just be handed a piece of code that big. Please do not go around the vex forums asking for large pieces of code because most people are not willing to just give out their code (especially for the really large algorithms). I do, however, know of some public pros github repos that contain pure pursuit code:
But, if you really want to advance in programming, rather than just gaining a minor competitive edge, it would be best for you to design and write a pure pursuit algorithm yourself. You should really only look at that code once you’ve written the algorithm and you need to debug it.
But I will
I don’t think the loop() function works as of now, meaning the pure pursuit code will not work at its current state. I don’t think the settling conditions have been figured out. However, I do plan on releasing the code as a library probably at the end of summer once I can test the pure pursuit and make sure it is stable. All the math related to it is tested however.
also there’s this pretty amazing thing called google, and when used well, you could probably find example code from FRC/FTC that you can port to your project.
and if you haven’t already, I highly recommend checking out okapilib & pros
good luck!
in my opinion, a lot of the time as a programmer you need to try to do things yourself to develop. I personally chose to write a game engine instead of using one, even though it is nowhere near as good as for example Godot ive been learning like a madman with it. However, I do have to say for the extremely complex topics like say neural networking, you really do need example code. I’ve been toying around with AI for a while now for my own use and it is extremely complicated to write, at least with the algorithim I use, and I definitely couldn’t have written it myself, as of right now, without any example code. However, you really should rewrite all code that you take from other places (with the exception of stuff like graphics code, use common sense) because that will show you A LOT of new concepts and things you never thought of. And then, you can also put your own spin on them. I like to use more C style coding, so I end up writing longer code to do the same thing because it’s more readable to me. If I were to give you my code and you rewrote it, you could, instead of using an array or a hash map, you could use std::vector, which I never use, because you like it better. Especially in C++, there is many ways to write code that does the same thing, and learning how to read other code and write it in your own way is very good. don’t ever replace hashmaps though they’re the greatest thing to ever exist (that was a joke, do what you want it’s your code lol)
And when I say rewrite it, I don’t mean just have the code open in another tab and just type what you see. I mean to actually say “ok they’re using these strategies to code, how do I implement them?” That thinking is much more effective than just reading the code, because you actually understand what’s going on.
Thank you so much for your help. This example can help us improve alot
Thank you so much for providing the video and all of these amazing links👍
Instead of these multiple replies, please just click the little heart. It means the same thing, but doesn’t cutter up the forums so much.
This, and many other good suggestions of forum etiquette, can be found if you read the forum rules.