Most human drivers would agree that Boston can be a difficult city to drive in. So you might excuse autonomous vehicles for running into a few challenges — though not literally.

From narrow streets to double-parked vehicles to the so-called “Boston left,” self-driving cars have encountered a number of “novel roadway conditions” during the last two years of testing, as one self-driving car company eloquently described it.

Then again, what better place to learn?

Kris Carter, the co-chairman of the mayor’s Office of New Urban Mechanics, which oversees the city’s autonomous vehicle program, said that the “unique challenges” of Boston’s roads, weather, and fellow drivers “are exactly the kind of things that [the companies] feel like they need to solve for this to be an actual transformative piece of technology.”

Advertisement

Two MIT-spinoff companies are currently testing in parts of Boston: Optimus Ride and nuTonomy, which is also testing in Las Vegas, Pittsburgh, and Singapore. According to Carter, what they learn in Boston will be able to be applied to cars in other, perhaps easier-to-drive places.

Carter said the companies have logged “well over 1,000 miles” of autonomous vehicle driving in Boston, though most of it has been limited to designated testing areas.

Optimus Ride is currently testing only in the Raymond L. Flynn Marine Park and a few other parts of the Seaport District controlled by Massport, as well as in Weymouth’s Union Point.

NuTonomy has a little more free reign. The company, which had been testing in the South Boston waterfront, was given citywide testing approval in June but must notify city officials before mapping or testing in a new neighborhood. In July, nuTonomy expanded mapping activities in the Seaport and South Boston.

Advertisement

In June, Baker’s administration signed off on an agreement between state and local officials to expand autonomous vehicle testing to 15 other Massachusetts communities (mostly Boston suburbs, as well as Worcester) and all state-owned roadways.

Carter added a fourth reason to that list — the region’s “immense amount of engineering and technical talent” — but he admitted the city’s winding, narrow streets, fluctuating weather, and notorious drivers are another draw for self-driving car companies trying to work out the finer points of autonomous urban transportation.

“Deploying vehicles in a variety of unique urban environments — from Boston to Vegas to Singapore — has allowed us to develop an autonomous driving system that operates safely and intelligently in different and unique situations,” a spokesperson for Aptiv, the parent company of nuTonomy, told Boston.com.

Advertisement

The company has employed some diplomatic language to describe the challenges of navigating Boston’s streets, particularly upon its recent expansion into Southie.

“In South Boston, we observed a set of novel roadway conditions during mapping,” nuTonomy wrote in a second quarter report filed with the city last month.

“The most notable was the varying width of the roadways. Some South Boston streets are extremely narrow,” they wrote. “Others have a lane-and-a-half in each direction.”

According to the company, the tests are showing that the neighborhood’s narrow streets make it difficult for a self-driving car when two vehicles need to pass side-by-side.

“This means we sometimes encounter situations in which cars travel more closely than usual or drive outside of standard lane boundaries,” Aptiv’s spokesperson said, adding the company should be able to determine “the best method to safely travel on these roads” with continued mapping and off-road testing.

That’s not all the vehicles are facing.

“There is also variation in how parked cars are oriented into the roadway, which affects traffic patterns in the roadway and can occlude objects,” nuTonomy wrote in its second quarter report.

nuTonomy’s spokesperson says that while the majority of streets in South Boston present “traditional parking formats,” there are “a few unique cases, including angled parking.”

In conversations with the city, Carter says the self-driving car companies color in some of the “creative language” they use to describe certain issues with which residents may already be familiar. For example, “a few of those unique cases” that nuTonomy encountered in South Boston include the neighborhood’s affinity for double parking.

“It’s hard for autonomous vehicles to understand what to do in that scenario,” Carter said. “Over time, they learn. But to just have a vehicle that’s sort of stopped, no flashers on, and just sort of parked there is annoying and frustrating to a human driver, but certainly confounding to a computer driver.”

Meanwhile in the Flynn Marine Park, Optimus Ride has had its own challenging encounters, which the company mostly attributed to worn-off lane markings due to “harsh winters and frequent construction.” While hardly an issue exclusive to Boston, the company suggested in its second-quarter report that the city re-painted the lane markings, which helped their vehicles to better judge their position.

But autonomous vehicles weren’t the only ones having trouble.

