Our robot will have two sensors located in front (up & down). It will follow and move along a particular dedicated line/path. The dedicated path/line will have to be marked in the area and garbage will have to put along that line only, in a predesigned bucket. There will be a garbage dumping point also, at different places along the line/path. Robot will start from one dumping point.
While moving, if it detects garbage, its upper sensor output becomes low and lower sensor output becomes high, which in turns activate the motor of the arm of the robot, which helps it to collect garbage and put it into a box. Thereafter, again it starts its forward movement and go on collecting the garbage put along the path. While collecting garbage if its container capacity is full then, it starts moving backward and follow the same particular line until it reaches a point of the nearest dumping ground and send a signal to authorities from where the garbage box is emptied manually, and again it is made ready for work.
While moving, if it encounters any obstacle, output of both the sensor will be high. It will stop moving and after few moment send a signal to authorities, in the nearest control room. The representative from control room will come and remove the obstacle and it will start moving.
The robot can also sense Fire. While moving, if it senses a fire, it will stop moving and send a signal to the nearest control room authorities. Then, it is operated through gesture, until it stops sensing fire.