Fire car with obstacle avoidance

I would think that your robot is going to need to operate in several modes: idle, driving around, moving towards fire and spraying water.

That kind of thing is often handled by a state machine q.v.

The other trick is to build the smallest possible part of the project and test it before adding more code.