Changes between Version 17 and Version 18 of pps/tutorial
- Timestamp:
- Sep 21, 2010, 10:22:15 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pps/tutorial
v17 v18 45 45 We created for you the skeleton of an autonomous drone. You can find the code in the files ''src/orxonox/worldentities/AutonomousDrone.{cc|h}'' and ''src/orxonox/controllers/AutonomousDroneController.{cc|h}''. 46 46 47 1. Open the file ''AutonomousDrone.cc'' and have a look at the code (''src/orxonox/ controllers/'').47 1. Open the file ''AutonomousDrone.cc'' and have a look at the code (''src/orxonox/worldentities/''). 48 48 2. In order to be able to create an AutonomousDrone object from the XML file or somewhere else just by the class name, you need to add a call of ''CreateFactory(Classname)'' somewhere inside the ''.cc'' (global, inside the namespace). 49 49 {{{ … … 65 65 == The AutonomousDroneController == 66 66 Now you will finish the AutonomousDroneController which gets called each tick and steers the drone. 67 1. Open the file ''AutonomousDroneController.cc'' and look at it .67 1. Open the file ''AutonomousDroneController.cc'' and look at it (''src/orxonox/controllers/''). 68 68 2. Have a look at the constructor and make sure nothing is missing (think of the core). 69 69 3. now look at the tick function. it gets called each time before a new frame is drawn. you can put in some steering code here. if you want you can use some functions provided by Math.h: