Making shooing gestures with his hands, Ahti Heinla, an engineer who helped start Skype, stood on Balboa Street in San Francisco. “Can you come out of the way for the robots?” he said to an assembled scrum of journalists. “They’re programmed to not crash into people.”

The crowd parted, and two small six-wheeled robots trundled past them at a steady 4 mph, lights flickering around their edges and on a protruding antenna. They glided down the Richmond District’s broad sidewalks, occasionally pausing and zigzagging when they encountered obstacles.

They pulled up outside a house on 20th Avenue. As the resident, Julie O’Keefe, came outside, one robot’s lid popped open revealing a box of pastries.

“I got a delivery from a little roaming cooler, it looks like,” she said delightedly.

It was a test of robot couriers from Starship Technologies, an Estonian company that’s among several contenders seeking to crack the last-mile challenge — getting goods from warehouses or retail storefronts to homes. While Amazon is testing deliveries with flying drones, Starship is one of many upstarts trying a more earthbound approach. Heinla, its CEO, started the company with Skype co-founder Janus Friis after entering a NASA contest to build robots to collect rock samples on Mars and the moon.

“We didn’t win, but that team became the engineering team for Starship,” Heinla said.

Starship’s “friendly sidewalk robots” are designed to deliver parcels, groceries and other goods within a 2-mile radius, the company said, operating as a local on-demand service, rather than competing with the likes of FedEx and UPS.

While they drive — or roll — autonomously using nine cameras, GPS, sophisticated software and Starships’s own maps, which are accurate to the nearest inch, they are monitored by humans in a remote location who can take over control if need be.

Starship plans to have 100 robots per human operator and to rent them out to other businesses on demand. To start, each delivery might cost a few dollars, Heinla said, but eventually the cost could be pennies per delivery.

Starship asked San Francisco for permission to do the test. After a few days of pondering, the Department of Public Works decided that a temporary occupancy permit ($66 per side of a block) would be just the ticket.

That’s not a citywide solution, so Starship is talking to San Francisco, among many other cities, about passing laws to enable its brood to hit the streets. Washington this year became the first U.S. city to legalize “personal delivery devices” powered by electric motors on its sidewalks. That will enable Starship to do more extended tests of its R2-D2-like brood there later this year.

Other companies working on delivery robots include San Jose’s Fetch Robotics, which has $23 million in funding; San Francisco’s Marble, which is still in stealth mode; South San Francisco’s Dispatch Robotics, doing testing on college campuses; and Robby Technologies, which recently graduated from the Y Combinator accelerator and soon will begin a pilot program with Instacart. At least three Chinese companies, including e-commerce giants Alibaba and JD.com, are also developing robotic couriers.

Starship is testing the robots in Europe with commercial partners like London’s Just Eat and Pronto food-delivery companies; the Swiss Post; and Germany’s Hermes delivery service. This month it partnered with Mercedes-Benz to develop and test Robovan, which will use the carmaker’s Sprinter vans as mother ships for eight delivery robots.

The European test robots have logged some 8,000 miles and encountered more than a million pedestrians. “We were worried people would be afraid and would call the police, but most people don’t give them a second look,” Heinla said.

O’Keefe was selected randomly by a company rep knocking on doors to ask for volunteers. She was the first person he asked and was tickled to have such futuristic technology come to the door of the house she’s lived in since her birth 67 years ago.

She and her friend Ann Green watched wistfully as one of the robots whizzed away.

“Goodbye, R2-D2,” Green called after it. “What would our grandparents say?” she added, shaking her head.

Carolyn Said is a San Francisco Chronicle staff writer. Email: csaid@sfchronicle.com Twitter: @csaid