|
Motion Profiling VI
To keep myself awake during class I made a VI that calculates motion profiles given a distance to travel, initial and final velocities, and max allowed velocity and acceleration. You can specify a timestep, or you can let it auto-calculate the timestep for maximum resolution on the graphs. If you want to see the derivation of the math behind it, send me a PM (it's just a lot of long algebra expressions).
The loop is used to create the graph and tables. If you wanted to use this on a robot, you could get rid of the loop, graphs, tables, and timestep inputs/outputs. Just get the three time value outputs and switch states (accelerating, coasting, decelerating) when that much time has elapsed.
Let me know if you have any questions or find any problems with it.
__________________
2017-present: Mentor FRC 5987
2017-present: CSA for FIRST in Israel
2012-2016: Member FRC 423
2013: Programmer
2014: Head Programmer, Wiring
2015: Head Programmer, Wiring
2016: Captain, Head Programmer, Wiring, Manipulator, Chassis, CAD, Business, Outreach (basically everything)

|