SAN FRANCISCO—On a sunny day here in the residential Potrero Hill neighborhood, a 3-foot-tall robot named Scrappy went out for a stroll.

Box-shaped, mounted on four rubber wheels and outfitted with a high-tech array of sensors and cameras, Scrappy is part of a team of robots surveying the sidewalk landscape for Marble, a robotics startup here. For now, the robots are taking their walks with Marble executives or employees. Within a year, the company aims to have the majority of San Francisco’s sidewalks three-dimensionally...