When John F. Kennedy Jr.'s plane went down off the coast of Martha's Vineyard, Adtech Technologies Group in Upper Marlboro was among the first to be summoned.

Adtech made and maneuvered the Navy's dog-sized unmanned robot that trolled the waters and eventually located the wreckage. The 3,500-pound Deep Drone diving machines that the firm also makes and operates located and plotted hundreds of pieces of TWA flight 800 wreckage in Long Island Sound after the July 17, 1996, crash.

Adtech, a subsidiary of Houston-based Oceaneering International Inc., also designs and manufactures the sharks and monsters that jump out at thrill seekers at theme park rides.

Now Adtech is tackling the extreme technological challenges of a far more mundane task: creating a semi-automated robot to paint 100-foot-tall sides of Navy warships. After winning a $4.4 million Navy contract in June, the company began developing a prototype of the robot, which could take five years to complete.

Long the bane of Navy sailors, ship painting is now done manually by a crew of 20. It takes up to a year and 21,000 gallons of epoxy paint applied in five layers to cover the three-acre surface of a Navy aircraft carrier, for instance. It's a messy process, and human error makes for an uneven coat that chips easily.

Adtech plans to replace the painters with a giraffe-like robot whose long neck extends from a small, compact body and ends in a cone-shaped head housing paint nozzles.

The new process, known by its military acronym as APACTS (for Automated Paint Application Containment and Treatment System), is meant to reduce paint usage, environmental waste and labor. The new system will contain excess paint and collect heavy metal contaminants and noxious fumes that otherwise would foul air and water.

Driving this development are the Clean Air Act and Clean Water Act, with their mandates for stricter environmental compliance, said Jerry Bohlander, materials engineer for the Naval Surface Warfare Center in Carderock, which tests naval ships.

"The regulatory requirements that the Navy has to meet are complex because there are several states [where the Navy uses shipyards] with different regulations based on EPA recommendations," Bohlander said. With new technology available, the Navy is "pushing the envelope" and trying to develop a uniform system of compliance, he said.

The Navy is still studying costs and benefits of the project, but some savings are already evident, said William Thomas, an environmental protection specialist at the center. When ship painters do the job manually, as much as 30 percent of the paint used is wasted, depending on conditions. The new device should reduce waste by 95 percent, Thomas said.

Adtech has been in Upper Marlboro since 1984, when it was known as East Port International. In 1992, it was bought by Oceaneering, a $400-million-a-year oil services company. About half of Adtech's roughly $100 million annual revenue comes from Navy contracts.

All of its machines are designed, constructed and tested at its Upper Marlboro site, where Adtech has an 85,000-square-foot warehouse and a 20-foot-deep testing tank.

Adtech has also been working on a $2.5 million Navy project to design and build a ship cleaning system that can scour grass, barnacles and paint chips off the bottom of ships with rotating bristles that capture all of the debris. The company has spent the last five years testing different cleaning tools, trying to get better traction and suction for the device, and will build and test a prototype on site next year, said Adtech Project Manager Lawrence Karl.

Adtech and the Navy are now in the process of determining requirements for the new paint robot: how fast it will paint, how it will be controlled, how many types of paint it will have to handle, and the mechanics of how it will reach from a ship's deck to its keel. Of the company's 170-person local work force, 80 are full-time staff engineers.

The technical challenges center on creating a machine that can apply paint smoothly and uniformly without touching a ship's curved side or scraping wet paint, Karl said. The drop in price for faster computer technology has enabled Adtech to develop more complex robotic controls, and a new "vacuum shroud" is enabling more of the paint overspray to be captured, he said.

If all works out, the new device's speed and safety advantages "will revolutionize the painting industry," Karl said.

Adtech believes the potential commercial market for the robot is huge, and private ship maintenance companies have already called to find out when it would be available.

Beyond painting commercial ships, the robot could be redesigned to paint huge structures such as the Chesapeake Bay Bridge, currently a $76 million task, according to Karl.

"It's costing them more to paint it than it did to build it," he said.