Team 4: The Second Mouse
(image by McHughstudios)
Ty Ingram - Junior, Course 2, grows cockroaches in his room
Bryson Galapon - Junior, Course 6-2; knows magic
Jose Navarro - Junior, Course 6-3, hates the middle class
Wally Wibowo - Junior, Course 16, very jaded
Trevor Long - Sophomore, Course 16, even more jaded
There were two mice .....
That fell into a bowl of milk ...
The first mouse gave up...
And he drowned...
BUT FIRST an important weekly update from the mice's sponsors:
Pre Maslab - Brainstorming Strategies We discussed strategy and robot design during the break via Google Hangout. Unfortunately the Google Hangout gods were frowning on us that day, and Ty's audio didn't work and he had to resort to unintelligible hand gestures. Fortunately, Bryson saved the day and came up with the solution that Ty would call Bryson and Bryson would relay to us what Ty was saying. About two hours later, we had finally settled on a specific design. At that point the clock struck GAINS-O-CLOCK and we began to CAD parts to the robot.
MASLAB UPDATE WEEK 2: Everyone's actually here!
Build team – Finally, everyone on the build team has returned from their non MASLAB shenanigans. The overall competition design concept hasn’t changed much; we’re still planning on using the arm and claw system. Changes to the design were mainly measurement adjustments, but those fixes could mean the difference between success and everything going to shit. Adjustments had to be made to the tower dimensions in order for the blocks to fall down the tower and stack up, and the team also had to adjust the placement of the second arm in order to successfully obtain blocks from the claw.
One thing the team is now looking at is sensor placement. Initially the plan was to use the action snap switches to indicate possession of a block, but as it turns out, collecting a block does not provide enough force to activate the switch unless the robot rams into a wall every time it finds a block. Of course, this is not an effective strategy, and the snap switches will most likely be replaced with the ultra-short IR sensors. The team is hoping to get the competition robot functioning by the end of the week and plans on having a group crying session if everything fails.
Update: SHIT WORKS! Our robot can stack 8 blocks!
Now that we don't have to spend the next week wallowing in self pity, next week will be dedicated to making sure all the electrical systems work and don't cause the robot to catch on fire.
Software Team Update, now that they have their shit together:
Okay. So. Updates. Yeah.
So yesterday we got the Robot to drive in a square! For now, let's just pretend that a square has 93 degree angles and curved edges. This involved fixing a bug regarding the overflow of the packet queue for motor write commands, but the issue was easily fixed by slowing down our loop method to a rate of 100 Hz. We could have made improvements by doing a PID control on our current angle using a gyro sensor, but we decided for the sake of time to just eyeball a calibration and futz with some speed and timing values. We will definitely use the PID control in our actual implementation of our robot, which is very easy to do using the ROS architecture. So. Yeah. Squares. Driving. YAS.
Speaking of ROS architecture, we also got that to work this week! (Load applauses). "Doesn't that ROxS"? :D.... No? Okay. Well, we were able to create custom messages, nodes, and topics, and we were able to send these messages from node to node through subscriptions and publications. Exciting stuff. This allows us to abstract our code to pure python algorithms, as well as organize our code to make debugging easier.
Next week, we are planning to finish configuring our ROS network and integrate our CV code into its node in the network. It's totes gonna net...WORK :D... So. Yeah. Now is time for Jose to update you on his CV adventures.
I had problems everyday. I was exploring the most optimal method for computer vision. I was thinking of using edge boxes for cube selection. Eventhough the algorithm runs fast in theory, I thought my own implementation would take me to long to perfect, so I scrapped the idea. K-means Algorithm would work in theory if I knew the K.... I'm trying to be as general as possible so a small set of k would still be expensive. I tried some noob stuff like a univariable distribution with deviations, but different faces of the cube have essentially different distributions. Then I just decided to run it through a passive-aggressive Perceptron algorithm. It works.
YAY. Everyone clap for Jose :D. Wooooooooo!!.... Yeahhhhh..
Now back to our regular program featuring the brave mice in their peril:
But that second mouse kept swimming...
Oops! The rest of this story cannot be displayed. To proceed you must read yet another excerpt from the tome of the disciples of the second mouse:
Week 3 Update: Electrical Systems, Coding, and Tears
"I middle-class-Hannah Montana'ed our CV to get the best of both worlds." -Jose, on viewing the wall and button for the dispenser
Build Team Update: Because our basic mechanical systems successfully worked last week, our group crying session for this week was cancelled. Instead, we turned our focus to the great mystery that is electrical engineering.
Most of this week was spent properly placing and wiring the various sensors. For initial testing purposes, we used an arduino to quickly wire up the sensors. After hours of swearing at computers and frying enough IR sensors to feed a baby elephant, we figured out how to get both the color sensor and the IR sensors up and running. Thanks to the code provided on Github by Adafruit, we were able to use the color sensor to obtain RGB values, as well as lux values. After placing the color sensor right underneath the claw, we were able to successfully determine the color of the block our robot picked up. We placed the IR sensors in such a way that we can a) keep the robot from crashing into walls and b) detect robot possession of a block.
Once we finally got the damn sensors to work, our next step was to neatly run wires from the sensors to the breadboard. And by "neatly run wires," I mean "just wire shit up and pray to God that everything's correct and that nothing explodes." When the dust had settled, our robot had wires crazily running everywhere, giving off the impresson that an asshole had dumped a bowl of multi-colored, ultra-thin spaghetti on our robot. But we are still alive, we didn't burn down the lab, and no additional sensors were fried, so yay(?). We stil have to tidy things up, but that's a job for our future selves!
Besides working on electrical systems, we also figured out how to hit the dispenser button without destroying our robot in the proccess.
Interfacing the mechanical systems with all the software, as always, was a major pain in the ass. When we wired the sensors to the Teensy, our color sensor as well as our drive motors became personally offended and decided to not carry out their intended functions, but these issues were solved with a little (aka ALOT) of debugging.
Rapid fire testing also revealed several problems. In some extremely unlucky cases in which the block is perfectly aligned diagonally, the block would get stuck at the top of the tower. Other times, the block unevenly falls from the second arm and misses the tower. We are currently making some tweaks to the second arm as well as the tower in the hopes of eliminating these problems.
More problems with the sensors: the IR sensors keep blinking spastically and WON'T F-ING STOP
Software Update: Where are you?
Okay. Software Update. Part II, electric bugaloo. So this week we were able to successfully get all of our sensors working through the ROS architechture. We also ironed out the details for our path-planning algorithm, whose implementation will be the next step for the next couple of days. Everything is beginning to come together, and we are hashtag happy as rainbow unicorns eating lucky charms. We had some bumps in the road, though. Like, as bumpy as toad skin... with bumps on it... and whose bumps have other bumps - okay I'll stop now. We ran into a problem with the software architechture of our ROS nodes, because we had a couple of nodes trying to use separate TAMProxy objects. Because we are only allowed to use one object, we had to coalesce what was multiple nodes into one. We had to sacrifice modularity to do this, but it was a necessity. But hey - guess what else is necessary? .... Air. Yup. Gotta Breathe... and stuff.. So anyways, we are also dealing with failure modes now, so that our robot is robust to errors come competition time. But don't you competiSHUN me for this pun :D.... Okay Jose, your time to shine again with the CV/Object Detection updates:
Took many many many images in order for the robot to have distance calbration based on its pixels it sees. Pre-processing was filtering out garbage colors (not cube nor button) and then post processing involved organizing perimeters for each potential object and then running it through a convex hull algorithm to calculate area of every potential region. From this we should be able to distinguish circle from cube. Once the distance calibration is hard coded into the robot, the object detection is done.
"BUT WHAT ABOUT THAT DAMN MOUSE????!!!!" You wonder. You have become emotionally attached to that second mouse and the thought of its unknown future causes you to break down and shed tears of despair and question your existence. Will it survive, will it drown like its unfortunate counterpart, or will it be abducted by aliens and forced to take the SAT's everyday for the rest of its life? To know the answer to this riddle of the rodents, my young padawan, you must wait until the end of the competition to find out.
Sadly, the competition did not go as we had planned. As a result of unforseen mechanical and software errors, we lost both of our matches and were eliminated from the tournament. However, we learned a shit ton of things throughout the class and had fun getting to build shit during IAP.
And now, a fitting end to the epic tale:
And he never gave up, and he churned that milk into butter, and he climbed out....
And was promptly devoured by a tiger, which swallowed him whole.
Or at least, many people may assume that this tale is at an end. However, it is just the beginning. Legend has it that the second mouse is not actually dead, but transformed into a highly intelligent being, and is now making preparations to escape the tiger's stomach. There may come a time when all faith is lost in that second mouse and we abandon him in the shadows of death, but it is not this day. This day, we honor that second mouse and his ever fighting spirit, and we look forward to seeing him return to his rightful place on the throne of badassery.