Virtual Pi Wars has arrived!
Forest Fighters Pi Wars 2020
Saturday, April 25, 2020
Friday, March 6, 2020
Calibration - Seeing Red
So our Pi Wars robot needs to "see red". Forest Fighters are not going to need to pick up different colours as we are not doing the Eco-Disaster challenge autonomously.
However we do want to attempt the Minesweeper challenge which requires detection of red.
Detecting a colour is simplest when the colour space is viewed in HSV as the Hue for a particular colour remains in a tight range independent of the Saturation and Value (Brightness)
HSV_color_solid_cylinder.png: SharkDderivative work: SharkD Talk - HSV_color_solid_cylinder.png, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=9801673
Normally red hue values appear across the beginning and end of the range which means typically you have to compare across two ranges, twice as much computation, slowing your frame rate and ultimately slowing the robot. In the above example with a cylinder we will assume that red starts at 340 degrees and finishes at 20 degrees creating two ranges 340 to 359 and 0 to 20.
However there is a very neat trick you can do to move the red range to where the blue is by turning the cylinder. So here is the trick....
Rather than telling Open CV that the camera frame is BGR we do an RGB to HSV conversion instead. This means the red hue value rather than being centred on zero is moved to the blue and centered around 170. Making finding red objects much neater.
Take an BGR image from the Pi Camera and in Python Open CV use:
imgHSV = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)
Then look for your red object where the blue would be. Simples!!!
Colour detection needs good lighting ( or at least constant lighting ) and at the event the lighting will be very different to how we have been testing, so we have a spare Pi with camera,a 3.5" touch screen and power bank attached to do some calibration testing.
Note the HSV range is displayed across the top of the screen and some on screen "buttons" allow us to change the values.
Pi Calibration - Ready to "See Red"
Some video of the calibration program in action.
Monday, March 2, 2020
Look out! Here comes Audrey 3!
Amy has finished painting Audrey III!
She used 5 different paints all brought from the Model Railway Shop mentioned in the last post: a mid-tone green, a dark blue, a tan-yellow colour, a crimson and an off-white.
The colours weren't ideal since the tops of the lids misleading but Amy is still very happy with the project. She even made some gradients along the leaves, tentacles??? and body of the plant.
For comparison. Here is Audrey pre-makeover.
The colours weren't ideal since the tops of the lids misleading but Amy is still very happy with the project. She even made some gradients along the leaves, tentacles??? and body of the plant.
Now that Audrey has successfully taken over Eumiísdahd's table, there is no doubt he'll be able to take over the world!
Sunday, March 1, 2020
Neat Plans and Spray Cans
Over the weekend, Amiessdad and Amy have decided to get to work on smoothing, priming and painting the robot!
We purchased some spray paint and primer from our local art supplies store and made sure to stay protected from inhaling too much paint!
These may also come in handy in the event of a coronavirus outbreak... (;'∀`)
Unfortunately, both Amy and Umiesdoahd have forgotten to take any kind of process pictures but it mostly consisted of taking the robot apart, using a 3D pen to fill in holes in the print, painting it and putting it back together.
The gang also bought some small paints, faux grass and little pieces of shrubbery from a model railway store. However, Amy has been refrained from putting a l l t h e p l a n t s onto the robot because she has been warned they may fall off if kept on for weeks before the event.
Stay tuned for a future blog update where she paints Audrey!
Saturday, February 15, 2020
Don't Drive The Plants!!
Today, Aémisdaud and Amy did some driving practice using their newly installed grabber to practice the eco-disaster challenge.
However, they had an unexpected visitor...
They are going to attempt this challenge remote-controlled so they felt it was important Amy had some practice using the grabber tool. The green barrels should be picked up and put into the blue section and the red barrels should be put in the yellow section. You can read more about the rules for this challenge here.
However, the had trouble picking fallen-over barrels up due to the grabber being too high. Ameezdhad intended for Amy to be able to do so so this may be a problem. Look forward to a follow-up post sometime later this weekend detailing a redesign of the grabber. :)
Now that both Amy and Mia are more accustomed to the robot, progress should skyrocket!
Thursday, February 6, 2020
Active cooling
With a Pi4 in the middle of Audrey III and 4 heavy-duty motors, things might get a bit hot so we have fitted a fan to the top layer. This will pull hot air out and the holes in the back and side will allow some airflow over the boards.
The Pi was running at around 68 degrees and with the fan about 55 depending on what it's doing so we should not have any overheating, the Pi starts to throttle at 80C so better safe than sorry. This is especially true when you are trying to eek out as many frames per second as you can for the line following.
Here's a couple of pictures with a cutaway of the internals.
You may be wondering about the crudely cut fan hole in the top; The top layer is now being reprinted after testing with the hacked version.
Sunday, January 26, 2020
More claw.....
We have finally got around to attaching the claw to the front of the robot, (now officially known as Audrey III) and updated the software to activate it with the controller.
We have finally got around to attaching the claw to the front of the robot, (now officially known as Audrey III) and updated the software to activate it with the controller.
New grippers were 3d printed to grip the barrels a little better and the claw mounted low enough to be able to grab a barrel even if its has fallen over.
Why Audrey III? Here is a clue from 1983...
Subscribe to:
Posts (Atom)