Steamworks - Week 1

Posted on Tue, Mar 7 2017 in Bob's Journal • Tagged with FRC

The Krypton Cougars are back in action. After their banner performance last year, the students were eager to learn from their mistakes and made an exhaustive list of everything they wanted to do better, presumably so they could pointedly ignore it.

Last year the battery was very hard to replace, causing much frustration during and after the competition season. One student ended up becoming the designated battery installation expert, and that could only be done in a timely manner if the robot was held up in the air. For 2017, the team decided that wasn't nearly difficult enough, and buried the battery even deeper in the depths of the robot. It now requires two or three students to replace a battery, after moving multiple robot mechanisms out of the way.

Last year the team divided their focus between too many things, and vowed this season they would streamline aggressively. When the game was revealed, the first meeting was to discuss what game elements the team would target and which they would ignore. The team decided that the fractional point value of fuel made it unnecessary, and that the forty-point gears and fifty-point climbing were much more important. They then spent half of build season designing a hopper and loader for fuel. Which leads us to the next improvement...

Last year the robot was not mechanically completed until the last moment. The programmers were forced to program on the car ride to the competition. We agreed that this year we'd finish all mechanical changes at least a week before the end of build season, giving our programmers and drivers the time they needed. Naturally, the mechanical team decided that prototyping the fuel hopper system took priority over programming and driver practice, leaving the programmers to test their changes in the gaps. An additional motor was added to the robot, for the hopper, the night the team arrived at the competition, which the programmers did not find out about until the night before. It was programmed at the competition. The drivers got no practice time.

With this auspicious start, our team could not help but have a great first competition. One thing you must do at an FRC competition, after getting your robot unpacked, is have the robot's on-board radio re-imaged for the field. Until this is complete, and your robot is inspected, you can't do much. There were already a few teams in line before us, and they seemed to be having trouble.

"Did you update your firmware?" the technical assistant would ask.

"Yes," they replied confidently. Then they'd plug in their radio, enter their team number, and then watch as a large error dialog appeared. Three teams in a row did this, so when it was our turn I was a bit worried.

"Did you update your firmware?" The last update we'd done had been the last week of build season. I hadn't seen a notice of any new changes, but how could all of these other teams not have updated their radios in three weeks?

We plugged in our radio, entered our team number, and hit the "Configure" button. A progress bar appeared on the screen. A few seconds later our radio was successfully imaged. We took it back to the pits and plugged it into the robot.

I suppose at this point I should mention that this is the first year our team has used a co-processor for vision. It's a second computer with 192 GPU cores, and it can process two different camera feeds for different targets and stream video feeds and target information back over the network to our drivers. It's one of the programming team's several amazing achievements this season. We rely on this vision information to drive our robot, both autonomously and when we need extra precision under human control. After the radio was re-imaged, this vital co-processor disappeared from the network.

By that time it was getting late in the evening, and Miranda had only had a short nap on the ride out, so I had to leave so we could put her to bed. Back at the hotel, I provided tech support via text message. The core problem was somewhat obvious. With …


Continue reading

Eulogy

Posted on Wed, Feb 8 2017 in Bob's Journal

Steve was the type of man that our modern age believes extinct. He was an old man at forty-nine, grizzled and rough. Most respectable people shied away from him. He wore an old coat, drove a van that couldn't pass inspection, and had a big beard that would have been white if it hadn't been stained yellow by cigarette smoke.

Steve worked for minimum wage, doing landscaping for people better off than himself. He'd been paid more before he took the company truck out after he'd been drinking. Now he was just grateful to have a job. His wife had kicked him out, so his boss let him live in a small shack by the company office, which was an improvement over living in his van. He had no hope for advancement. He was dirt poor and illiterate. The person he cared about most, his granddaughter, wouldn't talk to him. He was a man who had fallen through the cracks of our society.

