BOSTON — Self- driving cars may not hit the road in earnest for many years - but autonomous boats could be just around the pier.

Spurred in part by the car industry’s race to build driverless vehicles, marine innovators are building automated ferry boats for Amsterdam canals, cargo ships that can steer themselves through Norwegian fjords and remote-controlled ships to carry containers across the Atlantic and Pacific. The first such autonomous ships could be in operation within three years.

One experimental workboat spent this summer dodging tall ships and tankers in Boston Harbor, outfitted with sensors and self-navigating software and emblazoned with the words “UNMANNED VESSEL” across its aluminum hull.

“We’re in full autonomy now,” said Jeff Gawrys, a marine technician for Boston startup Sea Machines Robotics, sitting at the helm as the boat floated through a harbor channel.