Software engineering plays a key role in state-of-the-art robotics where more effective and efficient software development solutions are needed for implementation and integration of advanced robotics capabilities. Component-based software engineering and model-driven software development are two paradigms suitable to deal with such challenges. This paper presents the analysis, design, and implementation of control software for an Autonomous Underwater Vehicle (AUV). The software development stages are carried out by using a model-driven toolchain that provides support to design and build component-based software for robotics applications. A case study of a high-performance AUV control application and experimental results from a software schedulability analysis are presented.