Steve had gone to church, but he never fit in among the suit-wearing crowd. They were nice enough, but he knew he didn't belong. His life was too checkered to past muster. His theology was a mashup of ideas he'd picked up from various questionable sources. Steve believed that God created life on the outer planets, wiping out each one as it became too wicked, and now it was Earth's turn. He didn't get all the big words the church-people used, but he liked to listen to Christian music. His favorite band was Skillet.

Yet to the few people who really got to know Steve, he was amazing. He was a craftsman who loved nothing more than turning scraps of wood into masterpieces. He volunteered his ample free time to build sets for local plays. Despite everything that had been done to him, Steve had a heart of gold. He was eager to help anyone, even those who hurt him. While Steve might not have known how to read, he was a force to be reckoned with at the checkerboard. No matter who he played, he'd find their weakness and end up with the last checker every time.

Steve died of a brain aneurysm the day after Thanksgiving, and to most people his life was the example they tell their children to avoid. It's true, he made poor choices and gained little in this world. Yet something in Steve was so winsome that it really makes me question whether he didn't know something the rest of us miss. Farewell Steve. You are missed.


The Entirely True History of the Fluffernutter

Posted on Fri, Jan 20 2017 in Bob's Journal

I have endeavored to keep this website free from the confessional gushing that makes up so much of social media. Yet I have a fantastic personal tale which must be chronicled for the benefit of mankind. You may not believe it, and that is your privilege, but here is the story of how I accidentally invented the Fluffernutter.

I was around ten years old at the time and in elementary school. My family was not wealthy, but as a special treat every Friday my parents would give me eighty-five cents to buy pizza from the cafeteria. The rest of the week my lunch came to school with me, in a lunchbox, and it always included a peanut butter sandwich.

I can't recall a time when I did not prepare my own lunch, and peanut butter sandwiches were easy: get two slices of bread, put a big glob of peanut button on one, spread some butter or margarine on the other, and press together. Some of you are probably wondering about the butter, and the truth is I have no idea why I did that. It was just how I knew to make a sandwich and I never stopped to consider the source of this knowledge or its nutritional ramifications.

My mother had her own thoughts on nutrition, and while she had no problem with my daily ingestion of toxic levels of trans fats, she did have a problem with companies using annatto to give butter and margarine a yellowish tint. Somehow she found some unmolested butter, like she'd had growing up. This made little difference to me. It still made a peanut butter sandwich just fine.

It may come as a shock to those in the audience, but being an overweight know-it-all who wore hand-me-down clothing (without having an older sibling, I should add) did not elevate my social status within elementary school society. I sat near the cool boys who could play sports and say dirty words when the teachers were away, but I knew, and they knew, that I was not one of them.

The coolest of the cool boys was named Bryce. He always got picked first for kickball, and never packed his lunch. He noticed me eating my peanut butter sandwich with snow-white annatto-free butter and was intrigued. "Is that marshmallow?" he asked?

I should point at that I had never heard of marshmallow cream, and I could see no way that anyone could confuse butter with the fluffy cylinders of sugar that I roasted over a campfire in the summer. It was probably some cool kid joke that I wasn't cool enough to understand. So, with the dry sarcasm that served me so well, I responded "Yes, it's marshmallow.

Needless to say, this short exchange changed Bryce's life. Even in high school he would still fondly recall how I had introduced him to the Fluffernutter, and since the coolest boy in school was eating them, they soon became a sensation all across the fourth grade.

I realize that some people may credit the discovery of the Fluffernutter to other times and places, but as far as my elementary school is concerned, I am its inventor.


Lateral Thinking

Posted on Thu, Sep 8 2016 in Bob's Journal

In tenth grade I had to take a course to prepare for the workforce. The class included interviewing a person in my career of interest, doing mock job interviews, and even some creative writing and public speaking.

One day the teacher told us we were going to do lateral thinking problems. As it turned out, lateral thinking was just another term for trick questions. They were designed to test if I could answer questions without making unwarranted assumptions.

