I hope you are doing well! I encountered a feature, that has eventually turned into an issue with what I think is the inertial sensor. When we tell the drivetrain to turn, it turns fast at first, and then slowly approaches the angle it needs to turn to(almost like an implementation of PID but we do not have that system coded currently). We are currently using the “InertialSensor.turnToHeadding()” method. This has become an issue because we want a faster game auton run and currently it is bogged down by slow turns. This could also be a side affect of using the smart drivetrain object. This is my first year programming in the vex environment so any help and advice is greatly appreciated.
Have a fantastic day!
I believe the built in drivetrain in vexcode does use a form of build in PID to make turns using an inertial sensor, if you integrate the sensor into the drivetrain in the devices menu. So that default behavior is the fastest you can get without making your own turn functions.
But you totally can make your own turn functions, if you separate the inertial from the drivetrain and use the values from it to calculate how to turn on your own terms. I quite like the guide made by @Connor here, which does include a section on PID based turning.
if you aren’t at the point where you can comfortably make custom PID loops, I’ve had pretty good success with simple P loops for my turns. Not quite as accurate as PID, but pretty close, and perfectly usable for 15 second autonomous programs.
Thanks I appreciate it and I will definitely look into it. I recognized your pfp and could not remember what it was from and then I saw that you are on 99999V! I have been watching your videos on your YouTube all season! Congrats on the recent programming skills run and best of luck for the rest of your season!