5 * Created by Frédéric D'HAEYER on 21/05/10.
6 * Copyright 2010 Parrot SA. All rights reserved.
9 #ifndef _ARDRONE_TYPES_H_
10 #define _ARDRONE_TYPES_H_
11 #include "ARDroneGeneratedTypes.h"
14 * Define the command identifiers from drone to Game Engine
18 ARDRONE_COMMAND_PAUSE,
20 } ARDRONE_COMMAND_OUT;
23 * Define the command identifiers from Game Engine to drone
26 ARDRONE_COMMAND_ISCLIENT, // Command to set if the multiplayer is client
27 ARDRONE_COMMAND_DRONE_ANIM, // Command to set a drone animation
28 ARDRONE_COMMAND_DRONE_LED_ANIM, // Command to set a drone led animation
29 ARDRONE_COMMAND_SET_CONFIG, // Command to set a drone configuration key
30 ARDRONE_COMMAND_ENABLE_COMBINED_YAW,// Command to enable / disable combined yaw command.
31 ARDRONE_COMMAND_VIDEO_CHANNEL, // Command to set the channel of video -- DEPRECATED
32 ARDRONE_COMMAND_CAMERA_DETECTION, // Command to set camera type for detection. -- DEPRECATED
33 ARDRONE_COMMAND_ENEMY_SET_PARAM, // Command to set enemy parameter for detection (color and hull). -- DEPRECATED
34 ARDRONE_COMMAND_SET_FLY_MODE, // Command to change flying mode -- DEPRECATED
37 typedef void (*command_in_configuration_callback)(int result);
41 ARDRONE_COMMAND_IN command;
42 command_in_configuration_callback callback;
44 } ARDRONE_COMMAND_IN_WITH_PARAM;
47 ARDRONE_FLYING_STATE_LANDED = 0,
48 ARDRONE_FLYING_STATE_FLYING,
49 ARDRONE_FLYING_STATE_TAKING_OFF,
50 ARDRONE_FLYING_STATE_LANDING,
51 } ARDRONE_FLYING_STATE;
55 ARDRONE_ENEMY_COLOR color;
56 int outdoor_shell; // 1 if enemy has outdoor shell, else 0
57 } ARDRONE_ENEMY_PARAM;
61 ARDRONE_LED_ANIMATION led_anim;
63 unsigned int duration;
64 } ARDRONE_LED_ANIMATION_PARAM;
68 ARDRONE_ANIMATION drone_anim;
70 } ARDRONE_ANIMATION_PARAM;
72 /* Comments are used for autogeneration
73 * Do not modify these !
75 // MATCH_TYPES : int : int32_t bool_t
76 // MATCH_TYPES : unsigned int : uint32_t
77 // MATCH_TYPES : float : float32_t
78 // MATCH_TYPES : double : float64_t
79 /* End of autogeneration comments */
83 ARDRONE_CONFIG_KEYS config_key;
85 } ARDRONE_CONFIG_PARAM;
88 * Define what a 3D vector is
99 * Define a structure to collect drone's navigation data
104 * Translation speed of the drone, in meters per second
106 ARDroneVector3D linearVelocity;
109 * Rotation speed of the drone, in degré
111 ARDroneVector3D angularPosition;
114 * Navdata video num frames to synchronized Navdata with video
116 int navVideoNumFrames;
119 * Video num frames to synchronized Navdata with video
124 * Value indicates drone flying state (see ARDRONE_FLYING_STATE enum)
126 ARDRONE_FLYING_STATE flyingState;
129 * int indicates drone is in emergency state (1 if is in emergency, 0 else)
134 * Camera detection type
136 ARDRONE_CAMERA_DETECTION_TYPE detection_type;
139 * Number of finish lines detected
141 unsigned int finishLineCount;
144 * Number of double taps detected
146 unsigned int doubleTapCount;
149 * Tells the application that the ardrone engine is done with initial configuration so the application can send their own configs
150 * (1 if application can send config, 0 otherwise)
154 ARDroneNavigationData;
157 * Define a structure to exchange an enemy data
162 * Position of the enemy (between -1.0 and 1.0)
164 ARDroneVector3D position;
167 * Size of the enemy (between 0.0 and 2.0)
172 * Angle of the enemy (between -90.0° and 90.0°)
174 float orientation_angle;
179 * Define a structure to exchange camera parameters compute by detection
184 * Rotation matrix of camera
186 float rotation[3][3];
189 * Translation matrix of camera
191 float translation[3];
194 * Index of tag detected
198 ARDroneDetectionCamera;
201 * Define a structure to exchange camera parameters compute by drone
206 * Rotation matrix of camera
208 float rotation[3][3];
211 * Translation matrix of camera
213 float translation[3];
218 * Define a structure to exchange all enemies data
228 * Pointer to an array that contains the data structure of each enemy
230 ARDroneEnemyData data[ARDRONE_MAX_ENEMIES];
234 #endif // _ARDRONE_TYPES_H_