“The port of New York and New Jersey is one of the best ports in the country,” Mr. Wilson said. “This is a huge maritime city, but people don’t always realize it.”

Mr. Wilson and Mr. Foreman had seen friends play with aerial drones, and they began to wonder if there wasn’t a way to make a drone that worked underwater. The challenges are much more complex: For starters, an operator usually can’t see a drone underwater, so it needs to be truly autonomous, using sensors to find its way. And it needs to be able to stabilize itself in powerful, unpredictable currents.

Several large companies, many of them defense contractors, already had products on the market. But for anyone outside the military or deep-pocketed energy firms, they are prohibitively expensive, often costing well above $100,000.

Mr. Wilson and Mr. Foreman founded Duro to develop a cheaper model that city governments and environmental groups could afford.

The obvious next step would have been to relocate to California, where the engineering talent and investor capital are. But the duo figured they would have a hard time getting noticed there. “We could never do what we do in San Francisco,” said Mr. Wilson, implying that their project would get lost in the shuffle there.

To many entrepreneurs, New York might not be the ideal alternative. Real estate, labor, regulations — everything is expensive. But Duro — along with many other tech-oriented manufacturers — are noticing what the city has to offer.