why i’m so proud of frc team 694 and their cv in auton scoring

FRC Team 694, StuyPulse is currently competing at the China Robotics Challenge which is an off season event. The event uses the same game/challenge as the “main” season which ran from January 2016-April 2016. This year’s event was the Stronghold game. In the autonomous part of the game, you got points for going over obstacles (defenses) and/or shooting a ball into a target.  The team worked on CV (computer vision) very hard this year. This was going to be the year we used CV in competition.. We used it one year when a lot of the code was supplied to teams. And we got CV recognition working last year, but not soon enough to integrate with the robot. We did have a really cool demo where it automatically recognized a target but never quite got it fully working with the robot.

Which brings us to 2016. Don’t get me wrong, I’m thrilled that it worked. But that’s only a piece of why I’m so proud of what happened with CV this year

Subteam

There were dedicated team members who focused on CV for most of the build season. This wasn’t one student on a Skunkswork project. Making a subteam shows this is a priority. Something the team values and wants to see succeed.

Sustainablility/Continuity

There were students in different grades on the subteam. This will ensure that the knowledge and experiences gained won’t all graduate at the same time. Which allows this to become a skill that grows every year rather than having to start over.

Technical understanding

The last two years I’ve seen a marked increase in the deep understanding of how CV works. It isn’t just poking at it. This is hard stuff. Same for communication channels between the camera and the robot. Although I did enjoy the discussion about bit endian vs little endian on transferring data. I knew it was that because we had that problem in the past. So seeing it back, I recognized it faster. Convincing the student I was working with on the problem took a little longer ;).

Team Communication

Some years, I see mixed messages about CV. Whether it is the drivers not trusting it or other parts of the robot being higher priority, the messaging can become demoralizing to the people working on the code. This year, I felt like the whole team wanted to see this happen. There were designated windows to work on CV integration with the robot even really close to the robot’s due date. It wasn’t shafted. It wasn’t put on the back burner.

Quick response to change

There were a number of integration problems. The students quickly adjusted to each one trying different strategies.  And they learned what works/doesn’t work for next year too.

*Never* giving up

Whether it was between matches at competition or after we got eliminated at a competition, the students were working at various aspects of the robot. Even after it became apparent we weren’t going to run the CV during competition because the risk at Championships was too high, the students STILL didn’t give up. They made the most of practice field time to test. They kept testing and integrating and testing and… They *never* gave up and got it working.

At home, I have a Peanuts picture near my desk. It has Lucy holding the football and Charlie Brown looking at it with a caption “Never ever EVER give up.” This is really important. You never know when pushing just a little bit further is going to be the difference. And I’m so proud of them for that. Pushing past the point where most people would give up in a really important skill and just as important as tech skills.

Cookies and Chocolate

On “stop build” day, the team had come further than ever before with CV. The electronics mentor and I chipped in and bought cookies to give out at the “tagging ceremony.” (This is when the code gets tagged in github as the last code tested on the robot before ship date.) I spoke for a minute or so on how big a deal with was and issued a challenge. I would bring in “something better than cookies” if they scored a certain number of goals with CV in competition. A 9th grader said “there’s nothing better than cookies.”

This is the first year I believed it could happen. (Sorry Josh – there were too many forces against you.) While that didn’t happen it wasn’t because of not being able to do it. It was that the risk of getting eliminated at championships was too high by the time CV was reliable. It was the right call.

So at the end of year dinner, I extended the offer to include the China Robotics Championships. Where they scored in autonomous in two out of two practice matches. While the number of goals for my offer is higher than two, the repeatability of getting 100% of them in practice matches is enough for me to declare success for the contest.

Which bring us to – what is better than cookies. It’s not pizza. We eat too much pizza during the build season for that to be a reward for anything. Instead the answer is chocolate:

694-chocolate

694-candy

694-candy

Congratulations 694. I am so proud of you for this accomplishment. Both both the tech skills to do it and for the soft skills and tenacity. Great job!!!

smlunit hello world – with a python dependency

Three years is long enough to forget a lot so I managed to forget that I got this working with python shortly after writing this blog post. Writing this down so I don’t forget again.

  1. Download the smlunit github project. (at a minimum you need the smlunit file and the lib directory)
  2. Download the asserts file and put it in your directory (or elsewhere and refer to it from there)
  3. Write a simple function in a file named helloWorld.sml:
    fun hello(name : string) = "Hello " ^ name
  4. Write a simple test in a file named helloWorldTest.sml:
    use "asserts.sml";
    use "helloWorld.sml";
    
    assertEqual "hello" (hello("Jeanne")) "did it work?";
  5. Run it:
    Jjeanne$ ./smlunit helloWorldTest.sml 
    did it work?..........................................................FAIL
        Expected: "Hello Jeanne"
        Actual: "hello"
    
    ---------------------------------------
    Ran 1 test in 0.204 seconds (1 failure)
    
  6. It didn’t work! Fix the expected string in the test (should be assertEqual “Hello Jeanne”…
  7. Run the test again
    jeanne$ ./smlunit helloWorldTest.sml 
    did it work?............................................................OK
    
    ---------------------------
    Ran 1 test in 0.207 seconds
    
  8. Success!

where did the workspace go in jenkins pipelines

I was encountering an odd problem and needed to see what files were in a Jenkins workspace. For a freestyle job, this is easy; you just click on “workspace.”

workspace-freestyle

Where did it go?

When using a pipeline, you can have multiple nodes in your pipeline so it isn’t that simple. As described in JENKINS-33839, this means you need to click around to get to it. While I did find it, this isn’t something I do often enough to remember so writing it up for my future self and anyone else who happens to read this. (Right after I wrote this, I saw JENKINS-34321 which does explain the steps well. Mine has pictures so might as well leave it.)

  1. First, go to the build run you are interested in and click “pipeline steps”.
    pipeline-1
  2. The click “allocate node: start”. If you have multiple nodes, you’ll need to do this more than once.
    pipeline-2
  3. Then you click the workspace link.
    pipeline-3

 

Implication #1 – wipe out workspace is gone

Since the workspace is no longer tied to the job, there’s also no “wipe out workspace” option. If you need to delete the workspace, you need to delete the entire run of the job. (Maybe someone had something in the build that they shouldn’t and you want it gone.) Ok. No big deal. You have to delete a bit more than before, but it isn’t as if it is something you need for posterity.

Implication #2 – multiple “workspaces”

Since you get to the workspace from within the build, I thought this meant there were multiple. And I was afraid for the disk space. Luckily, that is not the case. Within the same node, each build does re-use the same workspace. So if you go to an old build and look at the “workspace”, it is the workspace from the latest run. Which isn’t intuitive, but I’m glad it works that way.