For my final attempt at creating a Bio-Inspired Robot System, I started off by reflecting on the projects we have worked on throughout the semester.
Midterm Documentation / Presentation – Territorial Fighting
Initally, Terrence and I embarked on a long and difficult journey in attempt to create an ant ecosystem in which ants are communicating with one another to obtain food. We got stuck at many junctures throughout this project, but figured it could be figured how. However, eventually, we realized it was probably too ambitious and complex for the midterm. So, we pivoted to another idea in hopes of presenting a more clear body of work.
For our midterm project, Terrence and I did some research on territorial animals. We came across several articles describing territorial fights amongst tigers, which often resulted in death.
In the above National Geographic video clip, one tiger is roaming in another’s territory. Although it is trying to be stealthy, the other tiger is hunting. When tigers are hunting, their territorial instinct is elevated due to a need to provide food for their families.
These tiger vs tiger fights usually start off with a loud roar and a stare-down, before the vicious brawl begins. Although these animals don’t gain any nutrients from cannibalism, it’s not uncommon for flesh-eating to take place. This is purely for fighting tactic and to impair the opponent.
We decided to try and replicate these behaviors using the kittenbot. Each kittenbot is a “tiger” and we used a separate micro:bit for a remote control. Essentially, we created a video game in which the “tigers” can fight with one another to protect their respective territories.
We utilized MakeCode for the coding portion.
Controller code:
Tiger code:
How does the movement work?
We the accelerometer to control the movement of the Tiger. This way, both can navigate their respective spaces freely. The movement is intuitive, so if you tilt the micro:bit forward, the Tiger moves forward. Backwards, it moves backwards, and so on.
The buttons are actually used for the “alarm system”. When a Tiger crosses into another’s territory, it lets off an instinctive signal to threaten the intruder. This usually results in an attack. Eventually, one tiger has to surrender, which warrants another alarm, which indicates fear and pain. Given more time to work on this iteration of our project, we would figure out a way to automate these sounds so that the user can just focus on moving the tiger.. Perhaps the movement part would also be automated, although we quite like the interactive way of controlling the animals.
Here is a video example of the sounds we programmed for threatening:
and pain/fear:
At this time, Terrence and I essentially have two projects underway. We do not intend to totally abandon the initial idea, however the midterm deadline and multiple technical difficulties had us at a crossroads. We still intend to continue developing both projects. For the Tiger one, as I mentioned before, we will implement automation and apply more sophisticated code to our concept. Although the ant project is still of desire, we have more interest in the Tiger project at the moment due to its concrete nature.
The ant project, since it is a bit abstract, was difficult for us to implement through code using the limited resources of the kitten bot. However, we did make some progress with it. Since we already completed the line follower code, which was half of our new project as well, we didn’t want to take the “lazy” route and just present that. We intended to further challenge ourselves by pushing the envelope and figuring out how both robots could communicate with one another and mimic a path. Since this proved to be beyond the scope of our knowledge, we put a pause on this. However, for the final we are heavily considering to continue pursuing this concept.
BIRS Lab Week 2: Robot Brain
I. Find Limitations When Stimulating a Program
First, Anand and I read the microbit voltage at various locations throughout the circuit board.
II. Program the Brain
After reading the voltage and messing around at different points on the circuit board, we began to explore the features. The first game we installed was Snake. Then, we used the makecode software to design text and images to display on the LED’s and test the limitations. One of my initial observations was that since there are so few LED’s. The options for what can be displayed on the LED’s are pretty limited.. for the most part, to images that have “squared edges”. If you would like to show “round” images, you have to compromise and design them in a pixellated fashion. Displaying text is also a bit of a problem, since the width of the LED array is also quite short. Therefore, it is pretty difficult to read longer words…. you really have to focus your attention and almost read at a dumbed down pace.
II. Use the Sensors
Initially, we wanted to really test the limitations of this brain by connecting two sensors and letting them communicate with one another. This proved to be incredibly difficult and time consuming, so we shifted our focus.
Our next mission was to design a game like Space Invaders in which the player attacks and shoots alien, with the “ammo” represented by the LED’s moving across the array. We related this game design to real life as rivaling species and animal communities often quarrel and attack each other. Essentially, survival of the fittest. We wanted to design the game such that the “brain” can be used like a game pad or controller, using buttons A and B to control.
One issue we ran into with this coding, namely using function is.pressed(), was that on each button press, the cursor would move erratically rather than just moving one space. Like this:
After a long time spent troubleshooting, we decided to try using was.pressed() instead, which actually worked. At this point, we were able to get the cursor to only move one space on each button press. Here is the video of our code working.
BIRS Lab Week 6: Midterm Proposal; Ants Swarming for Food
Terrence and I have been brainstorming about ideas for the midterm, and we have settled on creating a robotic concept which mimics ants’ relationship with food. We were inspired by the concept of often seeing ants feasting together around a large piece of food, namely sugary things. Our rough goal is to create an environment where one ant discovers food and goes to grab it. Then, another ant’s senses are set off and he follows the first ant to the source. They then share their findings together, as ants normally do.
We started off by doing research about how ants sense food, namely sugar. We learned that ants usually smell it from a distance, as they are equipped with good sense of smell. And those special species that cannot smell from a distance actually “smell” by touching, which is called chemoreception.
The initial process of finding sugar in an ant colony is as follows.
- First, an ant colony would send out “scouts” to find food in different directions with a radius of 100-200 meters. Once it smells the sugar, the search ends. They possess something called “sensilia” which has something called “glomeruli”. The more glomeruli an ant has, the better it can process and sense smells.
- Once the ant finds food, the scout grabs a small sample of it and proceeds to return back to the colony, taking the shortest route possible. Along this route, it leaves a trail of pheremones. When it arrives back at the colony with the sample, other ants observe the sample and use the same path the ant set to go to the source of food. The more ants go back and forth on the path, the stronger the pheromone trail gets, which makes it easier for other ants to detect them.
Terrence and I intend to mimic this process with robots, by using “Robot A” as the scout. “Robot B” will be the first ant out of the swarm which detects the pheromone path and follows along to the food source.
BIRS Lab Week 5: Physical Implementations of Breitenberg Vehicles
I. Initial Idea
Initially, Terrence and I revisited the Breitenberg reading to gather inspiration in order to decide which robot we would try to build. We were particularly drawn to the ‘shadow fearing robot’ and thought to create something opposite of this: a ‘light fearing robot’. Rather than avoid shadows, this robot avoids bright light. Upon detection of bright light, it turns away by stopping the left wheels, and moves along.
However, we ran into a roadblock once we started the coding portion. We discovered that there was no code to call the light sensor using python. The only way for us to implement that would be to use other sensors, which posed a learning curve and time constraint challenge. We struggled for a while with this troubleshooting, and eventually decided to cut our losses for the time being.. making the goal a bit more simple: instructing the robot to follow a ‘shadow’. This still draws inspiration from the shadow fearing robot, except our robot is attracted to the shadow. We decided to use makecode for this, in order to utilize the full spectrum of our microbit’s capabilities.
Here is the MakeCode:
II. Testing / Troubleshooting
We sent the code to microbit, but it wasn’t properly following the shadow for the first few trials. We returned back to our MakeCode and discovered a simple typo: We hadn’t specified the motor.
III. Success
Upon fixing our coding syntax, the robot was operating successfully. Here are some videos of our successful trials!
IV. Reflection
This lab definitely reminded me that there are some ideas in robotics which are “too ambitious”. Yes, everything is possible… however, it is important to be realistic given the time constraints and knowledge we have in the moment. This robot we created reminded me of the motorized street cleaners we see in China. They seem to follow along the side of the curb, blowing water onto the street. I wonder if we can make these cleaning devices robotic, like robotic vacuum cleaners. We always see people in hotels pushing the floor cleaners, but what if there was a way to automate this process, instructing the robot to avoid places it has already gone, as well as spots that are ‘darker’ as a result of water being dispensed.