The Secret Book of FRC LabVIEW


#21

Here it is! What you have all been waiting for!! (Or not.) The latest revision to the Secret Book, covering the 2014 Framework, reentrant VIs, and how to actually use a PID in your robot.

As always, I welcome corrections, but also suggestions for new topics, or places where I have not explained things as clearly as I should have…

Cheers to all!
-GN

The Secret Book of LabVIEW v1.0.pdf (4.41 MB)


The Secret Book of LabVIEW v1.0.pdf (4.41 MB)


#22

Thanks for this AWESOME resource!

If you’re still taking small edits, there’s a small typo on page 123 (of book, not PDF).

In the “Loop 2” paragraph, last sentence: “We’ll discuss the stuff you can see first, and then spend some time on the
Dashboard **JMPG **VI, because in 2014 this has become a pretty sophisticated routine.”

Isn’t that supposed to be MJPG?

Love this book and I’m making all of my programmers read through it.

Thanks again!


#23

Holy Moose stuffing Batman!:smiley:
I can really use this for our students. Nice work. Hope you can find the time and motivation to keep it up to date.


#24

Can’t wait to start reading. On a side note, that’s a very nice random image you have there. I like it.


#25

If I am not a programmer, and I like to use LV with EV3 because it is easy to bulid and work with.
How I can began my tranining


#26

First off, thank you for the book. This is our first year using LabView and it has helped us greatly. Our two primary software mentors have never used LabView before, and this book was their primary source for teaching it to the kids. I have used LabView a little bit in the past, but mostly for instrumentation control and display, never for anything complicated.

I’m trying to run through your vision example before I try and teach it to my kids. I have successfully made the distance calculations work based on the target heights, but the angle calculations are not working. I believe my problem is the blob sizes and locations are incorrect due to looking at them from an angle. This is making my calculation of the separation in x in pixels wrong, which throws everything else off. I have spent three days trying to hunt down the problem, but I’m out of ideas.

Has anyone actually earned their Image Processing Zen Master merit badge? If so, I could use some tips.


#27

The distance calculation in the example uses the width of the blob as a proportion of the image size. If you scroll down on the diagram, it has some pictures and formulae to show what it is doing. By the way, this estimator works better for some field positions than for others. It is also possible to use the height of the blob, the area of the blob, or use tools like the clamps to measure things more precisely than the bounding box.

Tutorial 8 in the Getting Started also discusses this a bit, but I don’t remember how much detail it goes into.

If you have other questions, I am happy to help.
Greg McKaskle


#28

Without knowing exactly what you are doing… In general, the apparent size of things will be wrong, depending on where they are in the image, how your camera is pointing, etc. Suppose your camera is pointing straight at a wall a distance d away, and there is a target of height h (height in pixels hp) positioned exactly where the camera is pointing. Then that target will subtend an angle tan(theta) = h/d.

But now, if the same target is high up on the wall, it will span fewer pixels. If the line from the camera to the center of the target makes an angle phi to the horizontal, then the target will appear to be only cos(phi)*hp pixels tall. This is an approximation, because the target is also farther away, but depending on the details, that may be good enough. If you are close in, then the difference will be larger and you will have to apply Pythagoras.

Hope that helps…


#29

I recently discovered some of our students were using this as a resource for self teaching in the offseason!

I have been going through it and recommend it to all looking for a good learning tool - very comprehensive - not just the basics.
This augments the nice NI tutorials incuded with Labview.
Best Labview resource I have seen since FRC Mastery .

Bumping now as maybe folks are thinking about training for the Fall.

Be nice if their was an update for the RoboRio, and maybe add new SRX CAN functionality.


#30

Far be it from me to put something like this on someone’s plate, but maybe a couple of knowledgeable people could go through it and suggest/add some revisions to bring it up to date, with Geoff’s permission?

I’ve been out of the programming loop the past couple of years, but agree it’s a great resource. I’ve been recommending it myself for some time. With some updates for newer hardware that’s become available and newer versions of LabVIEW, it would continue to be a valuable tool.


#31

I recently quit my job in industrial research and am now a brand new high school science teacher. While I am definitely having fun, I also have my hands completely full. (Also, the school’s robotics team does Vex, so I have some other new stuff to learn.)

So…if there is someone out there who wants to take on an update of the Secret Book, I’m all for it. A student asked to do it last year, but nothing came of it. I suspect they had a robot to build, colleges to apply to, etc.

Please PM me if you think you are the person to whom the mantle should be passed…

-GN


#32

I loved the book so much i volunteered to update it for RoboRio, now that build season is wrapped up I hope to get that finished and publish an update soon… (it is now competition season, so i’m sure i’m over estimating my free time)


#33

I look forward to the RoboRio version! thanks for volunteering!


#34

As a second year coach, I can only express my sincere gratitude to the author of SBOL. It was (and continues to be) a huge help to my programmers. Between that and Bradley K (Mentor from 1756 Argos) we have survived two full seasons of FRC. And survived quite well I might add! Thanks to anyone who updates that baby!


#35

Thank you very much Geoff, this book is of great help !!
Greetings from Mexico


#36

Thank you so much for this resource. As someone who enjoys the metophoric approach labview takes to programming, I taught myself how to use it for my team’s rookie year. This resource is amazing.

For those of you who are starting out, here are a few resources that helped me out, and in conjunction with this book could be all you need.

  1. When I began, since I abhor the hello world cliche, I found a tutorial on how to make a farenheight to Celsius conversion slider program. This taught me a bit of logic and how to navigate the multiple windows.
    https://youtu.be/Yz3Rs2gDZMg
    It has helped the students learn too because it is easy to do in a sitting. It also allows you the opportunity to troubleshoot logic.

  2. Here is WPIs discussion of the change in code for the new Rio.
    http://wpilib.screenstepslive.com/s/4485/m/13811/l/292165-labview-porting-guide-2014-to-2015

  3. Here is a thread for help implementing Talon CAN control in Labview.
    https://www.chiefdelphi.com/forums/showthread.php?p=1710099#post1710099note

  4. While I do not want to post a link as it is contrary to the OP’s instructional style, if you are lost and are stuck and do not have time to find the answer to a specific problem, there is an FRC team that posts a lot of helpful labview pngs on their site (almost every basic skills you would need). Pm me if you would like help finding them.

If anyone needs more help, let me know. I am curating these resources to help my students learn programming.

Thank you again for posting this invaluable resource.
Mr. R^2