laws and political dynamics prevent most development that changes the size of buildings, their historic appearance or building heights in the city. There is, though, a large quantity of already existing ground-level space in the city that could be used for housing: the city's abundant street-level garages.
San Francisco is full of ugly street-level garages - numerous streets dominated by big, blank, boring garage doors. Many of these could be turned into attractive new street-level apartments without significantly changing the height, character or general appearance of the neighborhood.
At the moment this isn't really an option because even in a highly walkable city, people want their cars. Current residents in these buildings don't want to give up their garages for conversion, and even if they did, they likely wouldn't legally be allowed to, thanks to opposition from neighbors who wouldn't want to make it harder to find "free" street parking.
The development of very cheap, always available self-driving taxi services will likely change this dynamic, at least in dense cities. These services will make personal car ownership --which comes with the need to find a place to park your car the 90% of the time it is not in use-- far less appealing. The fewer people who own cars, the fewer who will want to waste very valuable space for storing cars.
San Francisco has 379,597 housing units. Even if just 10% of all housing units (37,900) have existing ground-level garages that could be converted into apartments, that would still be a significant increase in the housing supply. By comparison, in 2014 the city had a net increase of only 3,514 units.