27 #ifdef NAVDATA_STRUCTS_INCLUDES 28 #include "ardrone_autonomy/navdata_demo.h" 29 #include "ardrone_autonomy/navdata_time.h" 30 #include "ardrone_autonomy/navdata_raw_measures.h" 31 #include "ardrone_autonomy/navdata_phys_measures.h" 32 #include "ardrone_autonomy/navdata_gyros_offsets.h" 33 #include "ardrone_autonomy/navdata_euler_angles.h" 34 #include "ardrone_autonomy/navdata_references.h" 35 #include "ardrone_autonomy/navdata_trims.h" 36 #include "ardrone_autonomy/navdata_rc_references.h" 37 #include "ardrone_autonomy/navdata_pwm.h" 38 #include "ardrone_autonomy/navdata_altitude.h" 39 #include "ardrone_autonomy/navdata_vision_raw.h" 40 #include "ardrone_autonomy/navdata_vision_of.h" 41 #include "ardrone_autonomy/navdata_vision.h" 42 #include "ardrone_autonomy/navdata_vision_perf.h" 43 #include "ardrone_autonomy/navdata_trackers_send.h" 44 #include "ardrone_autonomy/navdata_vision_detect.h" 45 #include "ardrone_autonomy/navdata_watchdog.h" 46 #include "ardrone_autonomy/navdata_adc_data_frame.h" 47 #include "ardrone_autonomy/navdata_video_stream.h" 48 #include "ardrone_autonomy/navdata_games.h" 49 #include "ardrone_autonomy/navdata_pressure_raw.h" 50 #include "ardrone_autonomy/navdata_magneto.h" 51 #include "ardrone_autonomy/navdata_wind_speed.h" 52 #include "ardrone_autonomy/navdata_kalman_pressure.h" 53 #include "ardrone_autonomy/navdata_hdvideo_stream.h" 54 #include "ardrone_autonomy/navdata_wifi.h" 55 #include "ardrone_autonomy/navdata_zimmu_3000.h" 56 #include <std_msgs/UInt16.h> 57 #include <std_msgs/UInt32.h> 58 #include <std_msgs/Float32.h> 59 #include <std_msgs/Int32.h> 60 #include <std_msgs/Int16.h> 61 #include <std_msgs/UInt8.h> 62 #include <ardrone_autonomy/vector31.h> 63 #include <ardrone_autonomy/vector21.h> 64 #include <ardrone_autonomy/matrix33.h> 67 #ifdef NAVDATA_STRUCTS_HEADER_PUBLIC 68 void PublishNavdataTypes(
const navdata_unpacked_t &n,
const ros::Time &received);
71 #ifdef NAVDATA_STRUCTS_HEADER_PRIVATE 73 bool enabled_navdata_demo;
74 ardrone_autonomy::navdata_demo navdata_demo_msg;
76 bool enabled_navdata_time;
77 ardrone_autonomy::navdata_time navdata_time_msg;
79 bool enabled_navdata_raw_measures;
80 ardrone_autonomy::navdata_raw_measures navdata_raw_measures_msg;
82 bool enabled_navdata_phys_measures;
83 ardrone_autonomy::navdata_phys_measures navdata_phys_measures_msg;
85 bool enabled_navdata_gyros_offsets;
86 ardrone_autonomy::navdata_gyros_offsets navdata_gyros_offsets_msg;
88 bool enabled_navdata_euler_angles;
89 ardrone_autonomy::navdata_euler_angles navdata_euler_angles_msg;
91 bool enabled_navdata_references;
92 ardrone_autonomy::navdata_references navdata_references_msg;
94 bool enabled_navdata_trims;
95 ardrone_autonomy::navdata_trims navdata_trims_msg;
97 bool enabled_navdata_rc_references;
98 ardrone_autonomy::navdata_rc_references navdata_rc_references_msg;
100 bool enabled_navdata_pwm;
101 ardrone_autonomy::navdata_pwm navdata_pwm_msg;
103 bool enabled_navdata_altitude;
104 ardrone_autonomy::navdata_altitude navdata_altitude_msg;
106 bool enabled_navdata_vision_raw;
107 ardrone_autonomy::navdata_vision_raw navdata_vision_raw_msg;
109 bool enabled_navdata_vision_of;
110 ardrone_autonomy::navdata_vision_of navdata_vision_of_msg;
112 bool enabled_navdata_vision;
113 ardrone_autonomy::navdata_vision navdata_vision_msg;
115 bool enabled_navdata_vision_perf;
116 ardrone_autonomy::navdata_vision_perf navdata_vision_perf_msg;
118 bool enabled_navdata_trackers_send;
119 ardrone_autonomy::navdata_trackers_send navdata_trackers_send_msg;
121 bool enabled_navdata_vision_detect;
122 ardrone_autonomy::navdata_vision_detect navdata_vision_detect_msg;
124 bool enabled_navdata_watchdog;
125 ardrone_autonomy::navdata_watchdog navdata_watchdog_msg;
127 bool enabled_navdata_adc_data_frame;
128 ardrone_autonomy::navdata_adc_data_frame navdata_adc_data_frame_msg;
130 bool enabled_navdata_video_stream;
131 ardrone_autonomy::navdata_video_stream navdata_video_stream_msg;
133 bool enabled_navdata_games;
134 ardrone_autonomy::navdata_games navdata_games_msg;
136 bool enabled_navdata_pressure_raw;
137 ardrone_autonomy::navdata_pressure_raw navdata_pressure_raw_msg;
139 bool enabled_navdata_magneto;
140 ardrone_autonomy::navdata_magneto navdata_magneto_msg;
142 bool enabled_navdata_wind_speed;
143 ardrone_autonomy::navdata_wind_speed navdata_wind_speed_msg;
145 bool enabled_navdata_kalman_pressure;
146 ardrone_autonomy::navdata_kalman_pressure navdata_kalman_pressure_msg;
148 bool enabled_navdata_hdvideo_stream;
149 ardrone_autonomy::navdata_hdvideo_stream navdata_hdvideo_stream_msg;
151 bool enabled_navdata_wifi;
152 ardrone_autonomy::navdata_wifi navdata_wifi_msg;
154 bool enabled_navdata_zimmu_3000;
155 ardrone_autonomy::navdata_zimmu_3000 navdata_zimmu_3000_msg;
157 bool enabled_legacy_navdata;
159 bool initialized_navdata_publishers;
162 #ifdef NAVDATA_STRUCTS_INITIALIZE 163 if(!initialized_navdata_publishers)
165 initialized_navdata_publishers =
true;
168 if(enabled_legacy_navdata)
170 navdata_pub = node_handle.advertise<ardrone_autonomy::Navdata>(
"ardrone/navdata", 200);
171 imu_pub = node_handle.advertise<sensor_msgs::Imu>(
"ardrone/imu", 200);
172 mag_pub = node_handle.advertise<geometry_msgs::Vector3Stamped>(
"ardrone/mag", 200);
174 odo_pub = node_handle.advertise<nav_msgs::Odometry>(
"ardrone/odometry", 200);
179 if(enabled_navdata_demo)
181 pub_navdata_demo = node_handle.advertise<ardrone_autonomy::navdata_demo>(
"ardrone/navdata_demo",
NAVDATA_QUEUE_SIZE);
187 if(enabled_navdata_time)
189 pub_navdata_time = node_handle.advertise<ardrone_autonomy::navdata_time>(
"ardrone/navdata_time",
NAVDATA_QUEUE_SIZE);
194 ros::param::param(
"~enable_navdata_raw_measures", enabled_navdata_raw_measures,
false);
195 if(enabled_navdata_raw_measures)
197 pub_navdata_raw_measures = node_handle.advertise<ardrone_autonomy::navdata_raw_measures>(
"ardrone/navdata_raw_measures",
NAVDATA_QUEUE_SIZE);
202 ros::param::param(
"~enable_navdata_phys_measures", enabled_navdata_phys_measures,
false);
203 if(enabled_navdata_phys_measures)
205 pub_navdata_phys_measures = node_handle.advertise<ardrone_autonomy::navdata_phys_measures>(
"ardrone/navdata_phys_measures",
NAVDATA_QUEUE_SIZE);
210 ros::param::param(
"~enable_navdata_gyros_offsets", enabled_navdata_gyros_offsets,
false);
211 if(enabled_navdata_gyros_offsets)
213 pub_navdata_gyros_offsets = node_handle.advertise<ardrone_autonomy::navdata_gyros_offsets>(
"ardrone/navdata_gyros_offsets",
NAVDATA_QUEUE_SIZE);
218 ros::param::param(
"~enable_navdata_euler_angles", enabled_navdata_euler_angles,
false);
219 if(enabled_navdata_euler_angles)
221 pub_navdata_euler_angles = node_handle.advertise<ardrone_autonomy::navdata_euler_angles>(
"ardrone/navdata_euler_angles",
NAVDATA_QUEUE_SIZE);
226 ros::param::param(
"~enable_navdata_references", enabled_navdata_references,
false);
227 if(enabled_navdata_references)
229 pub_navdata_references = node_handle.advertise<ardrone_autonomy::navdata_references>(
"ardrone/navdata_references",
NAVDATA_QUEUE_SIZE);
235 if(enabled_navdata_trims)
237 pub_navdata_trims = node_handle.advertise<ardrone_autonomy::navdata_trims>(
"ardrone/navdata_trims",
NAVDATA_QUEUE_SIZE);
242 ros::param::param(
"~enable_navdata_rc_references", enabled_navdata_rc_references,
false);
243 if(enabled_navdata_rc_references)
245 pub_navdata_rc_references = node_handle.advertise<ardrone_autonomy::navdata_rc_references>(
"ardrone/navdata_rc_references",
NAVDATA_QUEUE_SIZE);
251 if(enabled_navdata_pwm)
253 pub_navdata_pwm = node_handle.advertise<ardrone_autonomy::navdata_pwm>(
"ardrone/navdata_pwm",
NAVDATA_QUEUE_SIZE);
259 if(enabled_navdata_altitude)
261 pub_navdata_altitude = node_handle.advertise<ardrone_autonomy::navdata_altitude>(
"ardrone/navdata_altitude",
NAVDATA_QUEUE_SIZE);
266 ros::param::param(
"~enable_navdata_vision_raw", enabled_navdata_vision_raw,
false);
267 if(enabled_navdata_vision_raw)
269 pub_navdata_vision_raw = node_handle.advertise<ardrone_autonomy::navdata_vision_raw>(
"ardrone/navdata_vision_raw",
NAVDATA_QUEUE_SIZE);
274 ros::param::param(
"~enable_navdata_vision_of", enabled_navdata_vision_of,
false);
275 if(enabled_navdata_vision_of)
277 pub_navdata_vision_of = node_handle.advertise<ardrone_autonomy::navdata_vision_of>(
"ardrone/navdata_vision_of",
NAVDATA_QUEUE_SIZE);
283 if(enabled_navdata_vision)
285 pub_navdata_vision = node_handle.advertise<ardrone_autonomy::navdata_vision>(
"ardrone/navdata_vision",
NAVDATA_QUEUE_SIZE);
290 ros::param::param(
"~enable_navdata_vision_perf", enabled_navdata_vision_perf,
false);
291 if(enabled_navdata_vision_perf)
293 pub_navdata_vision_perf = node_handle.advertise<ardrone_autonomy::navdata_vision_perf>(
"ardrone/navdata_vision_perf",
NAVDATA_QUEUE_SIZE);
298 ros::param::param(
"~enable_navdata_trackers_send", enabled_navdata_trackers_send,
false);
299 if(enabled_navdata_trackers_send)
301 pub_navdata_trackers_send = node_handle.advertise<ardrone_autonomy::navdata_trackers_send>(
"ardrone/navdata_trackers_send",
NAVDATA_QUEUE_SIZE);
306 ros::param::param(
"~enable_navdata_vision_detect", enabled_navdata_vision_detect,
false);
307 if(enabled_navdata_vision_detect)
309 pub_navdata_vision_detect = node_handle.advertise<ardrone_autonomy::navdata_vision_detect>(
"ardrone/navdata_vision_detect",
NAVDATA_QUEUE_SIZE);
315 if(enabled_navdata_watchdog)
317 pub_navdata_watchdog = node_handle.advertise<ardrone_autonomy::navdata_watchdog>(
"ardrone/navdata_watchdog",
NAVDATA_QUEUE_SIZE);
322 ros::param::param(
"~enable_navdata_adc_data_frame", enabled_navdata_adc_data_frame,
false);
323 if(enabled_navdata_adc_data_frame)
325 pub_navdata_adc_data_frame = node_handle.advertise<ardrone_autonomy::navdata_adc_data_frame>(
"ardrone/navdata_adc_data_frame",
NAVDATA_QUEUE_SIZE);
330 ros::param::param(
"~enable_navdata_video_stream", enabled_navdata_video_stream,
false);
331 if(enabled_navdata_video_stream)
333 pub_navdata_video_stream = node_handle.advertise<ardrone_autonomy::navdata_video_stream>(
"ardrone/navdata_video_stream",
NAVDATA_QUEUE_SIZE);
339 if(enabled_navdata_games)
341 pub_navdata_games = node_handle.advertise<ardrone_autonomy::navdata_games>(
"ardrone/navdata_games",
NAVDATA_QUEUE_SIZE);
346 ros::param::param(
"~enable_navdata_pressure_raw", enabled_navdata_pressure_raw,
false);
347 if(enabled_navdata_pressure_raw)
349 pub_navdata_pressure_raw = node_handle.advertise<ardrone_autonomy::navdata_pressure_raw>(
"ardrone/navdata_pressure_raw",
NAVDATA_QUEUE_SIZE);
355 if(enabled_navdata_magneto)
357 pub_navdata_magneto = node_handle.advertise<ardrone_autonomy::navdata_magneto>(
"ardrone/navdata_magneto",
NAVDATA_QUEUE_SIZE);
362 ros::param::param(
"~enable_navdata_wind_speed", enabled_navdata_wind_speed,
false);
363 if(enabled_navdata_wind_speed)
365 pub_navdata_wind_speed = node_handle.advertise<ardrone_autonomy::navdata_wind_speed>(
"ardrone/navdata_wind_speed",
NAVDATA_QUEUE_SIZE);
370 ros::param::param(
"~enable_navdata_kalman_pressure", enabled_navdata_kalman_pressure,
false);
371 if(enabled_navdata_kalman_pressure)
373 pub_navdata_kalman_pressure = node_handle.advertise<ardrone_autonomy::navdata_kalman_pressure>(
"ardrone/navdata_kalman_pressure",
NAVDATA_QUEUE_SIZE);
378 ros::param::param(
"~enable_navdata_hdvideo_stream", enabled_navdata_hdvideo_stream,
false);
379 if(enabled_navdata_hdvideo_stream)
381 pub_navdata_hdvideo_stream = node_handle.advertise<ardrone_autonomy::navdata_hdvideo_stream>(
"ardrone/navdata_hdvideo_stream",
NAVDATA_QUEUE_SIZE);
387 if(enabled_navdata_wifi)
389 pub_navdata_wifi = node_handle.advertise<ardrone_autonomy::navdata_wifi>(
"ardrone/navdata_wifi",
NAVDATA_QUEUE_SIZE);
394 ros::param::param(
"~enable_navdata_zimmu_3000", enabled_navdata_zimmu_3000,
false);
395 if(enabled_navdata_zimmu_3000)
397 pub_navdata_zimmu_3000 = node_handle.advertise<ardrone_autonomy::navdata_zimmu_3000>(
"ardrone/navdata_zimmu_3000",
NAVDATA_QUEUE_SIZE);
405 #ifdef NAVDATA_STRUCTS_SOURCE 406 void ARDroneDriver::PublishNavdataTypes(
const navdata_unpacked_t &n,
const ros::Time &received)
408 if(initialized_navdata_publishers)
412 navdata_demo_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
413 navdata_demo_msg.header.stamp = received;
417 uint16_t c = n.navdata_demo.tag;
421 navdata_demo_msg.tag = m;
425 uint16_t c = n.navdata_demo.size;
429 navdata_demo_msg.size = m;
433 uint32_t c = n.navdata_demo.ctrl_state;
437 navdata_demo_msg.ctrl_state = m;
441 uint32_t c = n.navdata_demo.vbat_flying_percentage;
445 navdata_demo_msg.vbat_flying_percentage = m;
449 float32_t c = n.navdata_demo.theta;
453 navdata_demo_msg.theta = m;
457 float32_t c = n.navdata_demo.phi;
461 navdata_demo_msg.phi = m;
465 float32_t c = n.navdata_demo.psi;
469 navdata_demo_msg.psi = m;
473 int32_t c = n.navdata_demo.altitude;
477 navdata_demo_msg.altitude = m;
481 float32_t c = n.navdata_demo.vx;
485 navdata_demo_msg.vx = m;
489 float32_t c = n.navdata_demo.vy;
493 navdata_demo_msg.vy = m;
497 float32_t c = n.navdata_demo.vz;
501 navdata_demo_msg.vz = m;
505 uint32_t c = n.navdata_demo.num_frames;
509 navdata_demo_msg.num_frames = m;
513 uint32_t c = n.navdata_demo.detection_camera_type;
517 navdata_demo_msg.detection_camera_type = m;
520 pub_navdata_demo.
publish(navdata_demo_msg);
527 navdata_time_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
528 navdata_time_msg.header.stamp = received;
532 uint16_t c = n.navdata_time.tag;
536 navdata_time_msg.tag = m;
540 uint16_t c = n.navdata_time.size;
544 navdata_time_msg.size = m;
548 uint32_t c = n.navdata_time.time;
552 navdata_time_msg.time = m;
555 pub_navdata_time.
publish(navdata_time_msg);
560 if(enabled_navdata_raw_measures && pub_navdata_raw_measures.
getNumSubscribers()>0)
562 navdata_raw_measures_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
563 navdata_raw_measures_msg.header.stamp = received;
567 uint16_t c = n.navdata_raw_measures.tag;
571 navdata_raw_measures_msg.tag = m;
575 uint16_t c = n.navdata_raw_measures.size;
579 navdata_raw_measures_msg.size = m;
582 navdata_raw_measures_msg.raw_gyros.clear();
583 for(
int i=0; i<NB_GYROS; i++)
585 int16_t c = n.navdata_raw_measures.raw_gyros[i];
589 navdata_raw_measures_msg.raw_gyros.push_back(m);
592 navdata_raw_measures_msg.raw_gyros_110.clear();
593 for(
int i=0; i<2; i++)
595 int16_t c = n.navdata_raw_measures.raw_gyros_110[i];
599 navdata_raw_measures_msg.raw_gyros_110.push_back(m);
603 uint32_t c = n.navdata_raw_measures.vbat_raw;
607 navdata_raw_measures_msg.vbat_raw = m;
611 uint16_t c = n.navdata_raw_measures.us_debut_echo;
615 navdata_raw_measures_msg.us_debut_echo = m;
619 uint16_t c = n.navdata_raw_measures.us_fin_echo;
623 navdata_raw_measures_msg.us_fin_echo = m;
627 uint16_t c = n.navdata_raw_measures.us_association_echo;
631 navdata_raw_measures_msg.us_association_echo = m;
635 uint16_t c = n.navdata_raw_measures.us_distance_echo;
639 navdata_raw_measures_msg.us_distance_echo = m;
643 uint16_t c = n.navdata_raw_measures.us_courbe_temps;
647 navdata_raw_measures_msg.us_courbe_temps = m;
651 uint16_t c = n.navdata_raw_measures.us_courbe_valeur;
655 navdata_raw_measures_msg.us_courbe_valeur = m;
659 uint16_t c = n.navdata_raw_measures.us_courbe_ref;
663 navdata_raw_measures_msg.us_courbe_ref = m;
667 uint16_t c = n.navdata_raw_measures.flag_echo_ini;
671 navdata_raw_measures_msg.flag_echo_ini = m;
675 uint16_t c = n.navdata_raw_measures.nb_echo;
679 navdata_raw_measures_msg.nb_echo = m;
683 uint32_t c = n.navdata_raw_measures.sum_echo;
687 navdata_raw_measures_msg.sum_echo = m;
691 int32_t c = n.navdata_raw_measures.alt_temp_raw;
695 navdata_raw_measures_msg.alt_temp_raw = m;
699 int16_t c = n.navdata_raw_measures.gradient;
703 navdata_raw_measures_msg.gradient = m;
706 pub_navdata_raw_measures.
publish(navdata_raw_measures_msg);
711 if(enabled_navdata_phys_measures && pub_navdata_phys_measures.
getNumSubscribers()>0)
713 navdata_phys_measures_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
714 navdata_phys_measures_msg.header.stamp = received;
718 uint16_t c = n.navdata_phys_measures.tag;
722 navdata_phys_measures_msg.tag = m;
726 uint16_t c = n.navdata_phys_measures.size;
730 navdata_phys_measures_msg.size = m;
734 float32_t c = n.navdata_phys_measures.accs_temp;
738 navdata_phys_measures_msg.accs_temp = m;
742 uint16_t c = n.navdata_phys_measures.gyro_temp;
746 navdata_phys_measures_msg.gyro_temp = m;
749 navdata_phys_measures_msg.phys_accs.clear();
750 for(
int i=0; i<NB_ACCS; i++)
752 float32_t c = n.navdata_phys_measures.phys_accs[i];
756 navdata_phys_measures_msg.phys_accs.push_back(m);
759 navdata_phys_measures_msg.phys_gyros.clear();
760 for(
int i=0; i<NB_GYROS; i++)
762 float32_t c = n.navdata_phys_measures.phys_gyros[i];
766 navdata_phys_measures_msg.phys_gyros.push_back(m);
770 uint32_t c = n.navdata_phys_measures.alim3V3;
774 navdata_phys_measures_msg.alim3V3 = m;
778 uint32_t c = n.navdata_phys_measures.vrefEpson;
782 navdata_phys_measures_msg.vrefEpson = m;
786 uint32_t c = n.navdata_phys_measures.vrefIDG;
790 navdata_phys_measures_msg.vrefIDG = m;
793 pub_navdata_phys_measures.
publish(navdata_phys_measures_msg);
798 if(enabled_navdata_gyros_offsets && pub_navdata_gyros_offsets.
getNumSubscribers()>0)
800 navdata_gyros_offsets_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
801 navdata_gyros_offsets_msg.header.stamp = received;
805 uint16_t c = n.navdata_gyros_offsets.tag;
809 navdata_gyros_offsets_msg.tag = m;
813 uint16_t c = n.navdata_gyros_offsets.size;
817 navdata_gyros_offsets_msg.size = m;
820 navdata_gyros_offsets_msg.offset_g.clear();
821 for(
int i=0; i<NB_GYROS; i++)
823 float32_t c = n.navdata_gyros_offsets.offset_g[i];
827 navdata_gyros_offsets_msg.offset_g.push_back(m);
830 pub_navdata_gyros_offsets.
publish(navdata_gyros_offsets_msg);
835 if(enabled_navdata_euler_angles && pub_navdata_euler_angles.
getNumSubscribers()>0)
837 navdata_euler_angles_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
838 navdata_euler_angles_msg.header.stamp = received;
842 uint16_t c = n.navdata_euler_angles.tag;
846 navdata_euler_angles_msg.tag = m;
850 uint16_t c = n.navdata_euler_angles.size;
854 navdata_euler_angles_msg.size = m;
858 float32_t c = n.navdata_euler_angles.theta_a;
862 navdata_euler_angles_msg.theta_a = m;
866 float32_t c = n.navdata_euler_angles.phi_a;
870 navdata_euler_angles_msg.phi_a = m;
873 pub_navdata_euler_angles.
publish(navdata_euler_angles_msg);
880 navdata_references_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
881 navdata_references_msg.header.stamp = received;
885 uint16_t c = n.navdata_references.tag;
889 navdata_references_msg.tag = m;
893 uint16_t c = n.navdata_references.size;
897 navdata_references_msg.size = m;
901 int32_t c = n.navdata_references.ref_theta;
905 navdata_references_msg.ref_theta = m;
909 int32_t c = n.navdata_references.ref_phi;
913 navdata_references_msg.ref_phi = m;
917 int32_t c = n.navdata_references.ref_theta_I;
921 navdata_references_msg.ref_theta_I = m;
925 int32_t c = n.navdata_references.ref_phi_I;
929 navdata_references_msg.ref_phi_I = m;
933 int32_t c = n.navdata_references.ref_pitch;
937 navdata_references_msg.ref_pitch = m;
941 int32_t c = n.navdata_references.ref_roll;
945 navdata_references_msg.ref_roll = m;
949 int32_t c = n.navdata_references.ref_yaw;
953 navdata_references_msg.ref_yaw = m;
957 int32_t c = n.navdata_references.ref_psi;
961 navdata_references_msg.ref_psi = m;
965 float32_t c = n.navdata_references.vx_ref;
969 navdata_references_msg.vx_ref = m;
973 float32_t c = n.navdata_references.vy_ref;
977 navdata_references_msg.vy_ref = m;
981 float32_t c = n.navdata_references.theta_mod;
985 navdata_references_msg.theta_mod = m;
989 float32_t c = n.navdata_references.phi_mod;
993 navdata_references_msg.phi_mod = m;
997 float32_t c = n.navdata_references.k_v_x;
1001 navdata_references_msg.k_v_x = m;
1005 float32_t c = n.navdata_references.k_v_y;
1009 navdata_references_msg.k_v_y = m;
1013 uint32_t c = n.navdata_references.k_mode;
1017 navdata_references_msg.k_mode = m;
1021 float32_t c = n.navdata_references.ui_time;
1025 navdata_references_msg.ui_time = m;
1029 float32_t c = n.navdata_references.ui_theta;
1033 navdata_references_msg.ui_theta = m;
1037 float32_t c = n.navdata_references.ui_phi;
1041 navdata_references_msg.ui_phi = m;
1045 float32_t c = n.navdata_references.ui_psi;
1049 navdata_references_msg.ui_psi = m;
1053 float32_t c = n.navdata_references.ui_psi_accuracy;
1057 navdata_references_msg.ui_psi_accuracy = m;
1061 int32_t c = n.navdata_references.ui_seq;
1065 navdata_references_msg.ui_seq = m;
1068 pub_navdata_references.
publish(navdata_references_msg);
1075 navdata_trims_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
1076 navdata_trims_msg.header.stamp = received;
1080 uint16_t c = n.navdata_trims.tag;
1084 navdata_trims_msg.tag = m;
1088 uint16_t c = n.navdata_trims.size;
1092 navdata_trims_msg.size = m;
1096 float32_t c = n.navdata_trims.angular_rates_trim_r;
1100 navdata_trims_msg.angular_rates_trim_r = m;
1104 float32_t c = n.navdata_trims.euler_angles_trim_theta;
1108 navdata_trims_msg.euler_angles_trim_theta = m;
1112 float32_t c = n.navdata_trims.euler_angles_trim_phi;
1116 navdata_trims_msg.euler_angles_trim_phi = m;
1119 pub_navdata_trims.
publish(navdata_trims_msg);
1124 if(enabled_navdata_rc_references && pub_navdata_rc_references.
getNumSubscribers()>0)
1126 navdata_rc_references_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
1127 navdata_rc_references_msg.header.stamp = received;
1131 uint16_t c = n.navdata_rc_references.tag;
1135 navdata_rc_references_msg.tag = m;
1139 uint16_t c = n.navdata_rc_references.size;
1143 navdata_rc_references_msg.size = m;
1147 int32_t c = n.navdata_rc_references.rc_ref_pitch;
1151 navdata_rc_references_msg.rc_ref_pitch = m;
1155 int32_t c = n.navdata_rc_references.rc_ref_roll;
1159 navdata_rc_references_msg.rc_ref_roll = m;
1163 int32_t c = n.navdata_rc_references.rc_ref_yaw;
1167 navdata_rc_references_msg.rc_ref_yaw = m;
1171 int32_t c = n.navdata_rc_references.rc_ref_gaz;
1175 navdata_rc_references_msg.rc_ref_gaz = m;
1179 int32_t c = n.navdata_rc_references.rc_ref_ag;
1183 navdata_rc_references_msg.rc_ref_ag = m;
1186 pub_navdata_rc_references.
publish(navdata_rc_references_msg);
1193 navdata_pwm_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
1194 navdata_pwm_msg.header.stamp = received;
1198 uint16_t c = n.navdata_pwm.tag;
1202 navdata_pwm_msg.tag = m;
1206 uint16_t c = n.navdata_pwm.size;
1210 navdata_pwm_msg.size = m;
1214 uint8_t c = n.navdata_pwm.motor1;
1218 navdata_pwm_msg.motor1 = m;
1222 uint8_t c = n.navdata_pwm.motor2;
1226 navdata_pwm_msg.motor2 = m;
1230 uint8_t c = n.navdata_pwm.motor3;
1234 navdata_pwm_msg.motor3 = m;
1238 uint8_t c = n.navdata_pwm.motor4;
1242 navdata_pwm_msg.motor4 = m;
1246 uint8_t c = n.navdata_pwm.sat_motor1;
1250 navdata_pwm_msg.sat_motor1 = m;
1254 uint8_t c = n.navdata_pwm.sat_motor2;
1258 navdata_pwm_msg.sat_motor2 = m;
1262 uint8_t c = n.navdata_pwm.sat_motor3;
1266 navdata_pwm_msg.sat_motor3 = m;
1270 uint8_t c = n.navdata_pwm.sat_motor4;
1274 navdata_pwm_msg.sat_motor4 = m;
1278 float32_t c = n.navdata_pwm.gaz_feed_forward;
1282 navdata_pwm_msg.gaz_feed_forward = m;
1286 float32_t c = n.navdata_pwm.gaz_altitude;
1290 navdata_pwm_msg.gaz_altitude = m;
1294 float32_t c = n.navdata_pwm.altitude_integral;
1298 navdata_pwm_msg.altitude_integral = m;
1302 float32_t c = n.navdata_pwm.vz_ref;
1306 navdata_pwm_msg.vz_ref = m;
1310 int32_t c = n.navdata_pwm.u_pitch;
1314 navdata_pwm_msg.u_pitch = m;
1318 int32_t c = n.navdata_pwm.u_roll;
1322 navdata_pwm_msg.u_roll = m;
1326 int32_t c = n.navdata_pwm.u_yaw;
1330 navdata_pwm_msg.u_yaw = m;
1334 float32_t c = n.navdata_pwm.yaw_u_I;
1338 navdata_pwm_msg.yaw_u_I = m;
1342 int32_t c = n.navdata_pwm.u_pitch_planif;
1346 navdata_pwm_msg.u_pitch_planif = m;
1350 int32_t c = n.navdata_pwm.u_roll_planif;
1354 navdata_pwm_msg.u_roll_planif = m;
1358 int32_t c = n.navdata_pwm.u_yaw_planif;
1362 navdata_pwm_msg.u_yaw_planif = m;
1366 float32_t c = n.navdata_pwm.u_gaz_planif;
1370 navdata_pwm_msg.u_gaz_planif = m;
1374 uint16_t c = n.navdata_pwm.current_motor1;
1378 navdata_pwm_msg.current_motor1 = m;
1382 uint16_t c = n.navdata_pwm.current_motor2;
1386 navdata_pwm_msg.current_motor2 = m;
1390 uint16_t c = n.navdata_pwm.current_motor3;
1394 navdata_pwm_msg.current_motor3 = m;
1398 uint16_t c = n.navdata_pwm.current_motor4;
1402 navdata_pwm_msg.current_motor4 = m;
1406 float32_t c = n.navdata_pwm.altitude_der;
1410 navdata_pwm_msg.altitude_der = m;
1413 pub_navdata_pwm.
publish(navdata_pwm_msg);
1420 navdata_altitude_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
1421 navdata_altitude_msg.header.stamp = received;
1425 uint16_t c = n.navdata_altitude.tag;
1429 navdata_altitude_msg.tag = m;
1433 uint16_t c = n.navdata_altitude.size;
1437 navdata_altitude_msg.size = m;
1441 int32_t c = n.navdata_altitude.altitude_vision;
1445 navdata_altitude_msg.altitude_vision = m;
1449 float32_t c = n.navdata_altitude.altitude_vz;
1453 navdata_altitude_msg.altitude_vz = m;
1457 int32_t c = n.navdata_altitude.altitude_ref;
1461 navdata_altitude_msg.altitude_ref = m;
1465 int32_t c = n.navdata_altitude.altitude_raw;
1469 navdata_altitude_msg.altitude_raw = m;
1473 float32_t c = n.navdata_altitude.obs_accZ;
1477 navdata_altitude_msg.obs_accZ = m;
1481 float32_t c = n.navdata_altitude.obs_alt;
1485 navdata_altitude_msg.obs_alt = m;
1489 vector31_t c = n.navdata_altitude.obs_x;
1490 ardrone_autonomy::vector31 m;
1495 navdata_altitude_msg.obs_x = m;
1499 uint32_t c = n.navdata_altitude.obs_state;
1503 navdata_altitude_msg.obs_state = m;
1507 vector21_t c = n.navdata_altitude.est_vb;
1508 ardrone_autonomy::vector21 m;
1512 navdata_altitude_msg.est_vb = m;
1516 uint32_t c = n.navdata_altitude.est_state;
1520 navdata_altitude_msg.est_state = m;
1523 pub_navdata_altitude.
publish(navdata_altitude_msg);
1530 navdata_vision_raw_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
1531 navdata_vision_raw_msg.header.stamp = received;
1535 uint16_t c = n.navdata_vision_raw.tag;
1539 navdata_vision_raw_msg.tag = m;
1543 uint16_t c = n.navdata_vision_raw.size;
1547 navdata_vision_raw_msg.size = m;
1551 float32_t c = n.navdata_vision_raw.vision_tx_raw;
1555 navdata_vision_raw_msg.vision_tx_raw = m;
1559 float32_t c = n.navdata_vision_raw.vision_ty_raw;
1563 navdata_vision_raw_msg.vision_ty_raw = m;
1567 float32_t c = n.navdata_vision_raw.vision_tz_raw;
1571 navdata_vision_raw_msg.vision_tz_raw = m;
1574 pub_navdata_vision_raw.
publish(navdata_vision_raw_msg);
1581 navdata_vision_of_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
1582 navdata_vision_of_msg.header.stamp = received;
1586 uint16_t c = n.navdata_vision_of.tag;
1590 navdata_vision_of_msg.tag = m;
1594 uint16_t c = n.navdata_vision_of.size;
1598 navdata_vision_of_msg.size = m;
1601 navdata_vision_of_msg.of_dx.clear();
1602 for(
int i=0; i<5; i++)
1604 float32_t c = n.navdata_vision_of.of_dx[i];
1608 navdata_vision_of_msg.of_dx.push_back(m);
1611 navdata_vision_of_msg.of_dy.clear();
1612 for(
int i=0; i<5; i++)
1614 float32_t c = n.navdata_vision_of.of_dy[i];
1618 navdata_vision_of_msg.of_dy.push_back(m);
1621 pub_navdata_vision_of.
publish(navdata_vision_of_msg);
1628 navdata_vision_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
1629 navdata_vision_msg.header.stamp = received;
1633 uint16_t c = n.navdata_vision.tag;
1637 navdata_vision_msg.tag = m;
1641 uint16_t c = n.navdata_vision.size;
1645 navdata_vision_msg.size = m;
1649 uint32_t c = n.navdata_vision.vision_state;
1653 navdata_vision_msg.vision_state = m;
1657 int32_t c = n.navdata_vision.vision_misc;
1661 navdata_vision_msg.vision_misc = m;
1665 float32_t c = n.navdata_vision.vision_phi_trim;
1669 navdata_vision_msg.vision_phi_trim = m;
1673 float32_t c = n.navdata_vision.vision_phi_ref_prop;
1677 navdata_vision_msg.vision_phi_ref_prop = m;
1681 float32_t c = n.navdata_vision.vision_theta_trim;
1685 navdata_vision_msg.vision_theta_trim = m;
1689 float32_t c = n.navdata_vision.vision_theta_ref_prop;
1693 navdata_vision_msg.vision_theta_ref_prop = m;
1697 int32_t c = n.navdata_vision.new_raw_picture;
1701 navdata_vision_msg.new_raw_picture = m;
1705 float32_t c = n.navdata_vision.theta_capture;
1709 navdata_vision_msg.theta_capture = m;
1713 float32_t c = n.navdata_vision.phi_capture;
1717 navdata_vision_msg.phi_capture = m;
1721 float32_t c = n.navdata_vision.psi_capture;
1725 navdata_vision_msg.psi_capture = m;
1729 int32_t c = n.navdata_vision.altitude_capture;
1733 navdata_vision_msg.altitude_capture = m;
1737 uint32_t c = n.navdata_vision.time_capture;
1741 navdata_vision_msg.time_capture = m;
1745 velocities_t c = n.navdata_vision.body_v;
1746 ardrone_autonomy::vector31 m;
1751 navdata_vision_msg.body_v = m;
1755 float32_t c = n.navdata_vision.delta_phi;
1759 navdata_vision_msg.delta_phi = m;
1763 float32_t c = n.navdata_vision.delta_theta;
1767 navdata_vision_msg.delta_theta = m;
1771 float32_t c = n.navdata_vision.delta_psi;
1775 navdata_vision_msg.delta_psi = m;
1779 uint32_t c = n.navdata_vision.gold_defined;
1783 navdata_vision_msg.gold_defined = m;
1787 uint32_t c = n.navdata_vision.gold_reset;
1791 navdata_vision_msg.gold_reset = m;
1795 float32_t c = n.navdata_vision.gold_x;
1799 navdata_vision_msg.gold_x = m;
1803 float32_t c = n.navdata_vision.gold_y;
1807 navdata_vision_msg.gold_y = m;
1810 pub_navdata_vision.
publish(navdata_vision_msg);
1815 if(enabled_navdata_vision_perf && pub_navdata_vision_perf.
getNumSubscribers()>0)
1817 navdata_vision_perf_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
1818 navdata_vision_perf_msg.header.stamp = received;
1822 uint16_t c = n.navdata_vision_perf.tag;
1826 navdata_vision_perf_msg.tag = m;
1830 uint16_t c = n.navdata_vision_perf.size;
1834 navdata_vision_perf_msg.size = m;
1838 float32_t c = n.navdata_vision_perf.time_corners;
1842 navdata_vision_perf_msg.time_corners = m;
1846 float32_t c = n.navdata_vision_perf.time_compute;
1850 navdata_vision_perf_msg.time_compute = m;
1854 float32_t c = n.navdata_vision_perf.time_tracking;
1858 navdata_vision_perf_msg.time_tracking = m;
1862 float32_t c = n.navdata_vision_perf.time_trans;
1866 navdata_vision_perf_msg.time_trans = m;
1870 float32_t c = n.navdata_vision_perf.time_update;
1874 navdata_vision_perf_msg.time_update = m;
1877 navdata_vision_perf_msg.time_custom.clear();
1878 for(
int i=0; i<NAVDATA_MAX_CUSTOM_TIME_SAVE; i++)
1880 float32_t c = n.navdata_vision_perf.time_custom[i];
1884 navdata_vision_perf_msg.time_custom.push_back(m);
1887 pub_navdata_vision_perf.
publish(navdata_vision_perf_msg);
1892 if(enabled_navdata_trackers_send && pub_navdata_trackers_send.
getNumSubscribers()>0)
1894 navdata_trackers_send_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
1895 navdata_trackers_send_msg.header.stamp = received;
1899 uint16_t c = n.navdata_trackers_send.tag;
1903 navdata_trackers_send_msg.tag = m;
1907 uint16_t c = n.navdata_trackers_send.size;
1911 navdata_trackers_send_msg.size = m;
1914 navdata_trackers_send_msg.locked.clear();
1915 for(
int i=0; i<DEFAULT_NB_TRACKERS_WIDTH * DEFAULT_NB_TRACKERS_HEIGHT; i++)
1917 int32_t c = n.navdata_trackers_send.locked[i];
1921 navdata_trackers_send_msg.locked.push_back(m);
1924 navdata_trackers_send_msg.point.clear();
1925 for(
int i=0; i<DEFAULT_NB_TRACKERS_WIDTH * DEFAULT_NB_TRACKERS_HEIGHT; i++)
1927 screen_point_t c = n.navdata_trackers_send.point[i];
1928 ardrone_autonomy::vector21 m;
1932 navdata_trackers_send_msg.point.push_back(m);
1935 pub_navdata_trackers_send.
publish(navdata_trackers_send_msg);
1940 if(enabled_navdata_vision_detect && pub_navdata_vision_detect.
getNumSubscribers()>0)
1942 navdata_vision_detect_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
1943 navdata_vision_detect_msg.header.stamp = received;
1947 uint16_t c = n.navdata_vision_detect.tag;
1951 navdata_vision_detect_msg.tag = m;
1955 uint16_t c = n.navdata_vision_detect.size;
1959 navdata_vision_detect_msg.size = m;
1963 uint32_t c = n.navdata_vision_detect.nb_detected;
1967 navdata_vision_detect_msg.nb_detected = m;
1970 navdata_vision_detect_msg.type.clear();
1971 for(
int i=0; i<NB_NAVDATA_DETECTION_RESULTS; i++)
1973 uint32_t c = n.navdata_vision_detect.type[i];
1977 navdata_vision_detect_msg.type.push_back(m);
1980 navdata_vision_detect_msg.xc.clear();
1981 for(
int i=0; i<NB_NAVDATA_DETECTION_RESULTS; i++)
1983 uint32_t c = n.navdata_vision_detect.xc[i];
1987 navdata_vision_detect_msg.xc.push_back(m);
1990 navdata_vision_detect_msg.yc.clear();
1991 for(
int i=0; i<NB_NAVDATA_DETECTION_RESULTS; i++)
1993 uint32_t c = n.navdata_vision_detect.yc[i];
1997 navdata_vision_detect_msg.yc.push_back(m);
2000 navdata_vision_detect_msg.width.clear();
2001 for(
int i=0; i<NB_NAVDATA_DETECTION_RESULTS; i++)
2003 uint32_t c = n.navdata_vision_detect.width[i];
2007 navdata_vision_detect_msg.width.push_back(m);
2010 navdata_vision_detect_msg.height.clear();
2011 for(
int i=0; i<NB_NAVDATA_DETECTION_RESULTS; i++)
2013 uint32_t c = n.navdata_vision_detect.height[i];
2017 navdata_vision_detect_msg.height.push_back(m);
2020 navdata_vision_detect_msg.dist.clear();
2021 for(
int i=0; i<NB_NAVDATA_DETECTION_RESULTS; i++)
2023 uint32_t c = n.navdata_vision_detect.dist[i];
2027 navdata_vision_detect_msg.dist.push_back(m);
2030 navdata_vision_detect_msg.orientation_angle.clear();
2031 for(
int i=0; i<NB_NAVDATA_DETECTION_RESULTS; i++)
2033 float32_t c = n.navdata_vision_detect.orientation_angle[i];
2037 navdata_vision_detect_msg.orientation_angle.push_back(m);
2040 navdata_vision_detect_msg.rotation.clear();
2041 for(
int i=0; i<NB_NAVDATA_DETECTION_RESULTS; i++)
2043 matrix33_t c = n.navdata_vision_detect.rotation[i];
2044 ardrone_autonomy::matrix33 m;
2055 navdata_vision_detect_msg.rotation.push_back(m);
2058 navdata_vision_detect_msg.translation.clear();
2059 for(
int i=0; i<NB_NAVDATA_DETECTION_RESULTS; i++)
2061 vector31_t c = n.navdata_vision_detect.translation[i];
2062 ardrone_autonomy::vector31 m;
2067 navdata_vision_detect_msg.translation.push_back(m);
2070 navdata_vision_detect_msg.camera_source.clear();
2071 for(
int i=0; i<NB_NAVDATA_DETECTION_RESULTS; i++)
2073 uint32_t c = n.navdata_vision_detect.camera_source[i];
2077 navdata_vision_detect_msg.camera_source.push_back(m);
2080 pub_navdata_vision_detect.
publish(navdata_vision_detect_msg);
2087 navdata_watchdog_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
2088 navdata_watchdog_msg.header.stamp = received;
2092 uint16_t c = n.navdata_watchdog.tag;
2096 navdata_watchdog_msg.tag = m;
2100 uint16_t c = n.navdata_watchdog.size;
2104 navdata_watchdog_msg.size = m;
2107 pub_navdata_watchdog.
publish(navdata_watchdog_msg);
2112 if(enabled_navdata_adc_data_frame && pub_navdata_adc_data_frame.
getNumSubscribers()>0)
2114 navdata_adc_data_frame_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
2115 navdata_adc_data_frame_msg.header.stamp = received;
2119 uint16_t c = n.navdata_adc_data_frame.tag;
2123 navdata_adc_data_frame_msg.tag = m;
2127 uint16_t c = n.navdata_adc_data_frame.size;
2131 navdata_adc_data_frame_msg.size = m;
2135 uint32_t c = n.navdata_adc_data_frame.version;
2139 navdata_adc_data_frame_msg.version = m;
2142 navdata_adc_data_frame_msg.data_frame.clear();
2143 for(
int i=0; i<32; i++)
2145 uint8_t c = n.navdata_adc_data_frame.data_frame[i];
2149 navdata_adc_data_frame_msg.data_frame.push_back(m);
2152 pub_navdata_adc_data_frame.
publish(navdata_adc_data_frame_msg);
2157 if(enabled_navdata_video_stream && pub_navdata_video_stream.
getNumSubscribers()>0)
2159 navdata_video_stream_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
2160 navdata_video_stream_msg.header.stamp = received;
2164 uint16_t c = n.navdata_video_stream.tag;
2168 navdata_video_stream_msg.tag = m;
2172 uint16_t c = n.navdata_video_stream.size;
2176 navdata_video_stream_msg.size = m;
2180 uint8_t c = n.navdata_video_stream.quant;
2184 navdata_video_stream_msg.quant = m;
2188 uint32_t c = n.navdata_video_stream.frame_size;
2192 navdata_video_stream_msg.frame_size = m;
2196 uint32_t c = n.navdata_video_stream.frame_number;
2200 navdata_video_stream_msg.frame_number = m;
2204 uint32_t c = n.navdata_video_stream.atcmd_ref_seq;
2208 navdata_video_stream_msg.atcmd_ref_seq = m;
2212 uint32_t c = n.navdata_video_stream.atcmd_mean_ref_gap;
2216 navdata_video_stream_msg.atcmd_mean_ref_gap = m;
2220 float32_t c = n.navdata_video_stream.atcmd_var_ref_gap;
2224 navdata_video_stream_msg.atcmd_var_ref_gap = m;
2228 uint32_t c = n.navdata_video_stream.atcmd_ref_quality;
2232 navdata_video_stream_msg.atcmd_ref_quality = m;
2236 uint32_t c = n.navdata_video_stream.desired_bitrate;
2240 navdata_video_stream_msg.desired_bitrate = m;
2244 int32_t c = n.navdata_video_stream.data2;
2248 navdata_video_stream_msg.data2 = m;
2252 int32_t c = n.navdata_video_stream.data3;
2256 navdata_video_stream_msg.data3 = m;
2260 int32_t c = n.navdata_video_stream.data4;
2264 navdata_video_stream_msg.data4 = m;
2268 int32_t c = n.navdata_video_stream.data5;
2272 navdata_video_stream_msg.data5 = m;
2276 uint32_t c = n.navdata_video_stream.fifo_queue_level;
2280 navdata_video_stream_msg.fifo_queue_level = m;
2283 pub_navdata_video_stream.
publish(navdata_video_stream_msg);
2290 navdata_games_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
2291 navdata_games_msg.header.stamp = received;
2295 uint16_t c = n.navdata_games.tag;
2299 navdata_games_msg.tag = m;
2303 uint16_t c = n.navdata_games.size;
2307 navdata_games_msg.size = m;
2311 uint32_t c = n.navdata_games.double_tap_counter;
2315 navdata_games_msg.double_tap_counter = m;
2319 uint32_t c = n.navdata_games.finish_line_counter;
2323 navdata_games_msg.finish_line_counter = m;
2326 pub_navdata_games.
publish(navdata_games_msg);
2331 if(enabled_navdata_pressure_raw && pub_navdata_pressure_raw.
getNumSubscribers()>0)
2333 navdata_pressure_raw_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
2334 navdata_pressure_raw_msg.header.stamp = received;
2338 uint16_t c = n.navdata_pressure_raw.tag;
2342 navdata_pressure_raw_msg.tag = m;
2346 uint16_t c = n.navdata_pressure_raw.size;
2350 navdata_pressure_raw_msg.size = m;
2354 int32_t c = n.navdata_pressure_raw.up;
2358 navdata_pressure_raw_msg.up = m;
2362 int16_t c = n.navdata_pressure_raw.ut;
2366 navdata_pressure_raw_msg.ut = m;
2370 int32_t c = n.navdata_pressure_raw.Temperature_meas;
2374 navdata_pressure_raw_msg.Temperature_meas = m;
2378 int32_t c = n.navdata_pressure_raw.Pression_meas;
2382 navdata_pressure_raw_msg.Pression_meas = m;
2385 pub_navdata_pressure_raw.
publish(navdata_pressure_raw_msg);
2392 navdata_magneto_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
2393 navdata_magneto_msg.header.stamp = received;
2397 uint16_t c = n.navdata_magneto.tag;
2401 navdata_magneto_msg.tag = m;
2405 uint16_t c = n.navdata_magneto.size;
2409 navdata_magneto_msg.size = m;
2413 int16_t c = n.navdata_magneto.mx;
2417 navdata_magneto_msg.mx = m;
2421 int16_t c = n.navdata_magneto.my;
2425 navdata_magneto_msg.my = m;
2429 int16_t c = n.navdata_magneto.mz;
2433 navdata_magneto_msg.mz = m;
2437 vector31_t c = n.navdata_magneto.magneto_raw;
2438 ardrone_autonomy::vector31 m;
2443 navdata_magneto_msg.magneto_raw = m;
2447 vector31_t c = n.navdata_magneto.magneto_rectified;
2448 ardrone_autonomy::vector31 m;
2453 navdata_magneto_msg.magneto_rectified = m;
2457 vector31_t c = n.navdata_magneto.magneto_offset;
2458 ardrone_autonomy::vector31 m;
2463 navdata_magneto_msg.magneto_offset = m;
2467 float32_t c = n.navdata_magneto.heading_unwrapped;
2471 navdata_magneto_msg.heading_unwrapped = m;
2475 float32_t c = n.navdata_magneto.heading_gyro_unwrapped;
2479 navdata_magneto_msg.heading_gyro_unwrapped = m;
2483 float32_t c = n.navdata_magneto.heading_fusion_unwrapped;
2487 navdata_magneto_msg.heading_fusion_unwrapped = m;
2491 char c = n.navdata_magneto.magneto_calibration_ok;
2495 navdata_magneto_msg.magneto_calibration_ok = m;
2499 uint32_t c = n.navdata_magneto.magneto_state;
2503 navdata_magneto_msg.magneto_state = m;
2507 float32_t c = n.navdata_magneto.magneto_radius;
2511 navdata_magneto_msg.magneto_radius = m;
2515 float32_t c = n.navdata_magneto.error_mean;
2519 navdata_magneto_msg.error_mean = m;
2523 float32_t c = n.navdata_magneto.error_var;
2527 navdata_magneto_msg.error_var = m;
2530 pub_navdata_magneto.
publish(navdata_magneto_msg);
2537 navdata_wind_speed_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
2538 navdata_wind_speed_msg.header.stamp = received;
2542 uint16_t c = n.navdata_wind_speed.tag;
2546 navdata_wind_speed_msg.tag = m;
2550 uint16_t c = n.navdata_wind_speed.size;
2554 navdata_wind_speed_msg.size = m;
2558 float32_t c = n.navdata_wind_speed.wind_speed;
2562 navdata_wind_speed_msg.wind_speed = m;
2566 float32_t c = n.navdata_wind_speed.wind_angle;
2570 navdata_wind_speed_msg.wind_angle = m;
2574 float32_t c = n.navdata_wind_speed.wind_compensation_theta;
2578 navdata_wind_speed_msg.wind_compensation_theta = m;
2582 float32_t c = n.navdata_wind_speed.wind_compensation_phi;
2586 navdata_wind_speed_msg.wind_compensation_phi = m;
2590 float32_t c = n.navdata_wind_speed.state_x1;
2594 navdata_wind_speed_msg.state_x1 = m;
2598 float32_t c = n.navdata_wind_speed.state_x2;
2602 navdata_wind_speed_msg.state_x2 = m;
2606 float32_t c = n.navdata_wind_speed.state_x3;
2610 navdata_wind_speed_msg.state_x3 = m;
2614 float32_t c = n.navdata_wind_speed.state_x4;
2618 navdata_wind_speed_msg.state_x4 = m;
2622 float32_t c = n.navdata_wind_speed.state_x5;
2626 navdata_wind_speed_msg.state_x5 = m;
2630 float32_t c = n.navdata_wind_speed.state_x6;
2634 navdata_wind_speed_msg.state_x6 = m;
2638 float32_t c = n.navdata_wind_speed.magneto_debug1;
2642 navdata_wind_speed_msg.magneto_debug1 = m;
2646 float32_t c = n.navdata_wind_speed.magneto_debug2;
2650 navdata_wind_speed_msg.magneto_debug2 = m;
2654 float32_t c = n.navdata_wind_speed.magneto_debug3;
2658 navdata_wind_speed_msg.magneto_debug3 = m;
2661 pub_navdata_wind_speed.
publish(navdata_wind_speed_msg);
2666 if(enabled_navdata_kalman_pressure && pub_navdata_kalman_pressure.
getNumSubscribers()>0)
2668 navdata_kalman_pressure_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
2669 navdata_kalman_pressure_msg.header.stamp = received;
2673 uint16_t c = n.navdata_kalman_pressure.tag;
2677 navdata_kalman_pressure_msg.tag = m;
2681 uint16_t c = n.navdata_kalman_pressure.size;
2685 navdata_kalman_pressure_msg.size = m;
2689 float32_t c = n.navdata_kalman_pressure.offset_pressure;
2693 navdata_kalman_pressure_msg.offset_pressure = m;
2697 float32_t c = n.navdata_kalman_pressure.est_z;
2701 navdata_kalman_pressure_msg.est_z = m;
2705 float32_t c = n.navdata_kalman_pressure.est_zdot;
2709 navdata_kalman_pressure_msg.est_zdot = m;
2713 float32_t c = n.navdata_kalman_pressure.est_bias_PWM;
2717 navdata_kalman_pressure_msg.est_bias_PWM = m;
2721 float32_t c = n.navdata_kalman_pressure.est_biais_pression;
2725 navdata_kalman_pressure_msg.est_biais_pression = m;
2729 float32_t c = n.navdata_kalman_pressure.offset_US;
2733 navdata_kalman_pressure_msg.offset_US = m;
2737 float32_t c = n.navdata_kalman_pressure.prediction_US;
2741 navdata_kalman_pressure_msg.prediction_US = m;
2745 float32_t c = n.navdata_kalman_pressure.cov_alt;
2749 navdata_kalman_pressure_msg.cov_alt = m;
2753 float32_t c = n.navdata_kalman_pressure.cov_PWM;
2757 navdata_kalman_pressure_msg.cov_PWM = m;
2761 float32_t c = n.navdata_kalman_pressure.cov_vitesse;
2765 navdata_kalman_pressure_msg.cov_vitesse = m;
2769 bool_t c = n.navdata_kalman_pressure.bool_effet_sol;
2773 navdata_kalman_pressure_msg.bool_effet_sol = m;
2777 float32_t c = n.navdata_kalman_pressure.somme_inno;
2781 navdata_kalman_pressure_msg.somme_inno = m;
2785 bool_t c = n.navdata_kalman_pressure.flag_rejet_US;
2789 navdata_kalman_pressure_msg.flag_rejet_US = m;
2793 float32_t c = n.navdata_kalman_pressure.u_multisinus;
2797 navdata_kalman_pressure_msg.u_multisinus = m;
2801 float32_t c = n.navdata_kalman_pressure.gaz_altitude;
2805 navdata_kalman_pressure_msg.gaz_altitude = m;
2809 bool_t c = n.navdata_kalman_pressure.Flag_multisinus;
2813 navdata_kalman_pressure_msg.Flag_multisinus = m;
2817 bool_t c = n.navdata_kalman_pressure.Flag_multisinus_debut;
2821 navdata_kalman_pressure_msg.Flag_multisinus_debut = m;
2824 pub_navdata_kalman_pressure.
publish(navdata_kalman_pressure_msg);
2829 if(enabled_navdata_hdvideo_stream && pub_navdata_hdvideo_stream.
getNumSubscribers()>0)
2831 navdata_hdvideo_stream_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
2832 navdata_hdvideo_stream_msg.header.stamp = received;
2836 uint16_t c = n.navdata_hdvideo_stream.tag;
2840 navdata_hdvideo_stream_msg.tag = m;
2844 uint16_t c = n.navdata_hdvideo_stream.size;
2848 navdata_hdvideo_stream_msg.size = m;
2852 uint32_t c = n.navdata_hdvideo_stream.hdvideo_state;
2856 navdata_hdvideo_stream_msg.hdvideo_state = m;
2860 uint32_t c = n.navdata_hdvideo_stream.storage_fifo_nb_packets;
2864 navdata_hdvideo_stream_msg.storage_fifo_nb_packets = m;
2868 uint32_t c = n.navdata_hdvideo_stream.storage_fifo_size;
2872 navdata_hdvideo_stream_msg.storage_fifo_size = m;
2876 uint32_t c = n.navdata_hdvideo_stream.usbkey_size;
2880 navdata_hdvideo_stream_msg.usbkey_size = m;
2884 uint32_t c = n.navdata_hdvideo_stream.usbkey_freespace;
2888 navdata_hdvideo_stream_msg.usbkey_freespace = m;
2892 uint32_t c = n.navdata_hdvideo_stream.frame_number;
2896 navdata_hdvideo_stream_msg.frame_number = m;
2900 uint32_t c = n.navdata_hdvideo_stream.usbkey_remaining_time;
2904 navdata_hdvideo_stream_msg.usbkey_remaining_time = m;
2907 pub_navdata_hdvideo_stream.
publish(navdata_hdvideo_stream_msg);
2914 navdata_wifi_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
2915 navdata_wifi_msg.header.stamp = received;
2919 uint16_t c = n.navdata_wifi.tag;
2923 navdata_wifi_msg.tag = m;
2927 uint16_t c = n.navdata_wifi.size;
2931 navdata_wifi_msg.size = m;
2935 uint32_t c = n.navdata_wifi.link_quality;
2939 navdata_wifi_msg.link_quality = m;
2942 pub_navdata_wifi.
publish(navdata_wifi_msg);
2949 navdata_zimmu_3000_msg.drone_time = ((double)ardrone_time_to_usec(n.navdata_time.time))/1000000.0;
2950 navdata_zimmu_3000_msg.header.stamp = received;
2954 uint16_t c = n.navdata_zimmu_3000.tag;
2958 navdata_zimmu_3000_msg.tag = m;
2962 uint16_t c = n.navdata_zimmu_3000.size;
2966 navdata_zimmu_3000_msg.size = m;
2970 int32_t c = n.navdata_zimmu_3000.vzimmuLSB;
2974 navdata_zimmu_3000_msg.vzimmuLSB = m;
2978 float32_t c = n.navdata_zimmu_3000.vzfind;
2982 navdata_zimmu_3000_msg.vzfind = m;
2985 pub_navdata_zimmu_3000.
publish(navdata_zimmu_3000_msg);
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val)
void publish(const boost::shared_ptr< M > &message) const
std::string drone_frame_base
uint32_t getNumSubscribers() const
#define NAVDATA_QUEUE_SIZE