Calling these robots as EcoBot, scientists used smart materials to create the "heart" which has 24 microbial fuel cells.
According to the team leader of the study, Dr Peter Walters, these EcoBots could refuel from public lavatories in cities. They can also get powered up from slurry pits in rural areas.
These types of robots are capable of generating their energy from human urine, waste water, rotten vegetables and fruit, dead flies. The artificial heartbeat scored higher as it was found to be simple mechanically compared to electric motor-driven pumps.
As we look ahead, scientists do envision a world where EcoBots could be of use as monitors in areas where the pollution levels are alarmingly high or in areas where there are dangerous predators in order to reduce the level of human maintenance.
Doctor Walters said: "We speculate that in the future, urine-powered EcoBots could perform environmental monitoring tasks such as measuring temperature, humidity and air quality."