LabVIEW Trajectory Library (WPILib port) V1.3

I hope everyone is healthy or recovering.

Here is a link to version 1.3 of the LabVIEW trajectory library I’ve been working on. It is a native port of the WPILIB routines available for Java/C++. While I’ve done a lot of testing of most of the routines, consider this beta quality software (at best).

https://drive.google.com/open?id=14KZICKT-SQjeS49M0bDEz_fxdLbrXlEP

This is a link to zip file. This file contains two files:
image

Earlier versions of this library are described here… (Please accept my apologies for making this a new post if I should have just continued the old one.) LabVIEW trajectory library

The NI package file contains the library and executable programs. Install this first. This installs the library as a third party WPILIB library, and installs menus for functions and typedefs.

There are also 4 executable utility programs for creating or converting trajectories. These are installed as executable programs. (The source for these is also included in the other zip file.)

image

The second file contains LabVIEW projects for the utility programs, 4 sample robot programs, and dashboard. The robot programs will run on a simulated robot on a PC. They could also run on a real robot if modified to match your robot’s hardware. Unzip this file in a new directory someplace.

Each of the VI and TypeDefs has a simple help description that can be accessed with Ctrl-H. Since this is a WPILIB port, that documentation can also be useful.

image

Here is a quick list of what has been implemented.

I’ll put a more detailed list on the share with the install files. (This file missed making it to the package…)

Consider this beta software. I’ve only been able to test the robot code on simulated robots. The swerve and mecanum kinematics, odometry, and trajectory constaints have not been completely tested. (I think there is a bug in the mecanum trajectory constraint, but I didn’t take the time to look for it yet!). If you find something, have a suggestion, corrected routine, or whatever direct message me.

In case people still wanted to use Jacis PathFinder to create trajectories, that library is also installed as part of the package. It isn’t used by any of the native library other the routines that convert PathFinder data to native data for this library.

Some future things I’ve considered for this are:

  • testing, testing, testing…
  • I haven’t tried this on 64 bit windows yet… (Especially the install package…)
  • put it on github…
  • sample robots for mecanum and swerve drive (I don’t have experience with that. If someone wants to share that would be great.)

If you get to try this, please let us know about your experience.

Happy Roboting…

3 Likes

Thank you for doing this. I have some very young programmers (7th & 8th graders) and I am hopeful that this will help them out on the path planning with serve drive. We will definitely keep you updated with any problems and/or successes we have with your project.

This is the motivation my team needed to get back to work, after the suspension of our season.

@BCR-Jim Your welcome. A couple of the mentors from the team I help have been helping a rookie team near us. They have a lot of younger programmers without any prior programming experience. It was a joy to teach them LabVIEW and watch them create an entire robot program for the first time. I thought all the languages should have the same tools. (Since our season was cut short it has given me something to do…)

Anyway I started to create some graphics for tutorials and such. Here is the first one.

1 Like

I posted a 5th sample robot. This one uses a swerve drive and is driveable on a simulated field. Use the same link to get to this one. This one has a separate zip file.

image

On an xbox controller : left Y axes = forward/backward, right X axes = left/right, right trigger = rotate orientation clockwise, left trigger = rotate orientation counter clockwise, A = execute trajectory.

Like the other simulations, start the driver station and dashboard before starting the simulated robot. Unlike the other simulations, don’t start “robot main”. Instead start “simulate-robot”
image

The FRC Simulation Viewer starts. Ignore this screen as the robot doesn’t use the correct simulated motors (for a tank robot). Only use the main simulate-robot screen.

The swerve control is fairly simplistic as is the simulation. I didn’t spend much time trying to tune the proportional only swerve module position control.

Amyway, I hope everyone is doing well and hope this might give some of you a chance to play with a simulated swerve robot.

Happy roboting…

1 Like

Hey Jim - I’m running into some missing files on example 5. I downloaded it (and just sample 5) and some of the files aren’t found.

POSE2D.ctl
ChassisSpeeds_New.vi

and many others.

======================================
Solved.

Doh! You have to install your libraries first, and it wasn’t installing correctly because I didn’t have the 3/10/20 update for package manager. Got it working now.

Thank you @Tom_Line Can you give us a little more information on the installation. Did the library install fail completely? Did it say – you need an updated package manager?? (I’ll try and find a computer here without the patch and rebuild the install files, but that might take a couple of days.)

The package manager opened then closed immediately. I made the mistake of assuming it installed the library and moved forward. Later I tried to reinstall the library when the problem appeared and it gave me the message to upgrade the package manager version. I don’t think it has anything to do with your library, we tried it on two other machines and it worked without a problem.

I was able to re-build the NI package on another machine without the NI Package Manager update patch. I copied this to the shared (linked above). It is V1.3A. One zip file with the NI Package and a zip file with all samples and utilities. Please let me know if you have any issues this this. Thanks.

A question about filenames was asked in an older thread. Here is a link to my reply. LabVIEW trajectory library