Here's an example: A man is walking down a country road that has no street lights. He is wearing black clothes and not carrying a flashlight. A black car with it's headlights off comes speeding around the corner just in front of the man. It screeches to a stop, narrowly avoiding running the man over. How did the driver of the car see the man in the road?

You can have a lot of fun imagining possible answers. At that time cars didn't have collision sensors, so let's assume the car is old and it's up to the driver to stop. It's possible the walker was carrying some light other than a flashlight, like a cell phone, a headlamp, or glow sticks. Perhaps the driver was wearing night-vision goggles. Maybe it was just a coincidence.

As it turns out, none of these ingenious solutions is necessary. Nowhere in the problem does it state that it is dark. Check it out for yourself. Since lights are mentioned several times, the mind makes that assumption, but it's not in the question.

This test still counts as one of the proudest moments of my life. I don't think any of my classmates answered more than fifty percent of them correctly, but I only missed one.

You see, my brain is terrible at handling assumptions. That can be very helpful in programming and, to a lesser extent, business, but it's a major liability in personal interaction. Allow me to demonstrate.

People often ask me questions. I'm good at answering them, provided they're factual. If they're not factual my brain will change them until they are. This is especially a problem with "How" questions. Not all "How" questions, mind you. Some just want you to describe a step-by-step process, such as "How do you download an email attachment?" or "How did you get up in that tree?" Those my brain handles just fine. It's the other "How" questions.

Often when people ask how, it seems like they're asking for a description. "How does the fish taste?" It seems innocent enough, but it's a trap. "It tastes like a fish" is the wrong answer. So is "It can't. It's dead." What people actually want is not a description, but a judgment. Intellectually I understand that, and yet my brain says, "Who am I to judge whether a fish is good or bad?"

This gets even more confusing with "How" greetings. "How are you?" doesn't mean "What conditions led to you existing?" even though that's what my brain hears. And since I can't reliably judge a fish, I definitely don't have enough information to judge my own condition. Of all the people on earth I am singularly unqualified to that task. So my brain gets a bit stuck.

Over time I have divined that the preferred answer is "Good, how are you?" Even "Hi" seems to be acceptable, though I have no understanding of how that is related. Just whatever you do, don't try to answer the question literally. No one wants to know that.


Memory Lane

Posted on Thu, Aug 18 2016 in Bob's Journal

I was uploading a Miranda video this week when I stumbled across some old videos that YouTube had been saving. For your amusement, I present Stuffed Carnage: The Complete Collection:

[embed]https://www.youtube.com/watch?v=bMjrPvPTokQ&list=PLD9QSYWzVFY0IgUaF7L9NRk36ohd7bQxE[/embed]

I must apologize to our readers in Canada and Germany, since some of these videos are blocked in those countries. Or perhaps I should be apologizing to the countries where they aren't blocked. You decide.


A Friend Indeed

Posted on Fri, Aug 12 2016 in Bob's Journal

I saw this disheartening headline the other day: "Only Half of Friendships are Mutual, Researchers Find". If you're someone like myself, who feels they don't have many friends, the take away is that other people don't have that many friends either. At least, not as many as they think. In fact, if you break down the numbers, you have fewer "fake friends" than them.

I propose that we introverts hold a party to celebrate! We can all stand against the wall and avoid making eye contact.


Search by State the CiviCRM Way

Posted on Tue, Apr 19 2016 in Bob's Journal

I don't normally write about work, because it's generally both boring and privileged. However, I think this warrants an exception. Enjoy.

The ticket came in as follows:

The following member is in The Netherlands, but is coming up in the Utah state search.

C----- P------
owner, garden designer
Z-------- 94
hoogland, UT 3828GE Netherlands
View Member Profile

A quick glance told me all I needed to know. The text-based abbreviation match was being too greedy. It was my chance to redo the member search the Right Way™.

