This work focuses on the application of Particle Swarm Optimization (PSO) to a problem of garbage and recycling collection using a swarm of robots. Computational algorithms inspired by nature, such as PSO, have been successfully applied to a range of optimization problems. Our idea is to train a number of robots to interact with each other, attempting to simulate the way a collective of animals behave, as a single cognitive entity. What we have achieved is a swarm of robots that interacts like a swarm of insects, cooperating with each other accurately and efficiently. We describe the two different PSO topologies implemented, showing the results obtained, a comparative evaluation, and an explanation of the rationale behind the choices of topologies that enhanced the PSO algorithm.