“Many of the lane markings have not been maintained,” the company wrote. “As a result, Optimus Ride has found that human drivers find it difficult to follow traffic rules as other drivers are constantly violating the rules. Additionally, the lane markings delineating bicycle paths are worn and invisible in many areas, creating confusing and potentially hazardous conditions for pedestrians, bikers, and drivers alike.”

Optimus Ride did not respond for requests for comment.

During the winter, Optimus Ride encountered similar issues due to unplowed or partly plowed roads. The company wrote in its first-quarter report that it was difficult for its cars to know whether they were within their lanes when markings were obstructed by snow. They also observed that the sun glare reflecting from snowbanks and icy roads can affect the vehicles.

Still, though human drivers may disagree, Optimus Ride said that type of inclement, fluctuating weather is what makes Boston “ideal” testing grounds.

“In the preceding months, our cars have experienced snow, ice, heavy wind, rain storms, fog, and subsequently street flooding,” the company wrote. “Each weather condition enables us to test and collect data so we can learn how our vehicles perform in those circumstances.”

The future of autonomous vehicles in Boston

Carter said the city has heard the feedback from self-driving car companies and subsequently reviewed how “streets are maintained in terms of lane markings or how inclement weather is managed.” But that doesn’t mean they’re going to design the city primarily for autonomous vehicles.

The city’s current priority, as outlined by the Go Boston 2030 report, is to make Boston more amenable to pedestrians and sustainable modes of transportation, such as by adding more dedicated lanes for bikes and buses.

“We’re designing our streets for the movement of people, prioritizing for transit and for bicycles and pedestrians and active modes — and not at this time deviating to enable a certain type of technology outside of that,” Carter said. “But it’s helpful learning as we go forward.

But that doesn’t mean the two priorities are at odds. Walsh has cast self-driving cars as potential means of supporting and connecting the city’s mass transit infrastructure.

“If deployed thoughtfully, shared fleets of autonomous vehicles could offer the City of Boston the potential to improve safety on our streets, provide equitable connections to the MBTA, and offer a new source of mobility to all Boston residents,” the mayor said in June. The MBTA also mentioned the possibility of autonomous buses in a recent draft document outlining the agency’s future plans and ideas.

Carter said the challenges identified by autonomous vehicles have also been instructive for the city as officials plan and develop policies to promote more sustainable transportation. In the case of protected bike lanes, the two goals actually go together, he said. Whether curbed-in or separated by flex posts, protected bikes lanes are helpful for autonomous vehicles and safer for cyclists.

“It gives a little bit more clarity about where they expect somebody to be at any given time,” Carter said.

“The assumption is that people double park when there’s no space open at the curb for them to legally pull into,” Carter said.

A simulation run by the World Economic Forum and Boston Consulting Group earlier this year found that future autonomous transportation could, in addition to making travel more efficient, eliminate the need of 48 percent of the current parking spaces in Boston.

“We have some big potential to make living in Boston easier — whether that’s hopefully having more affordable housing or more housing for people in the middle class, being able to open up our streets for more transit and bicycle and pedestrian opportunities — purely by this one piece of technology grabbing hold in the right way,” Carter said.

The timeline for when that changes takes hold is a bit less clear. Carter likes to say “we’ll have a few things in a couple years, and we’ll have lots of things in 40 years,” noting that Boston be on the heels of the increased embrace of autonomous driving in warmer climates, like Arizona.

For now, self-driving cars are still trying to work out the eccentricities of Boston, so they can apply those learnings more broadly. And there are plenty of smaller takeaways that are helpful for both the companies and the cities in which they’re testing.

“It’s hard for them to gauge when exactly,” he said. “They’ll be incredibly conservative.”

Figuring out how to handle those situations is something that will be valuable for autonomous vehicles at intersections across the world, not just Boston. But it also gives cities a reason to make those four-way intersections easier, since it isn’t only computer drivers that struggle with them, according to Carter.

“We’re not particularly good at it,” he said. “There are certainly crashes that happen at those intersections. It’s unsafe for pedestrians as well.”

Carter said that improvements, such as signalized lefthand turns or lefthand turn pockets, would make such intersections “safer for any kind of driver, whether it’s human or robot.”

“If you think of an autonomous vehicle as like a really conservative driver — which there aren’t that many of in Boston, probably — there are a lot of win-win-wins that are here for everybody,” he said.