The website having this problem is built around the CiviCRM platform, which manages all of its members and handles billing. CiviCRM was chosen, mainly, because it is free. However, after being forced to work on it, I think the cost is still too great.

That being said, a search for all members in a state should be simple. CiviCRM provides an API for accessing its data. In addition to that, it provides a developer tool to generate and preview queries against that API. Armed with these, I set to work.

Members are stored as Contacts, so I opened up the API explorer to see what was available. I wanted to make a list of all states and associated countries that had members. Fortunately, each state has a unique numeric ID, so I could use that instead of matching abbreviations like the current search did.

I checked the explorer and was delighted to find that it provided state_province_id, state_province_name, and country for Contacts. This wouldn't be as hard as I had expected. I created a query to search for those fields on all Contacts who were in the Searchable group. Unfortunately, the explorer generated an invalid query using the group's name instead of its ID, so when I ran the query it exploded. I had run into this issue before and already knew the ID, so I copied the query into the search code and replaced the group name with the ID.

I wrote a loop to go through the returned Contacts and make a list of countries with their associated states, then used that list in a drop-down in the search form. I saved my changes and loaded the form. The drop-down showed countries, but there were no states.

Perplexed, I dumped the list of countries I had made, hoping to find my mistake, but it only had countries too. I dumped the result I had gotten from the API. Notably missing from the results were state_province_id and state_province_name. I went to the API explorer, removed the Group, and ran my query on all Contacts. There, as well, the fields I had requested were missing. I undid my changes and started from scratch.

I noticed that while the query did not return the fields I had asked for, it did return one I had not: address_id. I reasoned that I could use this field, along with a MySQL query, to find the states' names and IDs. I created a new API query asking for the address_id of Contacts. Having learned my lesson from the last time, I ran the query in the explorer without a group. The results did not include address_id.

Okay, I had seen address_id in my results before, so I knew it could be returned. It must only appear as a side-effect of one of the other fields, I reasoned. I created queries asking for country, state_province_id, and state_province_name, but address_id was not returned for any of them. Finally, I made a query asking for all three together. address_id appeared in the results. I counted it as a victory.

I made a MySQL query using these IDs in a massive IN clause. The query selected state name, ID, and country. Using the results of that query, I re-created my list of countries and added them to the drop-down input.

Of course, that was only half of the equation. The drop-down showed all of the states, but I needed to find all members that matched the chosen state. Fortunately, the API allowed me to limit queries based on state_province_id. I verified it in the API explorer before writing the code. I passed it the selected state ID and …


Continue reading

Stronghold - Westtown

Posted on Tue, Apr 5 2016 in Bob's Journal • Tagged with FRC

The Krypton Cougars arrived at their second competition with only one obstacle standing between them and total domination: themselves. The new pickup system (also known as the old shooter) had been designed without measuring if a ball sitting on the floor would touch the intake wheels. Testing revealed that the new metal base-plate would hit the ball first, knocking the ball away repeatedly. After much deliberation, and a sometimes contentious discussion about what shape the cut should be, the team decided to cut off an inch from the front.

With their robot now even more unstoppable than before, they had it weighed and inspected. Once their radio was configured to be plugged into the field, they got in line for their first practice match. Finally they reached the front of the line, eager to test their new design. "Sorry guys, that's all the matches we have time for tonight."

Undeterred, they returned the next morning and stood in line again. When they finally played their long-awaited match, the new arms performed as anticipated, getting hit early in the match, bending the shooter and causing significant damage to the robot. Back in the pits, the team decided that making the same mistake a second time wasn't quite enough. They removed the angled intake bars from the aluminum arms, leaving only two short tusks in front. Since each tusk was one-inch-square, the pickup mechanism's width was now approximately the same as the ball, making collecting a ball from the field nearly impossible. The team saw that their pickup design was good and took the robot to the practice field to see how great their shooter was.

