Ontologies provide a common conceptualisation that can be shared by all stakeholders in an engineering development process. They provide a good means to analyse the domain, allowing to separate descriptive from problem-solving knowledge. Our research programme on autonomous systems considered an ontology as the adequate mechanism to conceptualise the autonomous systems domain, and the software engineering techniques applied to such systems. This paper describes the ontological engineering process of such an ontology: OASys (Ontology for Autonomous Systems). Its development considered different stages: the specification of the requirements to be fulfilled by the ontology; the extraction of the actual features needed to implement the desired requirements; the conceptualisation phase with the design decisions to integrate the different domains, theories and techniques addressed by the ontological elements; and finally, the implementation of the ontology, which integrates both ontology engineering and software engineering approaches by using UML as the implementation language.