Sunday, December 31, 2017

Icons for LabVIEW

I’ve attached a 32 x 32 grid that you can use to design icons for our new VI’s.  Be creative, and come up with a good theme that can be carried through all of our custom code this year.


In other news, there is yet another release of the CTRE drivers (v. 5.0.9.0).  The FIRST beta test has run out of it’s forum software licensing, so it may be unlikely to contribute more to the process.  At this point, we have made positive contributions to the beta in improvements and changes to software that will benefit every team.  From here out, we will have to be more public on Chief Delphi and other FIRST-specific online communities.  We are in a good position to do this.

-- Len

Sunday, December 24, 2017

Wow, look at that!

Hi Team!

I sent out the Python codes for challenge 7 a little over a week ago.  Well, I only got one attempt to improve code, but it was a good one!

Greg honed his code, and it is now a full second faster than my code (when run on the same hardware/environment).  This is now what the performance chart looks like:

PastedGraphic-1.png

When asked what made his so much better, Greg responded:

"The thing that made my code twice as fast was not trying any even numbers because even numbers divided by 2 will result in another even number until it reaches 1. For example 8 dived by 2 is 4 that divided by 2 is 2 and 2 dived by 2 is 1.

another thing that significantly sped up my program was using integer division rather than floating point division. Integer division also known as floor division returns an integer rather than a float so the program has to do less work divining floating point numbers and it therefor goes faster. "

I’m going to hold off on the next challenge until after we complete the various VI’s that will be needed for our custom holonomic drive.

— Len


Polishing the Holonomic Code for Public Release

The 2018 beta period has not technically finished up yet, and we still have some work to finish before the end of calendar 2017.  For everyone new to how FIRST treats team-written software, you cannot use any code that was made prior to the new game kickoff, unless it has very publicly released to every other team.  We would like to use what we discovered in the beta, and the best way to do this is to make new code that other teams can use.

The big discovery we had is that CTRE’s massive re-write of all of their software has MAJOR repercussions for all teams like ours that use encoders and closed-loop feedback.  This is a huge problem for the holonomic drives that we have been using, and are currently building to write new white papers for public release.

I would like to have a new custom Holonomic drive VI, ready to release to everyone by December 31, 2017.  This will allow us to use this new code for everything.  The following is what I am proposing:

Team 585 Custom Holonomic Top Level.png

For now, this new custom holonomic code will only work as a robot-specific drive (not looking at field centric at this time).  The additions, when compared to the WPI holonomic are the mode switch, which can deal with closed-loop speed mode.  Unfortunately, WPI won’t work like this now, so this is the major reason for this code.  

The other big difference is the bottom left bubble, “Drive Configuration”.  This is essentially a way for us to specify what the drive is with each wheel getting a perpendicular axis, wheel type (omni or mecanum), and wheel size.  This would give us a hybrid holonomic for dummies configuration.  One other thing to notice is that the drive configuration will define the number of driven wheels, and the address for each.  This gives us flexible n-way holonomic drive.  3, 4, 5, 6 or more motors can be configured and driven.

Internally, the functions break down like this:

Team 585 Custom Holonomic Functional.png

There are more sub-VI’s that will be necessary.  I just wanted to give the next-level-down conceptual version of what we need to do.  If there is a part that you want to work on, let me know.  We can break a bunch of these down into much simpler chunks that are more approachable.  We have a week to make this work.

Thursday, December 14, 2017

Results for Python submissions for Collatz Series

Hi Team!

Tonight I am sharing the results for the Python entries for the coding challenge.  I have not had time to go through them to write a critique on what each one does well or needs to improve on.  Instead, I’d like to see two different things happen.

First, look at the code.  See if you can identify the things that make any of the programs run faster or slower than the other codes.  There is a reason why the fastest code ran almost two and a half times faster than the second fastest, and the second fastest 20% faster than the third. Why?

The second thing I’d like to see, is if you can take any of these and make them run faster than the current fastest code.  As we saw last week, we had a program that ran and got the answer in three hours and fifteen minutes, but with a few minor tweaks, it ran in just over five-seconds and got the same correct result.  Optimizing your code is like getting a massive upgrade for your computer.  It is an essential skill that we all need.

Without further delay, here’s the comparison of running times for all of the Python programs:

PastedGraphic-1.png





Sunday, December 10, 2017

Deadline for the Collatz Series program is approaching!

I know that many of you are working on the Collatz series programming challenge.  I know of two that are in progress, and a third that has been submitted.  There is just over two hours to get an entry in.

Even if you don’t get a completed program done, submit what you have.  The one entry that I have gotten so far has gotten the correct answer (but not the correct count).

There is a lot of computation in this problem.  If your program is taking more than ~5 minutes, you probably have a bug where you aren’t hitting an end condition for one of your loops.  Use a print() statement to help debug what is or is not working.

— Len

Thursday, December 7, 2017

A New Programming Challenge!

The following iterative sequence is defined for the set of positive integers:

n → n/2 (n is even)
n → 3n + 1 (n is odd)

Using the rule above and starting with 13, we generate the following sequence:

13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1

It can be seen that this sequence (starting at 13 and finishing at 1) contains 10 terms. Although it has not been proved yet (Collatz Problem), it is thought that all starting numbers finish at 1.

Which starting number, under one million, produces the longest chain?
NOTE: Once the chain starts the terms are allowed to go above one million.

Entries are due by 11:59 p.m. on Sunday, December 10.

— Len