I realize it is late in the season for something new, but…
Here is a link to a LabVIEW library, sample robot projects, and utility programs that implement the FRC WPILIB ramsete, spline, trajectory, and associated routines in LabVIEW. While the library, utilities, and robot projects have been tested, this should be considered “beta” software.
The following are included:
Utility programs to create trajectories. There are two utility programs. One uses Jaci’s pathfinder library. The other uses the Trajectory library. Both of these programs show the results graphically for review, then allow the trajectory to be written to a text file. The file can then be read by a robot program for use. Here are some screen shots of the utility programs. The utility programs can be built into executable files for execution on windows computers without LabVIEW installed.
The trajectory library. This library implements most, but not all, of the FRC WPILIB routines to create and use trajectories. Currently the library is only implemented for differential drive robots (tank and arcade drive). Swerve and mechanum drives are not yet implemented. The differential drive motor voltage constaint is not implemented. The ramsete controller is implemented to set left and right drive speed demands based on the trajectory.
Sample Robot project 1. This contains both a simulated and real robot. The robot code creates a trajectory as part of the BEGIN routine. The trajectory can then be executed in TELEOP by pressing the “A” button on an xbox style controller, or equivalent button on any controller.
Sample Robot project 2. This contains both a simulated and real robot. The robot code reads a trajectory from a file as part of the BEGIN routine. The trajectory can then be executed in TELEOP by pressing the “A” button on an xbox style controller, or equivalent button on any controller. For the simulated robot, the .CSV file needs to be copied to the “\Documents\LabVIEW Data” directory before running the simulated robot. Likewise on a real robot, the file needs to be copied to the roboRIO prior to execution. See the subVI that reads the file
to get the default directory.
Here is a link the zip file with these projects.
The VI documentation is incomplete, but the routines closely follow the C++/Java implementation.
Please let me know if you find any errors or issues, or if you find this useful…
It just seemed like the LabVIEW teams should have the same capabilities as teams using other languages…
Hopefully this will end up in a chapter in the Secret Book of FRC LabVIEW.