The team stood, waiting by the field as team after team tested their robots. "Where are we on the list?"

"List?"

"Yeah, the list where you sign up for a time slot to test your robot. You did sign up for that?"

"Oh." The team reserved for a time slot and eventually tested their shooter. They scored two high goals, out of dozens of attempts, and their joy was beyond containing as they shouted for joy while the other teams stood silently for the national anthem.

Practice time was over and the main event began. In their first match, the Krypton Cougars got off to a great start, easily clearing the defense in front of them, and slamming full-speed into their opponent's wall, an effective, if unplanned, intimidation technique. Delighted, the team scurried into line for their second match.

The second match was equally successful, with another intimidating autonomous, until a head-on collision with an opposing robot sheered through two aluminum brackets like they were tissue paper, leaving the shooter hanging by its wires. Without enough time to fix the brackets before their next match, the team used bungee cords to strap the shooter to the robot and went back on the field. Unfortunately, they neglected to strap down the duct-taped-on limit switch, and left it laying on the field like a deceased orange long-tailed rat.

Their next match wasn't until after lunch. They worked feverishly to make new brackets (They hadn't brought replacement parts). Far too quickly lunch was over, and matches resumed. Their match approached and the team continued reattaching the parts they had disconnected. The match before theirs began, and the team still hadn't finished. Duct tape and zip ties flew as the team strapped down every loose piece they could find. It was time for their match to start, and the team deployed code to the robot as it rolled towards the field.

When officials finally made them stop working on the robot, it drove well and the shooter worked, mostly. After the match, the team found that the limit switch had come unsoldered again. They re-soldered it, but then the arm would only move down, until it reached the bottom switch, at which point it wouldn't move at all. The team checked the top limit switch, but it wasn't closed. Figuring it had short-circuited, they removed it entirely, but the arm still didn't move. Closer inspection revealed solder between the solder pads, creating a tiny short-circuit. The team melted the solder off the pads, but didn't have time to attach the …


Continue reading

Stronghold - Preview

Posted on Wed, Mar 30 2016 in Bob's Journal • Tagged with FRC

"Let's check the robot's camera feed."

Click. The robot blinks to life. Eric waits at the programming laptop for the wireless connection.

"Hey, this motor isn't plugged in."

Click. The robot goes dark. Thirty seconds pass.

"How are we supposed to check the camera without power?"

"Oh yeah. Eric, we turned off the robot."


"It's ridiculous how we have to relearn the same lessons every year. We should write down what went wrong and go over it at the beginning of next season."

"Connor, we did that this season, and look what happened."

"Oh yeah. But, like, the arm outside of the robot. Every year we have one and every year it gets broken. We even made this year's arm from quarter-inch steel, and it still got destroyed. We shouldn't be extending outside of the bumpers."

Twenty feet away, Tory and Gavin work feverishly to attach new aluminum arms to extend outside the bumpers.


"Gavin did a terrible job taping these wires. I can do better."

Connor grabs the scissors and cuts through the delicate encoder wires taped inside.


"Henry, that motor is already attached."

"What?" Henry asks, tugging it from the robot and snapping the data cable.


Roses

Posted on Thu, Mar 24 2016 in Bob's Journal

When we bought our house there was a rose bush in the front yard. I'll call it was a bush, because I hear that's what roses come from, but it resembled a tree. It had a single stem that was about eleven feet high. It gave us a few of roses the first summer, and also scratched me every time I tried to mow near it.

I talked to other people about pruning it back, and they all agreed that was an excellent idea. It would help the plant produce more roses, instead of wasting so much energy on maintaining a ridiculously long stem. I was no gardener, so I was a bit reluctant to do the work myself, but I was a homeowner now and everyone told me "There's no way to over-trim a rose. They're very hardy plants." So, during the winter, I cut the stems to what I felt was a more reasonable length.

The plant hasn't produced a rose in three years.