It may seem uncomfortably close to science fiction, but robots are moving ever nearer to acquiring humanlike abilities to see, smell and sense their surroundings, allowing them to operate more independently and perform some of the dangerous, dirty and dull jobs people don't want to do.

They can smell gas leaks, conduct underwater surveillance and even sort boxes by shape and color and toss them into the appropriate warehouse bin. Advances in sensor technology and software allow these machines to make split-second decisions without human masters overseeing them about how to follow a scent trail or where to go to next.

"They are gaining human capabilities, whether it's smell or touch or recognizing our voices," said Daniel Wilson, who has a doctorate in robotics and authored "Robopocalypse," a techno-thriller about what happens when robots go wrong.