February is the uncertain month, neither black nor white but all shades between by turns. Nothing is sure.
Gladys Hasty Carroll
A (not so) few thoughts…
February has a very special day: the 29th, i.e. the leap day. It occurs once every 4 years to compensate for the drifting inaccuracies of our calendar. For many people, leap days would evoke nothing short of apathy and disinterest; most people probably wouldn’t even realise it until it is much closer. However, I feel leap days serve as a subtle reminder for two interesting things.
One, is just how small and insignificant we all seem. The days, months and years that we all so closely abide by every moment of our lives are, at the end of the day, just another one of humanity’s feeble constructs to help us find a sense of control amidst the chaos of the universe. This reminds me of Existentialism, a philosophical school of thought from which my greatest positive takeaway for life is that the universe is inherently irrational, chaotic and meaningless, and thus it is solely up to the individual to instill meaning into his own life by taking personal responsibility of his own actions and decisions, i.e. embracing one’s existence.
Two, is our lack of awareness. This refers to anything from the vast amount of knowledge we will never learn, to the many experiences we will never get to experience in our lifetime and even to the sheer number of people we see everyday, but will never get to know. At face value, leap days are simply a quirky addition to our calendars, but digging deeper, these extra days are required because our calendar is merely a simplification of a whole complex field of astronomy and celestial mechanics that most of us will never understand. I find it humbling and even somewhat overwhelming when considering that everything, be it the littlest of things we know, the smallest of events we encounter, or the most insignificant of people we meet; all of them have an incredibly complex backstory, a series of interconnected events, that brought them to us. Every moment of our lives, countless of immeasurably unique things happen to us, yet we can never truly appreciate them because we are not even aware those moments exist. And even if we were aware of them, what could we possibly do about it? When taking into account the sheer size of the universe, it is simply impossible to fully appreciate the significance of our whole lives. In a twisted way, we try so hard to instill meaning into our lives, but ultimately, we end up knowing so little about the world and our life itself that it begs the question of whether we have truly lived in this world…
Personally, I like to do a self-reflection every 29th of February as it only occurs every 4 years. When asked to picture themselves in a decade’s time, most people would give an honest “I don’t know” for it seems so far away. Yet, when asked to picture themselves in a year’s time, most people would only think of themselves in the same, unchanging routine of their lives. However, 4 years is just the perfect timing where it is close enough that most can still roughly picture what kind of path they would be on and what kind of life they would be leading, yet far enough that much of the details would still be murky enough to keep new possibilities open. When reflecting, I will take stock of my long term growth as a person over the past 4 years, while setting an overarching “macro” theme for my life (on top of the more detailed yearly, monthly and daily goals), for the long but conceivable span of the next 4 years.
February has been a rather chaotic month, to say the least, especially with the corona virus outbreak in China, affecting our main source of electronic parts. Nonetheless, we still made as much progress as we could, and here are some of our important breakthroughs.
Following up from the problems with our first mirror molding process, we made some improvements such as using a bigger heat gun for more even heating and pre-heating the mirror mold to a higher temperature. However, the final mirror still came out rather warped, creating a highly distorted image.
Hence we decided to experiment with another method: folding a mirror sheet into a cone. First, we drew a 2D net of our conical mirror and printed it out. Next, we pasted this net outline over a 0.5mm PVC mirror sheet (much thinner than the ones used for molding) and cut the shape out. Finally, using epoxy, we stuck this mirror cone net around a 3D printed cone, thus creating our mirror.
This method produced a much higher quality mirror, while being way simpler and faster to do. Although there is a large distortion along the line where the two ends of the cone net meet, this mirror is used for lightweight so only the goal detection is crucial. Since the goals are rather huge on the mirror’s image, and the line of distortion can be rotated to face the side of the robot, the line does not cause much problems to the otherwise perfect mirror!
Due to COVID-19, much of our schedule have seen some kind of delay. We sent in our PCBs for manufacturing only on the 10th of February (1 week behind our schedule), due to the fact that the factory could only start work by then. Following that, the delivery of our PCBs were also delayed, arriving only on the 24th. To make matters worse, a huge number of our electronic parts, including one of the most important parts, the TPS5430 buck converter chip, were not shipping and we had only received news of it shipping over on the 29th (meaning it would probably come only by the 2nd week of March). 😞 Nonetheless, we still tried to solder as much of our PCBs as possible by making do with what we had and even salvaging old parts.
We have 4 PCBs, with the third and fourth layers mostly soldered. The third layer is a very compact board that holds the OpenMV camera, Teensy, STM32 chip, IR ring and all the other connectors from the other layers. The fourth layer acts as a mirror holder, and also holds the VL531L1X TOF sensors and BNO055 compass. Since the TOF breakout board we are using does not have screw holes, we mounted them using 90 degree male headers that allowed them to be easily detachable yet still perfectly aligned parallel to the ground in a fixed, stable position.
As for the first and second layer, we have opted not to begin soldering it first to be safe, since we want to make sure our TPS5430 buck converter outputs the correct voltage first before soldering the remaining components. They shall stay dormant for now, but not for long…
For Soccer Open, other than a few connectors, most of the third and fourth layer has been soldered and the parts that we could test, such as the STM32 chip and NeoPixel LEDs, were all working properly. As for our first layer, we have also decided to wait till the buck converter arrives before continuing.
We have also swapped out our motor switch from a toggle switch to a missile switch instead. As much as one can say it is literally just a toggle switch with a spring loaded cover, it still doesn’t stop me from feeling like I’m launching a rocket every time I flip the switch. 🙃
The GUI is just a few more minor fixes away from being 100% complete! The remaining problems we have left to fix is our “make” button, which occasionally crashes the GUI, and the ROI selection, which currently does not display a bounding box when dragging the mouse across.
View this post on Instagram
GUI streaming ball detection from Raspi ⠀ Features: 1. Edit and compile code with UI (vscode/in-built code editor in UI) 2. Quick thresholding with instant value update 3. ROI to identify colour range 4. Visual debugging for every step of the image processing 5. One click to start UI and stream ⠀ ~JT [Soccer Open] #robocup #robocupjunior #bozotics
After programming the GUI for a week or two, with a separate Raspberry Pi, we made another amazing discovery when we started working on the actual robot again. Previously, we thought that we could track up to 120 FPS but that was using a camera mode that only used a partial FOV, which was not suitable for us. 😂😂😂 Using the correct camera mode with the full FOV, our frame rate is now capped at 40 FPS. Adding an approximate 6 ms processing time to the 25ms reading time, our image processing is effectively running at roughly 30 FPS, much lower than our initial expectation of 50 FPS.
In light of this, we considered using
raspiraw which obtains raw Bayer images from the Pi camera. After a week of researching and attempting to use it, we concluded that it will be too time consuming to make it work. Fortunately, we are able to unlock more processing speed and reading speed by overclocking the RAM, GPU and CPU of our Raspberry Pi, especially since we are now using a much larger heat sink than before. However, after experimenting, we realised that overclocking would heat up our Raspberry Pi rather quickly, reaching over 60 degrees after running for 10 minutes. Hence, whether we will actually overclock our Pi still remains to be seen… 🤔
We have also experimented with various algorithms to improve our object tracking such as using
camshift but it was ineffective due to the presence of many objects that had a similar colour range as the ball. Thus, we fell back on our good old vanilla thresholding. It is good enough for our use given that it could track the ball up to 3m away. However, this is still largely dependent on the lighting condition.
On top of thresholding, we have also implemented a basic Kalman filter to predict the movement of the ball if it is obscured by another object such as an opponent’s robot or the copper stands supporting the mirror. However, as the mirror is curved, an extended Kalman filter will have to be used to linearize the distorted image for tracking to be more accurate.
For around the first week or so of February, we made some improvements to the simulation, adding key features such as simple line avoidance, goal aiming, ball kicking, attack-defense switching, and a basic back dribbler flick. A few clips of our simulation in action can be found on our Instagram Highlights here!
However, our simulation project will be put on hold for now as all our more advanced strategy will require knowledge of the opponent robot’s position, which we still don’t know if our camera is capable of doing.
If I’m going to be honest, February has been a rather bad month as compared to our previous months. Progress has been frustratingly slow due to bottlenecks on the supply side, an external problem that we have completely no control over. As of now, we are 2 weeks behind schedule, at best. But on the other hand, at this rate, the Singapore Open would probably be postponed too, soooo… 🤷♂️🙃
At the end of January I had proclaimed February was going to be our make-it-or-break-it month; yet, its the end of February and I am inconclusive about which side of that statement we are lying on. Neither anything exceptionally good nor terribly bad has happened because nothing much has happened in the first place. Perhaps that in itself is the bad thing, but then again I don’t even know what to think anymore. I seek a deeper meaning to all this that we do, yet I fear deep down in my heart I already know what the answer to that is. But till that day of epiphany (or admittal) arrives, I shall just mindlessly wait for those elusive Taobao shipments to arrive…