Hey, so this is my first year diving into coding. I’m well versed in building but I want to help my team by learning to code. I have taken calculus and physics, so I understand how PID works but I have no idea where to start. I have read some of the previous forum posts but I don’t know enough about coding yet to create an auton. Over the summer I would like to build my knowledge of coding, and then start using PID & Odometry. And then be able to use things like pure pursuit. I know this will take time to learn but I’m committed. So do you guys have any tips as to the best way to go about this or any tutorials to watch?
One thing to think about is whether you want to USE PID/Odometry/Pure Pursuit or WRITE them yourself. There are plenty of implentations both in PROS or VexCode Pro that you can simply use or reference.
I think fundamentally it would be better to write my own PID/Odometry/Pure Pursuit. I want to learn some more about C++ and I feel like I won’t learn as much using someone else’s. That being said, do you reccomend looking at other implementations to build my own PID/ Odometry frame?
I’m curious why you think this. At a certain point, you’re using someone else’s code, whether that’s PROS or the VexCode API. Much of real world coding is using what someone else has already written and making it do what you want. Plus, if you’re using someone else’s code that is widely used, it is more likely that bugs have already been worked out, and things you may not have thought you needed are already taken care of. Using code, especially opensource code, that is well thought out can lead you towards better programming habits as well. You see how more advanced programmers structure their libraries and programs.
In my personal opinion, WPILib (which is used by FRIST teams), is incredibly well thought out, to the point where I created a port of it for Vex (for Vexcode Pro):
Most advanced teams on the VexForums will steer you towards PROS as being “better” than Vexcode. There are a number of importable modules in PROS (which, to be fair, does do this better than Vexcode). The popular OkapiLib is pretty high quality, though it’s not entirely clear to me whether it will continue to be maintained or not, especially with PROS 4 coming out. EZ Template provides a good PID implementation, among other things, and seems to have reasonable support. LemLib seems promising, though I’m not sure how mature it is.
Theo’s code post Lib7842 public code release looks to be well thought out as well, though it seems he intends for it to be used more for inspiration than directly as a library.
James always requests teams to post links to their code each season after World’s. The most recent post would be here: Spin up - season code request which may serve as another source for inspiration.