This question arises mainly from looking at 254s 2016 code. Within the code, 254 uses a path they have generated, and calculates each wheel speed and sends it to the wheel in order to reach each way point.
I am curious about the methodology behind this, as it differs from the CTRE code already existing, which entails setting the talon SRX to Motion Profile Mode. In Motion Profile Mode each point of the Motion Profile is buffered, with a maximum of 128 points. After buffering, the points are then executed one by one until the path is complete.
I would like to know of any teams, such as 254, that run paths without the CTRE code as well as how they do it.
Are you talking about motion planning/execution algorithms? If so there are lots of different ways of dealing with it. Jared Russell, Tom Bottiglieri, and Austin Schuh (From 254 and 971) gave a great talk about it at champs in 2015. A link to the talk can be found here as well as the slides here. In that they describe trajectory generation from waypoints, but since then they have moved to a different algorithm called pure pursuit tracking.
These methods are decently complex to implement although not impossible. Other teams have found success with setting the wheel speed and driving for a certain time or distance and turning until a certain gyro value has been reached (these autos from 2013 were done that way).
343 uses a motion profile for each movement along a path and turns are executed by multiplying the velocity output value of the profile by anything between 1 (both sides move the same speed and thus it moves straight) to -1 (one side runs completely opposite the other so the robot spins on its center) The direction of the turn (right or left) is determined by changing which command, right or left, is multiplied. The biggest pitfall to this method is that you have to do quite a bit of trig to figure out how far you want to the move to be and how much you should multiply by, especially for sweeping turns. Once you have done all that math you will still probably have to spend time tweaking to get it all right.
Do watch the presentation linked above, it will give you some good ideas, even if you have implemented motion profiling in the past.
4256 is trying to use 2 functions, X(t) and Y(x), which can be piecewise with respect to time, to get the desired field position. Visual odometry from a ZED camera can then be used with PID to match actual position to desired (swerve makes this easier). While this differs from the pre-planned motion profiling discussed above, it is a method of path following
We have yet to use it in any competition, but here is a two dimensional motion profile generator I created. Beware this is not the latest version and may be riddled with bugs.
Basically you input four things into the program: any amount of control points, an array containing the velocities of a robot at any given speed (arr[0] = speed given a motor controller value of 0.0, arr[1] = speed given a motor controller value of 0.1, etc.), a similar array for rotational velocities, and lastly a total desired time for spline completion*. From there, the program creates an Nth degree Bezier Spline representing position (degree is dictated by number), calculates the linear velocity at every given point, and rotational velocity at every given point. After converting these speeds into motor controller values from -1 to 1 with the inputted arrays, a huge array lookup table is created with all calculated values. From there I pass in the calculated values into the WPI arcade drive.
The whole program is open loop, there is no feedback implemented, however testing with basic splines has shown it to be incredibly accurate without feedback. I’m sure this program is filled with poor practices but it does the job so I’m fine with it.
Inspiration for this came from 254s code and motion presentations, and the methodology is all based on the properties of Bezier splines. I would love any advice or feedback on how I could make this program better if anyone has any.
*The spline exists from a domain of [0,1], so I simply figure out how many times the array needs to be called in the given desired time, and calculate the values for those points.