tag:blogger.com,1999:blog-73115793060512713802024-03-13T10:15:01.058-07:00FIRST Team 585 Programming BlogThe official blog for the Programming Group of FIRST Robotics Team 585 from Tehachapi, CA.FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-7311579306051271380.post-48911723846555581302018-01-10T21:15:00.000-08:002018-01-10T21:15:14.138-08:00LabVIEW Webcast Tomorrow Night!<span style="font-family: Helvetica; font-size: 12px;">Hi Team!</span><br />
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Tomorrow night (1/11/2018), there will be a LabVIEW Command and Control webcast on Twitch.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Details can be found on <a class="" href="https://www.chiefdelphi.com/forums/showthread.php?t=161242">this Chief Delphi Post</a>. The webcast starts at 5:30 p.m., and National Instruments will be giving a roboRIO away to one live viewer who is in the chat. They say they will also be having prizes from AndyMark for answering trivia questions.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
For those of you who don’t know, National Instruments is one of our sponsors. AndyMark makes and sells a lot of components for FRC, like the squishy wheels.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
— Len</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
P.S. the beta versions of LabVIEW will not work for the actual season. I posted the new LabVIEW software versions <a class="" href="http://firstteam585.org:6969/">at the team’s BitTorrent tracker</a>. Unfortunately, the tracker cannot be accessed from the school network, but it should work for everyone at home (with a BitTorrent client).</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqKz6ktknmyUSkNfdiRRNqAXb-7MOFXrCKlGm0F4rNnn5FLAS_WsHGfBVp6s6hnu8Qf2qAUXAp6LcnrtEmk3e7-qe57gs_8hVNb8au99QgeNwQ_jE6Ez7PfDSWP79_cC1E-YEqdXygXk4/s1600/Screen+Shot+2018-01-10+at+6.39.08+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="417" data-original-width="592" height="449" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqKz6ktknmyUSkNfdiRRNqAXb-7MOFXrCKlGm0F4rNnn5FLAS_WsHGfBVp6s6hnu8Qf2qAUXAp6LcnrtEmk3e7-qe57gs_8hVNb8au99QgeNwQ_jE6Ez7PfDSWP79_cC1E-YEqdXygXk4/s640/Screen+Shot+2018-01-10+at+6.39.08+PM.png" width="640" /></a></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-2665784299494859642017-12-31T23:00:00.000-08:002018-01-07T13:37:32.819-08:00Icons for LabVIEW<span style="font-family: Helvetica; font-size: 12px;">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.</span><br />
<span style="font-family: Helvetica; font-size: 12px;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdGxjt-AX9jdq1u59hv_1v-QcD7_1CxXiXIHqZLr9FgmM1PnFAsi0oeiFv9TyDKUhG_ttRjvPoSJZqMsNSVejISiOoelW5-iTIQ8TokgsBHY50u-w6hooDHEBdOxdyFc-UpflluorCC7s/s1600/Icon_32.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1600" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdGxjt-AX9jdq1u59hv_1v-QcD7_1CxXiXIHqZLr9FgmM1PnFAsi0oeiFv9TyDKUhG_ttRjvPoSJZqMsNSVejISiOoelW5-iTIQ8TokgsBHY50u-w6hooDHEBdOxdyFc-UpflluorCC7s/s320/Icon_32.png" width="320" /></a></div>
<span style="font-family: Helvetica; font-size: 12px;"><br /></span>
<span style="font-family: Helvetica; font-size: 12px;">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.</span><br />
<span style="font-family: Helvetica; font-size: 12px;"><br /></span>
<span style="font-family: Helvetica; font-size: 12px;">-- Len</span>FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-67407433161268590902017-12-24T16:22:00.000-08:002018-01-07T14:13:48.371-08:00Wow, look at that!<span style="font-family: Helvetica; font-size: 12px;">Hi Team!</span><br />
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
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!</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
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:</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<img alt="PastedGraphic-1.png" apple-inline="yes" class="Apple-web-attachment" id="<04EABC35-0EF3-4613-8EF9-BFE7C6AA4E5F@bak.rr.com>" src="cid:04EABC35-0EF3-4613-8EF9-BFE7C6AA4E5F@bak.rr.com" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
When asked what made his so much better, Greg responded:</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<i>"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.</i></div>
<div style="font-family: Helvetica; font-size: 12px;">
<i><br /></i></div>
<div style="font-family: Helvetica; font-size: 12px;">
<i>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></div>
<div style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div style="font-family: Helvetica; font-size: 12px;">
<div class="">
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.</div>
<div class="">
<br class="" /></div>
<div class="">
— Len</div>
<div class="">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZIEb6zCIjlwzjwCmSBG1sSXt0OVqKkmb-gyfV1bU5N-fCQj_3lvDMpLVXGW7gbViomXH2wVnrKpBdVrOhR7OOe1EXwZEAqEkWZhvslWakRR43sDjB_K57yh5X_8FB5fPWIvDfP0b0Mpc/s1600/Screen+Shot+2018-01-07+at+2.12.04+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="852" data-original-width="701" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZIEb6zCIjlwzjwCmSBG1sSXt0OVqKkmb-gyfV1bU5N-fCQj_3lvDMpLVXGW7gbViomXH2wVnrKpBdVrOhR7OOe1EXwZEAqEkWZhvslWakRR43sDjB_K57yh5X_8FB5fPWIvDfP0b0Mpc/s640/Screen+Shot+2018-01-07+at+2.12.04+PM.png" width="526" /></a></div>
<div class="">
<br /></div>
</div>
FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-48698829888705210292017-12-24T14:42:00.000-08:002018-01-07T13:44:08.992-08:00Polishing the Holonomic Code for Public Release<div class="" style="font-family: Helvetica; font-size: 12px;">
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.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
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.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
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:</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<img alt="Team 585 Custom Holonomic Top Level.png" apple-inline="yes" class="Apple-web-attachment Singleton Apple-edge-to-edge-visual-media" height="257" id="<238D221E-90B2-41E0-8D8A-13F5C1B17B55@bak.rr.com>" src="cid:238D221E-90B2-41E0-8D8A-13F5C1B17B55@bak.rr.com" width="640" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<div class="">
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. </div>
<div class="">
<br class="" /></div>
<div class="">
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.</div>
<div class="">
<br class="" /></div>
<div class="">
Internally, the functions break down like this:</div>
<div class="">
<br /></div>
<div class="">
<img alt="Team 585 Custom Holonomic Functional.png" apple-inline="yes" class="Apple-web-attachment Singleton Apple-edge-to-edge-visual-media" height="213" id="<43FBAC77-F1BC-4D6C-8210-3D985FEA447C@bak.rr.com>" src="cid:43FBAC77-F1BC-4D6C-8210-3D985FEA447C@bak.rr.com" width="640" /></div>
<div class="">
<br /></div>
<div class="">
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.</div>
</div>
FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-62086823919962848082017-12-14T23:46:00.000-08:002018-01-07T14:10:23.039-08:00Results for Python submissions for Collatz Series<span style="font-family: Helvetica; font-size: 12px;">Hi Team!</span><br style="font-family: Helvetica; font-size: 12px;" /><br style="font-family: Helvetica; font-size: 12px;" /><span style="font-family: Helvetica; font-size: 12px;">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.</span><br style="font-family: Helvetica; font-size: 12px;" /><br style="font-family: Helvetica; font-size: 12px;" /><span style="font-family: Helvetica; font-size: 12px;">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?</span><br style="font-family: Helvetica; font-size: 12px;" /><br style="font-family: Helvetica; font-size: 12px;" /><span style="font-family: Helvetica; font-size: 12px;">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.</span><br style="font-family: Helvetica; font-size: 12px;" /><br style="font-family: Helvetica; font-size: 12px;" /><span style="font-family: Helvetica; font-size: 12px;">Without further delay, here’s the comparison of running times for all of the Python programs:</span><br style="font-family: Helvetica; font-size: 12px;" /><br style="font-family: Helvetica; font-size: 12px;" /><img alt="PastedGraphic-1.png" class="Apple-web-attachment Singleton" id="<0C049824-AC34-4FB7-A213-63D449B26F64@bak.rr.com>" src="cid:0C049824-AC34-4FB7-A213-63D449B26F64@bak.rr.com" style="font-family: Helvetica; font-size: 12px;" type="application/x-apple-msg-attachment" /><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT8yB77ZQ38zO1Om1j0ecGI5vPHvp5DNaZpAkAOkmKmofV367ZDTXG2gY4vzX9y_UPK9wZVqOGjpVEyc0qhZZBq6x0CXBBLtqOFTLNzJUQxc3ZSrSisTaTg20KRa4TUmg0qImz8zYEDc4/s1600/Screen+Shot+2018-01-07+at+2.06.51+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="483" data-original-width="582" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT8yB77ZQ38zO1Om1j0ecGI5vPHvp5DNaZpAkAOkmKmofV367ZDTXG2gY4vzX9y_UPK9wZVqOGjpVEyc0qhZZBq6x0CXBBLtqOFTLNzJUQxc3ZSrSisTaTg20KRa4TUmg0qImz8zYEDc4/s320/Screen+Shot+2018-01-07+at+2.06.51+PM.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJiiWf-lVY7SkSCxnnQDa8lDtTrDp4G1Aj2NBGuDD8w7Zqoytntl68VNTYFiZGTNCrQ9tgoh5kxUgWemeLbFiZJTsJTH6YZUleNmDhDtooGABbk1d6v9fbEpKJGF9ZF6CwLN3BNQzKl6w/s1600/Screen+Shot+2018-01-07+at+2.07.16+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="511" data-original-width="371" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJiiWf-lVY7SkSCxnnQDa8lDtTrDp4G1Aj2NBGuDD8w7Zqoytntl68VNTYFiZGTNCrQ9tgoh5kxUgWemeLbFiZJTsJTH6YZUleNmDhDtooGABbk1d6v9fbEpKJGF9ZF6CwLN3BNQzKl6w/s320/Screen+Shot+2018-01-07+at+2.07.16+PM.png" width="232" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh3ujf8luK9CwrEYES4xmI_fJnr9z3mdoGTelZ_3p85AXI5Phskn0VwMaDxAGMPrQIDWXuKCa7xZOTfVMVhwYzEBjWTCHOgPJL3Oimu8TrQDEh3IP-5z1nKqnZUcLDBtCV57y2fH70F5c/s1600/Screen+Shot+2018-01-07+at+2.07.31+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="423" data-original-width="563" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh3ujf8luK9CwrEYES4xmI_fJnr9z3mdoGTelZ_3p85AXI5Phskn0VwMaDxAGMPrQIDWXuKCa7xZOTfVMVhwYzEBjWTCHOgPJL3Oimu8TrQDEh3IP-5z1nKqnZUcLDBtCV57y2fH70F5c/s320/Screen+Shot+2018-01-07+at+2.07.31+PM.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3lb-2KoMDrZca3b32dU9ZPu4TQdUU5s-8sbFU3ja50F44eR41LMFQ4uvoEalfjv5xsMF5gw0Yb_Ae4kMf16UscOWvtyKU2XNWu769Gaf1F_47TiDCcm0dY6LxKAJmZqpvW7__G8bkjV8/s1600/Screen+Shot+2018-01-07+at+2.08.16+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="845" data-original-width="395" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3lb-2KoMDrZca3b32dU9ZPu4TQdUU5s-8sbFU3ja50F44eR41LMFQ4uvoEalfjv5xsMF5gw0Yb_Ae4kMf16UscOWvtyKU2XNWu769Gaf1F_47TiDCcm0dY6LxKAJmZqpvW7__G8bkjV8/s640/Screen+Shot+2018-01-07+at+2.08.16+PM.png" width="297" /></a></div>
<br />FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-22836452031109113592017-12-10T21:58:00.000-08:002018-01-07T14:04:58.612-08:00Deadline for the Collatz Series program is approaching!<span style="font-family: Helvetica; font-size: 12px;">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.</span><br style="font-family: Helvetica; font-size: 12px;" /><br style="font-family: Helvetica; font-size: 12px;" /><span style="font-family: Helvetica; font-size: 12px;">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).</span><br style="font-family: Helvetica; font-size: 12px;" /><br style="font-family: Helvetica; font-size: 12px;" /><span style="font-family: Helvetica; font-size: 12px;">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.</span><br style="font-family: Helvetica; font-size: 12px;" /><br style="font-family: Helvetica; font-size: 12px;" /><span style="font-family: Helvetica; font-size: 12px;">— Len</span>FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-7698068623325991152017-12-07T23:32:00.000-08:002018-01-07T14:03:57.999-08:00A New Programming Challenge!<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px;">
The following iterative sequence is defined for the set of positive integers:</div>
<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px;">
<br /></div>
<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px; margin-left: 50px;">
<var class="" style="font-family: "times new roman"; font-size: 19.00800132751465px;">n</var> → <var class="" style="font-family: "times new roman"; font-size: 19.00800132751465px;">n</var>/2 (<var class="" style="font-family: "times new roman"; font-size: 19.00800132751465px;">n</var> is even)<br class="" /><var class="" style="font-family: "times new roman"; font-size: 19.00800132751465px;">n</var> → 3<var class="" style="font-family: "times new roman"; font-size: 19.00800132751465px;">n</var> + 1 (<var class="" style="font-family: "times new roman"; font-size: 19.00800132751465px;">n</var> is odd)</div>
<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px; margin-left: 50px;">
<br /></div>
<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px;">
Using the rule above and starting with 13, we generate the following sequence:</div>
<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px;">
<br /></div>
<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px; text-align: center;">
13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1</div>
<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px; text-align: center;">
<br /></div>
<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px;">
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.</div>
<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px;">
<br /></div>
<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px;">
Which starting number, under one million, produces the longest chain?</div>
<div class="note" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 14.255999565124512px;">
<b class="">NOTE:</b> Once the chain starts the terms are allowed to go above one million.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Entries are due by 11:59 p.m. on Sunday, December 10.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
— Len</div>
FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-9154880256382828992017-11-22T20:34:00.000-08:002018-01-07T14:02:14.446-08:00Programming Contest for Thanksgiving Break!<div class="" style="font-family: Helvetica; font-size: 12px;">
As always, I encourage everyone in the programming group to look at and code an entry for our existing contests. Right now, however, I am giving a new one that isn’t posted on the programming challenge page of our website.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
So without further delay, here is the contest problem:</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<blockquote class="" style="border: none; font-family: Helvetica; font-size: 12px; margin: 0px 0px 0px 40px; padding: 0px;">
<div class="">
<span class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px;"><b class="">The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.</b></span></div>
<div class="" style="background-color: white; font-family: "Trebuchet MS", sans-serif; font-size: 15.84000015258789px;">
<b class="">Find the sum of all the primes below one million.</b></div>
</blockquote>
<br />
<div class="" style="font-family: Helvetica; font-size: 12px;">
As with the other contests, you can submit an entry using LabVIEW, Python, or both. Evaluation will be on accuracy, speed, and code documentation (comments).</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<span style="font-family: Helvetica; font-size: 12px;">I don’t like to give hints upfront, but if you look at the existing contests, there is one that deals with prime numbers, that may be helpful. Further, the commentary surrounding the prior contest solutions may be just as important as the actual code, in gaining insight.</span><br />
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Entries are due by 11:59 p.m. PST on Sunday, November 26, 2018.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Good luck!</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
— Len</div>
FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-61758374824287532772017-11-22T20:17:00.000-08:002018-01-07T13:58:46.349-08:00Updates, Updates, and more Updates!<div class="" style="font-family: Helvetica; font-size: 12px;">
We had a very productive afternoon meeting last Friday! We were able to get the following done:</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<ol class="">
<li class="">Shake out Moldy’s wiring. We corrected three different wiring faults.</li>
<li class="">Test the flashing of the robot radio with the newly released beta firmware.</li>
<li class="">Test a new release of the roboRIO flashing utility that included specific changes that we requested (we are making a difference for every team!</li>
<li class="">Tested migrating our existing 2017 code to the new system. There is still pain here, but we found new pain points.</li>
</ol>
</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Unfortunately, #4 kept us from actually getting Moldy to a running state. We had hoped for a release of new libraries to fix that problem by last Friday, but that software has not arrived yet.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Speaking of software, I now have version 2.0 of our Python / OpenCV VM and the FIRST Beta software hosted on our server, with no public links. These links will get you the entire new stack of our software.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<u class=""><b class="">Python / OpenCV</b></u></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<ul class="MailOutline">
<li class="">Download VirtualBox at <a class="" href="http://virtualbox.org/">Virtualbox.org</a> to get the latest version and the extension image. </li>
<li class="">Download our new VM image <a class="" href="http://firstteam585.org/big_files/Team_585_Vision_2.0.ova">here</a>.</li>
</ul>
</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<b class=""><u class="">LabVIEW</u></b></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<ul class="MailOutline">
<li class="">Unzip and install the <a class="" href="http://firstteam585.org/big_files/NISoftwareforFRC2018DVD.zip">base LabVIEW Software</a> first. Contact me for the serial number.</li>
<li class="">Unzip and install the <a class="" href="http://firstteam585.org/big_files/NI_BetaUpdate3.0.zip">FIRST update</a>. We are now on the third update of this software. It uses the same serial number.</li>
</ul>
</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Those parts are all you need to get started with learning LabVIEW. To work with team code, we need more…</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<ul class="MailOutline">
<li class="">Unzip and install the <a class="" href="http://firstteam585.org/big_files/CTRE_Phoenix_Framework_v5.0.4.4_FRC-BETA-ONLY.zip">CTRE software</a>. We cannot successfully port our code to this version, but the next version promises to fix our issue.</li>
<li class="">Unzip and install the <a class="" href="http://firstteam585.org/big_files/navx-mxp.zip">NavX software</a>. This version is from last year. It should work, or at least put the software somewhere near where it needs to be to work.</li>
</ul>
</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
The new version of our VM makes some significant changes, so I suggest that you delete any of the version 1.x VM’s you may have installed. This version is significantly smaller in overall size (4.5 GB vs. 10.1 GB). It is based on Ubuntu 16.04 instead of Ubuntu 14.04, and the Python virtual environment uses Python 3.5 instead of 2.7.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
As before, the LabVIEW software requires installation on a Windows machine (real or virtual).</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Now that you have access to software that you can download and install while waiting for a turkey to cook, watch for my next post, which will be for a contest over break.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
— Len<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br /></div>
FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-82990838957080445062017-10-28T06:55:00.001-07:002017-10-28T06:55:08.100-07:00Beta Testing!<span style="font-family: Helvetica; font-size: 12px;">Hi Team!</span><br />
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
FIRST has made public the list of teams doing the Beta Program, and plotted them on a map. We are one of only two teams west of Texas, in the LabVIEW Beta. There are four other teams in California in the program, and all of them are doing C++. Almost all of the beta teams are in the US. The only team in Europe, Africa, or Asia, is in Israel, and they are using LabVIEW. There is one team in Australia, and they are using C++. In the picture, LabVIEW is blue, C++ is red, and Java is yellow.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<a href="https://fusiontables.google.com/DataSource?docid=1506BLAJgVwt5xcnv2A34F_uUIkO2GKRGa-yfYhW5#map:id=3" target="_blank">This link will take you to see the map</a>, and you can click on the tabs to find a table listing of the teams.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
We are now publicly listed as a Beta team, so go ahead and shout it out to the world! </div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
As it says in the FRC Blog (<a href="https://www.firstinspires.org/robotics/frc/blog" target="_blank">which can be found at this link</a>):</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="">
<blockquote class="tr_bq" style="font-family: Helvetica; font-size: 12px;">
Nidec Dynamo BLDC Motor with Controller<br />The new brushless motor/controller combo that a small number of Beta teams will be testing is the Nidec Dynamo BLDC Motor with Controller. This small 12V DC Brushless motor/controller will be legal for the 2018 <em style="box-sizing: border-box;">FIRST</em> POWER UP Season, and will be available in <em style="box-sizing: border-box;">FIRST</em> Choice with additional units being sold by AndyMark.<br />We feel that this low power, integrated motor/controller combo is a great way to introduce brushless technology to FRC and are excited to have Nidec working to bring it to teams this season. Nidec has been working with <em style="box-sizing: border-box;">FIRST</em> to provide a custom cable harness with the motor to make the connection between the controller and the roboRIO as simple for teams as possible. We can’t wait to see what teams will do with this new technology this season!<br /><strong style="box-sizing: border-box;">Note:</strong> Teams will need the 2018 <em style="box-sizing: border-box;">FIRST</em> Robotics Competition software to control this motor correctly, so you will have to wait until Kickoff (and pay close attention to the documentation!) to start playing around with it. Until then, <a href="https://www.firstinspires.org/sites/default/files/uploads/frc/Blog/DM3012-1063-B-data-sheet.pdf" style="box-sizing: border-box; color: #428bca; text-decoration: none;" target="_blank">check out the datasheet here</a> for more details about the electrical and mechanical specs.<br /><strong style="box-sizing: border-box;">Note 2:</strong> Are you unsure about brushless motors? No problem! Since its inception, <em style="box-sizing: border-box;">FIRST</em> Robotics Competition has allowed only brushed motors. However, brushless motors are widely used in many industries! For more information about the difference between the two, <a href="http://www.electronicdesign.com/electromechanical/what-s-difference-between-brush-dc-and-brushless-dc-motors" style="box-sizing: border-box; color: #428bca; text-decoration: none;" target="_blank">check out this link</a>.</blockquote>
<div style="box-sizing: border-box; margin-bottom: 9.5px;">
<span style="font-family: Helvetica;"><span style="font-size: 12px;">Which is really cool and exciting! This is the first time a brushless motor has been used in FRC and we are hoping to be one of the Beta teams to test that technology. While we are waiting to find out if we are, click the links and brush up (hahahahahah) on the technology, because this is a very real option for our 2018 robot and we want to be able to have informed discussions when discussing motor choices in design meetings.</span></span></div>
<div style="box-sizing: border-box; margin-bottom: 9.5px;">
<span style="font-family: Helvetica;"><span style="font-size: 12px;">Today is the Quarter Auction fundraiser for our Junior Robotics program. I hope to see some of you there!</span></span></div>
<div style="box-sizing: border-box; margin-bottom: 9.5px;">
<span style="font-family: Helvetica;"><span style="font-size: 12px;">-- Len</span></span></div>
</div>
FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-3198326969068660582017-10-25T06:56:00.000-07:002017-10-28T06:56:27.752-07:00No Off-Site This Week<span style="font-family: Helvetica; font-size: 12px;">Hi Team!</span><br />
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Sorry for the late notice, but we won’t be holding the Thursday offsite meeting this week. Please spread the word to others, as not everyone is plugged in to their e-mail.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
That doesn’t mean that there is nothing to do. I hope that you have been able to poke at 2018 FRC LabVIEW to get more familiar with it. As I mentioned before, you can learn how to use it better by re-doing some of the programs from the <a class="" href="https://firstteam585.org/programming-challenge.html">programming challenges</a>.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
One of the problems we had with the beta software was missing VI’s for the Talons and the NavX. CTRE has <a class="" href="https://usfirst.collab.net/sf/frs/do/viewSummary/projects.frc2018beta/frs">released a new version</a> of their installer package (v. 5.0.4.2) that should install the VI’s in the correct place. There may still be issues due to renaming, but at least the VI’s should now be findable. Kaui Labs has not released a version of their software through the beta program, so their VI’s will have to be installed from their <a class="" href="http://www.kauailabs.com/public_files/navx-mxp/navx-mxp.zip">publicly available package</a>.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Other helpful links:</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<a class="" href="https://sourcetreeapp.com/">Sourctree</a> for handling our git repository</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<a class="" href="http://firstteam585.org:7990/projects/CP">All of our code repositories</a>. E-mail me if you are ready for commit privileges on the server.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
And lastly, please remember that the team’s Quarter Auction fund raiser is this weekend. Mrs. E. has some exciting news that she has to tell all of you about in person.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
— Len</div>
FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-87958729793098584942017-09-27T22:29:00.002-07:002017-09-27T22:29:16.792-07:00No Thursday Offsite This WeekWe won't be holding a Thursday off-site meeting for programming this week. Instead, we will be having a LabVIEW party at the robotics room on Saturday from 9:00-2:00. Bring your laptop if you have one, as a limited number of team laptops will be available.<div>
<div>
<div>
<br /></div>
<div>
-- Len<br /><div>
<div>
<div>
<br /></div>
</div>
</div>
</div>
</div>
</div>
Mr. Ehttp://www.blogger.com/profile/09034353479134097628noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-67990847261859120382017-09-27T22:19:00.003-07:002017-09-27T22:29:42.091-07:002018 Control System Beta<h3>
Congratulations Team!</h3>
<br />
<a href="https://www.firstinspires.org/sites/default/files/uploads/resource_library/brand/FIRST_Vertical_RGB.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="601" data-original-width="800" height="150" src="https://www.firstinspires.org/sites/default/files/uploads/resource_library/brand/FIRST_Vertical_RGB.jpg" width="200" /></a>We have been selected to participate in the 2018 Beta Testing program for FIRST! This is a huge honor and responsibility, as there are only 30 teams globally who were selected for each language, and many of those spots are being held by long-time Championship-level teams that have been beta teams for several years. We are specifically assigned to test the new version of LabVIEW and the respective FIRST code libraries.<br />
<br />
So what does this entail for us? We will be thoroughly testing the 2018 software and potentially new hardware ahead of most teams. We have to document what we’ve learned. We need to give feedback to FIRST and their suppliers. We need to share what we’ve learned and become an authoritative contact for other teams. Like I said above, this is a huge responsibility.<br />
<br />
This will take the efforts of the entire team, as we will have to get both Toasty and Moldy back into competition shape. Specific to the process that FIRST uses, I need to collect 9 other official participants (students and mentors), as soon as possible. If you are interested, just post below or send me an e-mail indicating your interest.<br />
<br />
-- LenMr. Ehttp://www.blogger.com/profile/09034353479134097628noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-76763726953093953752017-09-06T23:53:00.000-07:002017-09-17T21:49:54.355-07:00Welcome New Members!<span style="font-family: "helvetica"; font-size: 12px;"><br /></span>
<span style="font-family: "helvetica"; font-size: 12px;">Hi Team!</span><br />
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuuAkMdir2RmhjdhKp6Az10ARQoNcW_YXwJDenu3Lo-cWkC-7PinRWcf5Wtcfr6dGCvYXjDIR37XvMX6gwqDbJHNhDr_D_5mPvwEidimqkqkSwKpEWC-eWm_uZTek4wTVYdaD39LMpqUg/s1600/Fierce+Penguin+585.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="806" data-original-width="900" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuuAkMdir2RmhjdhKp6Az10ARQoNcW_YXwJDenu3Lo-cWkC-7PinRWcf5Wtcfr6dGCvYXjDIR37XvMX6gwqDbJHNhDr_D_5mPvwEidimqkqkSwKpEWC-eWm_uZTek4wTVYdaD39LMpqUg/s200/Fierce+Penguin+585.png" width="200" /></a>First of all, welcome to all of the new members who expressed interest in programming, coding, or “anything” at today’s meeting. I’m sorry that I wasn’t there to meet you, but I’ll get to know you soon enough.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
If you haven’t visited the team website yet, you should get into the habit of checking it out at <a class="" href="https://firstteam585.org/">here</a>. The <a href="https://firstteam585.org/buzz.html">Buzz page</a> is automatically updated with stuff from the team’s various social media feeds. Very soon, we will be updating the main site with more recent content and adding a programming blog. This will be a persistent place for much of the information that I send out over e-mails, and a place to have discussions over different coding topics. The site also has <a class="" href="https://firstteam585.org/team-resources.html">a calendar under the Team Resources area</a> that should be the most up-to-date scheduling for meetings. Our items will be deep red in color, but you should also check out other events (especially the pink ones).</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br />For those of you new since last week, we use two different languages or environments for programming our robots. We use LabVIEW, a graphical-based language for main robot control and the off-field dashboard. We use Python with OpenCV to do our vision programming. I now have the VirtualBox VM ready for Python programming with OpenCV, which mimics the system used on our vision processing computer. This can be installed on your own computer, so that you can get up to speed as fast as possible.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<a href="https://www.virtualbox.org/graphics/vbox_logo2_gradient.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="180" data-original-width="140" src="https://www.virtualbox.org/graphics/vbox_logo2_gradient.png" /></a>To spread the love, we will have a VirtualBox install party at the Evansic house tomorrow (Thursday) night. It is the next red block on the team calendar. Bring your laptop (Mac, Windows, or Linux), and you too can get your own tools to play with and learn Python and OpenCV!</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
If you can’t make it (I know, short notice), the VM and other related information will be available when the website is updated.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
— Len</div>
FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-38262745505238658172017-08-30T16:40:00.000-07:002017-09-17T22:04:12.809-07:00Why Python and LabVIEW?<span style="font-family: "helvetica"; font-size: 12px;">Hi Team!</span><br />
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
One of the big questions that I get about coding for the team is why "Python and LabVIEW?” We could use Java or C++ instead.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
The simple answer is the same for both languages. LabVIEW and Python are easy to learn.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
When Mrs. E. and I came to the team in the 2008-9 school year, FIRST FRC was transitioning to an entirely new control system from National Instruments. From the beginning, it could be programmed in C++, Java, or LabVIEW. The previous controller used a derivative of C, so it was decided that we would use C++ to program the new system. It seemed that this would be the best fit.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvBcVHR2GLHfB-wSn1q4gtNNobk3uqV4mHijB798mh32RmX8cnxTtPa0hwivqm2-zNMCPlrvkJe8tTFODPWH-txnte_OWpuIBJxd8xgE7Ma2nm964e7ZZGSJSweFxOr5Ey7tYNLhQ7j5M/s1600/b2fb65cff79e.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="496" data-original-width="400" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvBcVHR2GLHfB-wSn1q4gtNNobk3uqV4mHijB798mh32RmX8cnxTtPa0hwivqm2-zNMCPlrvkJe8tTFODPWH-txnte_OWpuIBJxd8xgE7Ma2nm964e7ZZGSJSweFxOr5Ey7tYNLhQ7j5M/s1600/b2fb65cff79e.png" width="161" /></a>Four weeks into the build season, our team programmer had spent a LOT of time trying to get the C++ framework to work. At that point, I was a bit worried that we wouldn’t have any working code ready for the robot. I sat one of the underutilized team members down at a computer, and in two hours, we were able to replicate everything in LabVIEW that the main programmer had struggled to get working in C++ over four weeks. On top of that, we even made a working vision system for that year’s game that could discern different colored balls.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Now, please understand, our main programmer was and is a very smart guy. He eventually got all of the code working in C++, but it took a huge investment on his part. Nobody else on the team had any hope of understanding how the code worked, as nobody had the time that he had spent on the code. LabVIEW was and is much easier to get up to speed with. We have mentors that know LabVIEW and we get sponsorship money from National Instruments for using it.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Our use of Python is a little more complex. We use it on the nVidia Jetson platform, which is an ARM architecture with a lot of GPU cores. We could use C++ on this, as OpenCV (the computer vision library we use) is written in C++. Why don’t we use C++ here instead?</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<a href="https://www.python.org/static/community_logos/python-logo-master-v3-TM.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="203" data-original-width="601" height="108" src="https://www.python.org/static/community_logos/python-logo-master-v3-TM.png" width="320" /></a>As mentioned before, Python is easy to learn, but that isn’t the whole story. Python is Python is Python (within the same version). If you run it on Linux, Windows, or macOS, it works the same. C++ is NOT the same on those three platforms, as the compilers for C++ are different on each. Linux uses g++, macOS uses Xcode (llvm Clang underneath), and Windows uses Visual C++. They all compile C++ code, but do it very differently, and to varying levels of adherence to ANSI standards. This means that C++ code written on one operating system is not guaranteed to work on another without a lot of testing and re-writing.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Last year, we did encounter differences in how OpenCV that was called from Python behaved on different platforms. This was primarily due to the use of different compilers on different systems. The Python code we wrote, however, behaved the same on Windows, Linux, and macOS. As mentioned in the last e-mail, I am working on a virtual machine solution that we can all use to replicate running on the Jetson. We might be able to use C++ in this virtual machine, as the compiler will be the same as what the Jetson uses, although the underlying CPU’s will be different.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Perhaps the best reason I have found for using Python for vision is a site that is dedicated to using OpenCV with Python. Please visit <a class="" href="http://pyimagesearch.com/">PyImagesearch.com</a> for the best guides I have found for learning computer vision topics. Adrian’s blog entries are way better than the books that I had found last year. He really does a good job in breaking things down to be much more understandable. He also covers topics that are extremely advanced (like machine learning).</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
I just realized that I didn’t address Java. Well, I don’t want to make anyone suffer that much. I’m told that Java 8 is not as bad, but bad is relative, and it is still Java. In all seriousness, Java is a third-class citizen for robot programming. The FRC Java framework is a wrapper on the C++ framework. The C++ framework is itself a second-class citizen, as it usually trails the LabVIEW framework when new features are introduced or bugs are fixed.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
If you want to use Java or C++ (or Swift, or C#, etc) for a project, just reply privately and let me know. All computer languages are just tools, and one of them may be a better tool for something that we do. The more tools you have, the heavier your toolbox will be.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
— Len</div>
FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0tag:blogger.com,1999:blog-7311579306051271380.post-32145465422131954202017-08-29T23:00:00.000-07:002017-09-05T21:17:42.982-07:00Getting Started for 2018!<span style="font-family: "helvetica"; font-size: 12px;">Hi Team!</span><br />
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
It was good to see some returning members and meet some new members at the Junior Robotics Kickoff meeting on Monday. We have a lot of new challenges ahead of us this fall, so I’d like to get a strong start to this semester.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Many of you know that we currently use two different languages or environments for programming the big robot. We use Python with OpenCV to code our vision system on the nVidia Jetson platform, and we use LabVIEW for the main robot and dashboard programming. This fall, we will also be investigating several different ways of programming an Android based controller for our First Tech Challenge (FTC) team. None of the FTC options are Python or LabVIEW, so it will be a great opportunity to learn something new.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
This summer, we posted some mild programming challenges on the team website. The primary goal of the challenges was to develop problem-solving skills. Problem solving is what is really underneath all programming and engineering. The secondary goal was to get more exposure to working with either LabVIEW or Python. I encourage all new and existing team members to look at, and attempt these challenges, as it will really help in learning programming languages that may be new to you.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<a class="" href="https://www.firstteam585.com/programming-challenge.html">Programming-Challenge</a></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
The lowest-cost of entry option for the programming contests is using Python, as it is free and works on Windows, macOS, and Linux. If your computer doesn’t already have it installed (this is mostly a Windows problem), you can download the appropriate package from <a class="" href="http://python.org/">http://python.org</a>. We are currently using version 2.7.x.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
I am putting together a virtual machine image for vision programming. This image will closely replicate the working environment on the Jetson, so that more work can be done without having to physically have access to the Jetson hardware. More details will be shared on Thursday night. If you want to get a head start, you can download and install Oracle’s VirtualBox software (free), which is available for Windows and macOS. It is available at <a class="" href="https://www.virtualbox.org/">https://www.virtualbox.org</a>. I anticipate that the virtual machine image will take around 10 GB of space, when it is completed.</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
Hope to see you Thursday!</div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
<br class="" /></div>
<div class="" style="font-family: Helvetica; font-size: 12px;">
— Len</div>
FIRST Team 585http://www.blogger.com/profile/03670660377046764039noreply@blogger.com0