According to some papers about robotics soccer Ontology Driven Development of Domain-Specific Languages, 2000 and Domain knowledge for surveillance applications, 2007, i need an ontology for programming my robot control system. The main idea is to describe the domain with a vocabulary plus an inheritance network. But how exactly this can be done? In the literature are two main strategies: the first one is using Semantic Web technology like RDF-Triples and DAML Markup Language for the agents. The second strategy uses normal C++ structs which are enhanced with methods. A working example is given here Grounding Robot Sensory and Symbolic Information using the Semantic Web, 2003 on page 8 a complete robot ontology is in the figure. But this time as some kind of UML chart. Is using a robot ontology really a good idea?
If your main question is how to work through your ontology (i.e. after defining your vocabulary you want to generate a rdf or owl file) you can look into some tools like Protege, which is a quite well know and well-documented tool for developing ontologies. Although, this will only help you on creating the knowledge representation (KR). If you want to use it effectively for programming your robot control system, you will need to query this KR using some query language like SWRL or SPARQL.
Also, if you are thinking about developing this for your case maybe you should take a look at some standards that exist concerning ontologies for robotics IEEE ORA-P1872