ardrone3_state_callbacks.h
Go to the documentation of this file.
1 
30 #ifndef BEBOP_AUTONOMY_AUTOGENERATED_ardrone3_STATE_CALLBACKS_H
31 #define BEBOP_AUTONOMY_AUTOGENERATED_ardrone3_STATE_CALLBACKS_H
32 
33 extern "C"
34 {
35  #include "libARSAL/ARSAL.h"
36  #include "libARController/ARController.h"
37 }
38 
40 #include "bebop_driver/BebopArdrone3Config.h"
41 
42 #include "bebop_msgs/Ardrone3MediaRecordStatePictureStateChanged.h"
43 #include "bebop_msgs/Ardrone3MediaRecordStateVideoStateChanged.h"
44 #include "bebop_msgs/Ardrone3MediaRecordStatePictureStateChangedV2.h"
45 #include "bebop_msgs/Ardrone3MediaRecordStateVideoStateChangedV2.h"
46 #include "bebop_msgs/Ardrone3MediaRecordStateVideoResolutionState.h"
47 #include "bebop_msgs/Ardrone3PilotingStateFlatTrimChanged.h"
48 #include "bebop_msgs/Ardrone3PilotingStateFlyingStateChanged.h"
49 #include "bebop_msgs/Ardrone3PilotingStateAlertStateChanged.h"
50 #include "bebop_msgs/Ardrone3PilotingStateNavigateHomeStateChanged.h"
51 #include "bebop_msgs/Ardrone3PilotingStatePositionChanged.h"
52 #include "bebop_msgs/Ardrone3PilotingStateSpeedChanged.h"
53 #include "bebop_msgs/Ardrone3PilotingStateAttitudeChanged.h"
54 #include "bebop_msgs/Ardrone3PilotingStateAutoTakeOffModeChanged.h"
55 #include "bebop_msgs/Ardrone3PilotingStateAltitudeChanged.h"
56 #include "bebop_msgs/Ardrone3PilotingStateGpsLocationChanged.h"
57 #include "bebop_msgs/Ardrone3PilotingStateLandingStateChanged.h"
58 #include "bebop_msgs/Ardrone3PilotingStateAirSpeedChanged.h"
59 #include "bebop_msgs/Ardrone3PilotingStatemoveToChanged.h"
60 #include "bebop_msgs/Ardrone3NetworkStateWifiScanListChanged.h"
61 #include "bebop_msgs/Ardrone3NetworkStateAllWifiScanChanged.h"
62 #include "bebop_msgs/Ardrone3NetworkStateWifiAuthChannelListChanged.h"
63 #include "bebop_msgs/Ardrone3NetworkStateAllWifiAuthChannelChanged.h"
64 #include "bebop_msgs/Ardrone3MediaStreamingStateVideoEnableChanged.h"
65 #include "bebop_msgs/Ardrone3MediaStreamingStateVideoStreamModeChanged.h"
66 #include "bebop_msgs/Ardrone3CameraStateOrientation.h"
67 #include "bebop_msgs/Ardrone3CameraStatedefaultCameraOrientation.h"
68 #include "bebop_msgs/Ardrone3CameraStateOrientationV2.h"
69 #include "bebop_msgs/Ardrone3CameraStatedefaultCameraOrientationV2.h"
70 #include "bebop_msgs/Ardrone3CameraStateVelocityRange.h"
71 #include "bebop_msgs/Ardrone3AntiflickeringStateelectricFrequencyChanged.h"
72 #include "bebop_msgs/Ardrone3AntiflickeringStatemodeChanged.h"
73 #include "bebop_msgs/Ardrone3GPSStateNumberOfSatelliteChanged.h"
74 #include "bebop_msgs/Ardrone3GPSStateHomeTypeAvailabilityChanged.h"
75 #include "bebop_msgs/Ardrone3GPSStateHomeTypeChosenChanged.h"
76 #include "bebop_msgs/Ardrone3PROStateFeatures.h"
77 #include "bebop_msgs/Ardrone3AccessoryStateConnectedAccessories.h"
78 
79 namespace bebop_driver
80 {
81 namespace cb
82 {
83 
84 
85 // Picture state.
87 {
88 private:
89  ::bebop_msgs::Ardrone3MediaRecordStatePictureStateChanged::Ptr msg_ptr;
90 
91 public:
92 
93  Ardrone3MediaRecordStatePictureStateChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
94  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_PICTURESTATECHANGED)
95  {
96  if (priv_nh.getParam("states/enable_mediarecordstate_picturestatechanged", pub_enabled_) && pub_enabled_)
97  {
98  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
99  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3MediaRecordStatePictureStateChanged>(topic, 10, true);
100  } // pub_enabled_ is false
101  }
102 
103  ::bebop_msgs::Ardrone3MediaRecordStatePictureStateChanged::ConstPtr GetDataCstPtr() const
104  {
105  ::boost::lock_guard<boost::mutex> lock(mutex_);
106  return msg_ptr;
107  }
108 
109  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
110  {
111  if (arguments == NULL)
112  {
113  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3MediaRecordStatePictureStateChanged::Update() arguments is NULL");
114  return;
115  }
116 
117  ::boost::lock_guard<boost::mutex> lock(mutex_);
118  msg_ptr.reset(new ::bebop_msgs::Ardrone3MediaRecordStatePictureStateChanged());
119  msg_ptr->header.stamp = t;
120  msg_ptr->header.frame_id = "base_link";
121 
122 
123  arg = NULL;
124  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_PICTURESTATECHANGED_STATE, arg);
125  if (arg)
126  {
127  msg_ptr->state = arg->value.U8;
128  }
129 
130  arg = NULL;
131  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_PICTURESTATECHANGED_MASS_STORAGE_ID, arg);
132  if (arg)
133  {
134  msg_ptr->mass_storage_id = arg->value.U8;
135  }
136 
137  if (pub_enabled_) ros_pub_.publish(msg_ptr);
138  }
139 
140 }; // Ardrone3MediaRecordStatePictureStateChanged
141 
142 
143 // Picture record state.
145 {
146 private:
147  ::bebop_msgs::Ardrone3MediaRecordStateVideoStateChanged::Ptr msg_ptr;
148 
149 public:
150 
151  Ardrone3MediaRecordStateVideoStateChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
152  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_VIDEOSTATECHANGED)
153  {
154  if (priv_nh.getParam("states/enable_mediarecordstate_videostatechanged", pub_enabled_) && pub_enabled_)
155  {
156  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
157  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3MediaRecordStateVideoStateChanged>(topic, 10, true);
158  } // pub_enabled_ is false
159  }
160 
161  ::bebop_msgs::Ardrone3MediaRecordStateVideoStateChanged::ConstPtr GetDataCstPtr() const
162  {
163  ::boost::lock_guard<boost::mutex> lock(mutex_);
164  return msg_ptr;
165  }
166 
167  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
168  {
169  if (arguments == NULL)
170  {
171  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3MediaRecordStateVideoStateChanged::Update() arguments is NULL");
172  return;
173  }
174 
175  ::boost::lock_guard<boost::mutex> lock(mutex_);
176  msg_ptr.reset(new ::bebop_msgs::Ardrone3MediaRecordStateVideoStateChanged());
177  msg_ptr->header.stamp = t;
178  msg_ptr->header.frame_id = "base_link";
179 
180 
181  arg = NULL;
182  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_VIDEOSTATECHANGED_STATE, arg);
183  if (arg)
184  {
185  msg_ptr->state = arg->value.I32;
186  }
187 
188  arg = NULL;
189  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_VIDEOSTATECHANGED_MASS_STORAGE_ID, arg);
190  if (arg)
191  {
192  msg_ptr->mass_storage_id = arg->value.U8;
193  }
194 
195  if (pub_enabled_) ros_pub_.publish(msg_ptr);
196  }
197 
198 }; // Ardrone3MediaRecordStateVideoStateChanged
199 
200 
201 // Picture state.
203 {
204 private:
205  ::bebop_msgs::Ardrone3MediaRecordStatePictureStateChangedV2::Ptr msg_ptr;
206 
207 public:
208 
210  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_PICTURESTATECHANGEDV2)
211  {
212  if (priv_nh.getParam("states/enable_mediarecordstate_picturestatechangedv2", pub_enabled_) && pub_enabled_)
213  {
214  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
215  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3MediaRecordStatePictureStateChangedV2>(topic, 10, true);
216  } // pub_enabled_ is false
217  }
218 
219  ::bebop_msgs::Ardrone3MediaRecordStatePictureStateChangedV2::ConstPtr GetDataCstPtr() const
220  {
221  ::boost::lock_guard<boost::mutex> lock(mutex_);
222  return msg_ptr;
223  }
224 
225  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
226  {
227  if (arguments == NULL)
228  {
229  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3MediaRecordStatePictureStateChangedV2::Update() arguments is NULL");
230  return;
231  }
232 
233  ::boost::lock_guard<boost::mutex> lock(mutex_);
234  msg_ptr.reset(new ::bebop_msgs::Ardrone3MediaRecordStatePictureStateChangedV2());
235  msg_ptr->header.stamp = t;
236  msg_ptr->header.frame_id = "base_link";
237 
238 
239  arg = NULL;
240  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_PICTURESTATECHANGEDV2_STATE, arg);
241  if (arg)
242  {
243  msg_ptr->state = arg->value.I32;
244  }
245 
246  arg = NULL;
247  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_PICTURESTATECHANGEDV2_ERROR, arg);
248  if (arg)
249  {
250  msg_ptr->error = arg->value.I32;
251  }
252 
253  if (pub_enabled_) ros_pub_.publish(msg_ptr);
254  }
255 
256 }; // Ardrone3MediaRecordStatePictureStateChangedV2
257 
258 
259 // Video record state.
261 {
262 private:
263  ::bebop_msgs::Ardrone3MediaRecordStateVideoStateChangedV2::Ptr msg_ptr;
264 
265 public:
266 
267  Ardrone3MediaRecordStateVideoStateChangedV2(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
268  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_VIDEOSTATECHANGEDV2)
269  {
270  if (priv_nh.getParam("states/enable_mediarecordstate_videostatechangedv2", pub_enabled_) && pub_enabled_)
271  {
272  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
273  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3MediaRecordStateVideoStateChangedV2>(topic, 10, true);
274  } // pub_enabled_ is false
275  }
276 
277  ::bebop_msgs::Ardrone3MediaRecordStateVideoStateChangedV2::ConstPtr GetDataCstPtr() const
278  {
279  ::boost::lock_guard<boost::mutex> lock(mutex_);
280  return msg_ptr;
281  }
282 
283  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
284  {
285  if (arguments == NULL)
286  {
287  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3MediaRecordStateVideoStateChangedV2::Update() arguments is NULL");
288  return;
289  }
290 
291  ::boost::lock_guard<boost::mutex> lock(mutex_);
292  msg_ptr.reset(new ::bebop_msgs::Ardrone3MediaRecordStateVideoStateChangedV2());
293  msg_ptr->header.stamp = t;
294  msg_ptr->header.frame_id = "base_link";
295 
296 
297  arg = NULL;
298  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_VIDEOSTATECHANGEDV2_STATE, arg);
299  if (arg)
300  {
301  msg_ptr->state = arg->value.I32;
302  }
303 
304  arg = NULL;
305  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_VIDEOSTATECHANGEDV2_ERROR, arg);
306  if (arg)
307  {
308  msg_ptr->error = arg->value.I32;
309  }
310 
311  if (pub_enabled_) ros_pub_.publish(msg_ptr);
312  }
313 
314 }; // Ardrone3MediaRecordStateVideoStateChangedV2
315 
316 
317 // Video resolution.\n Informs about streaming and recording video resolutions.\n Note that this is only an indication about what the resolution should be. To know the real resolution, you should get it from the frame.
319 {
320 private:
321  ::bebop_msgs::Ardrone3MediaRecordStateVideoResolutionState::Ptr msg_ptr;
322 
323 public:
324 
325  Ardrone3MediaRecordStateVideoResolutionState(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
326  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_VIDEORESOLUTIONSTATE)
327  {
328  if (priv_nh.getParam("states/enable_mediarecordstate_videoresolutionstate", pub_enabled_) && pub_enabled_)
329  {
330  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
331  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3MediaRecordStateVideoResolutionState>(topic, 10, true);
332  } // pub_enabled_ is false
333  }
334 
335  ::bebop_msgs::Ardrone3MediaRecordStateVideoResolutionState::ConstPtr GetDataCstPtr() const
336  {
337  ::boost::lock_guard<boost::mutex> lock(mutex_);
338  return msg_ptr;
339  }
340 
341  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
342  {
343  if (arguments == NULL)
344  {
345  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3MediaRecordStateVideoResolutionState::Update() arguments is NULL");
346  return;
347  }
348 
349  ::boost::lock_guard<boost::mutex> lock(mutex_);
350  msg_ptr.reset(new ::bebop_msgs::Ardrone3MediaRecordStateVideoResolutionState());
351  msg_ptr->header.stamp = t;
352  msg_ptr->header.frame_id = "base_link";
353 
354 
355  arg = NULL;
356  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_VIDEORESOLUTIONSTATE_STREAMING, arg);
357  if (arg)
358  {
359  msg_ptr->streaming = arg->value.I32;
360  }
361 
362  arg = NULL;
363  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIARECORDSTATE_VIDEORESOLUTIONSTATE_RECORDING, arg);
364  if (arg)
365  {
366  msg_ptr->recording = arg->value.I32;
367  }
368 
369  if (pub_enabled_) ros_pub_.publish(msg_ptr);
370  }
371 
372 }; // Ardrone3MediaRecordStateVideoResolutionState
373 
374 
375 // Drone acknowledges that flat trim was correctly processed.
377 {
378 private:
379  ::bebop_msgs::Ardrone3PilotingStateFlatTrimChanged::Ptr msg_ptr;
380 
381 public:
382 
383  Ardrone3PilotingStateFlatTrimChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
384  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_FLATTRIMCHANGED)
385  {
386  if (priv_nh.getParam("states/enable_pilotingstate_flattrimchanged", pub_enabled_) && pub_enabled_)
387  {
388  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
389  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStateFlatTrimChanged>(topic, 10, true);
390  } // pub_enabled_ is false
391  }
392 
393  ::bebop_msgs::Ardrone3PilotingStateFlatTrimChanged::ConstPtr GetDataCstPtr() const
394  {
395  ::boost::lock_guard<boost::mutex> lock(mutex_);
396  return msg_ptr;
397  }
398 
399  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
400  {
401  if (arguments == NULL)
402  {
403  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStateFlatTrimChanged::Update() arguments is NULL");
404  return;
405  }
406 
407  ::boost::lock_guard<boost::mutex> lock(mutex_);
408  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStateFlatTrimChanged());
409  msg_ptr->header.stamp = t;
410  msg_ptr->header.frame_id = "base_link";
411 
412 
413  if (pub_enabled_) ros_pub_.publish(msg_ptr);
414  }
415 
416 }; // Ardrone3PilotingStateFlatTrimChanged
417 
418 
419 // Flying state.
421 {
422 private:
423  ::bebop_msgs::Ardrone3PilotingStateFlyingStateChanged::Ptr msg_ptr;
424 
425 public:
426 
427  Ardrone3PilotingStateFlyingStateChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
428  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_FLYINGSTATECHANGED)
429  {
430  if (priv_nh.getParam("states/enable_pilotingstate_flyingstatechanged", pub_enabled_) && pub_enabled_)
431  {
432  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
433  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStateFlyingStateChanged>(topic, 10, true);
434  } // pub_enabled_ is false
435  }
436 
437  ::bebop_msgs::Ardrone3PilotingStateFlyingStateChanged::ConstPtr GetDataCstPtr() const
438  {
439  ::boost::lock_guard<boost::mutex> lock(mutex_);
440  return msg_ptr;
441  }
442 
443  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
444  {
445  if (arguments == NULL)
446  {
447  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStateFlyingStateChanged::Update() arguments is NULL");
448  return;
449  }
450 
451  ::boost::lock_guard<boost::mutex> lock(mutex_);
452  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStateFlyingStateChanged());
453  msg_ptr->header.stamp = t;
454  msg_ptr->header.frame_id = "base_link";
455 
456 
457  arg = NULL;
458  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_FLYINGSTATECHANGED_STATE, arg);
459  if (arg)
460  {
461  msg_ptr->state = arg->value.I32;
462  }
463 
464  if (pub_enabled_) ros_pub_.publish(msg_ptr);
465  }
466 
467 }; // Ardrone3PilotingStateFlyingStateChanged
468 
469 
470 // Alert state.
472 {
473 private:
474  ::bebop_msgs::Ardrone3PilotingStateAlertStateChanged::Ptr msg_ptr;
475 
476 public:
477 
478  Ardrone3PilotingStateAlertStateChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
479  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_ALERTSTATECHANGED)
480  {
481  if (priv_nh.getParam("states/enable_pilotingstate_alertstatechanged", pub_enabled_) && pub_enabled_)
482  {
483  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
484  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStateAlertStateChanged>(topic, 10, true);
485  } // pub_enabled_ is false
486  }
487 
488  ::bebop_msgs::Ardrone3PilotingStateAlertStateChanged::ConstPtr GetDataCstPtr() const
489  {
490  ::boost::lock_guard<boost::mutex> lock(mutex_);
491  return msg_ptr;
492  }
493 
494  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
495  {
496  if (arguments == NULL)
497  {
498  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStateAlertStateChanged::Update() arguments is NULL");
499  return;
500  }
501 
502  ::boost::lock_guard<boost::mutex> lock(mutex_);
503  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStateAlertStateChanged());
504  msg_ptr->header.stamp = t;
505  msg_ptr->header.frame_id = "base_link";
506 
507 
508  arg = NULL;
509  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_ALERTSTATECHANGED_STATE, arg);
510  if (arg)
511  {
512  msg_ptr->state = arg->value.I32;
513  }
514 
515  if (pub_enabled_) ros_pub_.publish(msg_ptr);
516  }
517 
518 }; // Ardrone3PilotingStateAlertStateChanged
519 
520 
521 // Return home state.\n Availability is related to gps fix, magnetometer calibration.
523 {
524 private:
525  ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged::Ptr msg_ptr;
526 
527 public:
528 
530  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_NAVIGATEHOMESTATECHANGED)
531  {
532  if (priv_nh.getParam("states/enable_pilotingstate_navigatehomestatechanged", pub_enabled_) && pub_enabled_)
533  {
534  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
535  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged>(topic, 10, true);
536  } // pub_enabled_ is false
537  }
538 
539  ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged::ConstPtr GetDataCstPtr() const
540  {
541  ::boost::lock_guard<boost::mutex> lock(mutex_);
542  return msg_ptr;
543  }
544 
545  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
546  {
547  if (arguments == NULL)
548  {
549  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStateNavigateHomeStateChanged::Update() arguments is NULL");
550  return;
551  }
552 
553  ::boost::lock_guard<boost::mutex> lock(mutex_);
554  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged());
555  msg_ptr->header.stamp = t;
556  msg_ptr->header.frame_id = "base_link";
557 
558 
559  arg = NULL;
560  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_NAVIGATEHOMESTATECHANGED_STATE, arg);
561  if (arg)
562  {
563  msg_ptr->state = arg->value.I32;
564  }
565 
566  arg = NULL;
567  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_NAVIGATEHOMESTATECHANGED_REASON, arg);
568  if (arg)
569  {
570  msg_ptr->reason = arg->value.I32;
571  }
572 
573  if (pub_enabled_) ros_pub_.publish(msg_ptr);
574  }
575 
576 }; // Ardrone3PilotingStateNavigateHomeStateChanged
577 
578 
579 // Drones position changed.
581 {
582 private:
583  ::bebop_msgs::Ardrone3PilotingStatePositionChanged::Ptr msg_ptr;
584 
585 public:
586 
587  Ardrone3PilotingStatePositionChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
588  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_POSITIONCHANGED)
589  {
590  if (priv_nh.getParam("states/enable_pilotingstate_positionchanged", pub_enabled_) && pub_enabled_)
591  {
592  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
593  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStatePositionChanged>(topic, 10, true);
594  } // pub_enabled_ is false
595  }
596 
597  ::bebop_msgs::Ardrone3PilotingStatePositionChanged::ConstPtr GetDataCstPtr() const
598  {
599  ::boost::lock_guard<boost::mutex> lock(mutex_);
600  return msg_ptr;
601  }
602 
603  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
604  {
605  if (arguments == NULL)
606  {
607  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStatePositionChanged::Update() arguments is NULL");
608  return;
609  }
610 
611  ::boost::lock_guard<boost::mutex> lock(mutex_);
612  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStatePositionChanged());
613  msg_ptr->header.stamp = t;
614  msg_ptr->header.frame_id = "base_link";
615 
616 
617  arg = NULL;
618  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_POSITIONCHANGED_LATITUDE, arg);
619  if (arg)
620  {
621  msg_ptr->latitude = arg->value.Double;
622  }
623 
624  arg = NULL;
625  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_POSITIONCHANGED_LONGITUDE, arg);
626  if (arg)
627  {
628  msg_ptr->longitude = arg->value.Double;
629  }
630 
631  arg = NULL;
632  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_POSITIONCHANGED_ALTITUDE, arg);
633  if (arg)
634  {
635  msg_ptr->altitude = arg->value.Double;
636  }
637 
638  if (pub_enabled_) ros_pub_.publish(msg_ptr);
639  }
640 
641 }; // Ardrone3PilotingStatePositionChanged
642 
643 
644 // Drones speed changed.\n Expressed in the NED referential (North-East-Down).
646 {
647 private:
648  ::bebop_msgs::Ardrone3PilotingStateSpeedChanged::Ptr msg_ptr;
649 
650 public:
651 
652  Ardrone3PilotingStateSpeedChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
653  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_SPEEDCHANGED)
654  {
655  if (priv_nh.getParam("states/enable_pilotingstate_speedchanged", pub_enabled_) && pub_enabled_)
656  {
657  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
658  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStateSpeedChanged>(topic, 10, true);
659  } // pub_enabled_ is false
660  }
661 
662  ::bebop_msgs::Ardrone3PilotingStateSpeedChanged::ConstPtr GetDataCstPtr() const
663  {
664  ::boost::lock_guard<boost::mutex> lock(mutex_);
665  return msg_ptr;
666  }
667 
668  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
669  {
670  if (arguments == NULL)
671  {
672  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStateSpeedChanged::Update() arguments is NULL");
673  return;
674  }
675 
676  ::boost::lock_guard<boost::mutex> lock(mutex_);
677  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStateSpeedChanged());
678  msg_ptr->header.stamp = t;
679  msg_ptr->header.frame_id = "base_link";
680 
681 
682  arg = NULL;
683  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_SPEEDCHANGED_SPEEDX, arg);
684  if (arg)
685  {
686  msg_ptr->speedX = arg->value.Float;
687  }
688 
689  arg = NULL;
690  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_SPEEDCHANGED_SPEEDY, arg);
691  if (arg)
692  {
693  msg_ptr->speedY = arg->value.Float;
694  }
695 
696  arg = NULL;
697  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_SPEEDCHANGED_SPEEDZ, arg);
698  if (arg)
699  {
700  msg_ptr->speedZ = arg->value.Float;
701  }
702 
703  if (pub_enabled_) ros_pub_.publish(msg_ptr);
704  }
705 
706 }; // Ardrone3PilotingStateSpeedChanged
707 
708 
709 // Drones attitude changed.
711 {
712 private:
713  ::bebop_msgs::Ardrone3PilotingStateAttitudeChanged::Ptr msg_ptr;
714 
715 public:
716 
717  Ardrone3PilotingStateAttitudeChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
718  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_ATTITUDECHANGED)
719  {
720  if (priv_nh.getParam("states/enable_pilotingstate_attitudechanged", pub_enabled_) && pub_enabled_)
721  {
722  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
723  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStateAttitudeChanged>(topic, 10, true);
724  } // pub_enabled_ is false
725  }
726 
727  ::bebop_msgs::Ardrone3PilotingStateAttitudeChanged::ConstPtr GetDataCstPtr() const
728  {
729  ::boost::lock_guard<boost::mutex> lock(mutex_);
730  return msg_ptr;
731  }
732 
733  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
734  {
735  if (arguments == NULL)
736  {
737  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStateAttitudeChanged::Update() arguments is NULL");
738  return;
739  }
740 
741  ::boost::lock_guard<boost::mutex> lock(mutex_);
742  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStateAttitudeChanged());
743  msg_ptr->header.stamp = t;
744  msg_ptr->header.frame_id = "base_link";
745 
746 
747  arg = NULL;
748  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_ATTITUDECHANGED_ROLL, arg);
749  if (arg)
750  {
751  msg_ptr->roll = arg->value.Float;
752  }
753 
754  arg = NULL;
755  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_ATTITUDECHANGED_PITCH, arg);
756  if (arg)
757  {
758  msg_ptr->pitch = arg->value.Float;
759  }
760 
761  arg = NULL;
762  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_ATTITUDECHANGED_YAW, arg);
763  if (arg)
764  {
765  msg_ptr->yaw = arg->value.Float;
766  }
767 
768  if (pub_enabled_) ros_pub_.publish(msg_ptr);
769  }
770 
771 }; // Ardrone3PilotingStateAttitudeChanged
772 
773 
774 // Auto takeoff mode
776 {
777 private:
778  ::bebop_msgs::Ardrone3PilotingStateAutoTakeOffModeChanged::Ptr msg_ptr;
779 
780 public:
781 
782  Ardrone3PilotingStateAutoTakeOffModeChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
783  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_AUTOTAKEOFFMODECHANGED)
784  {
785  if (priv_nh.getParam("states/enable_pilotingstate_autotakeoffmodechanged", pub_enabled_) && pub_enabled_)
786  {
787  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
788  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStateAutoTakeOffModeChanged>(topic, 10, true);
789  } // pub_enabled_ is false
790  }
791 
792  ::bebop_msgs::Ardrone3PilotingStateAutoTakeOffModeChanged::ConstPtr GetDataCstPtr() const
793  {
794  ::boost::lock_guard<boost::mutex> lock(mutex_);
795  return msg_ptr;
796  }
797 
798  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
799  {
800  if (arguments == NULL)
801  {
802  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStateAutoTakeOffModeChanged::Update() arguments is NULL");
803  return;
804  }
805 
806  ::boost::lock_guard<boost::mutex> lock(mutex_);
807  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStateAutoTakeOffModeChanged());
808  msg_ptr->header.stamp = t;
809  msg_ptr->header.frame_id = "base_link";
810 
811 
812  arg = NULL;
813  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_AUTOTAKEOFFMODECHANGED_STATE, arg);
814  if (arg)
815  {
816  msg_ptr->state = arg->value.U8;
817  }
818 
819  if (pub_enabled_) ros_pub_.publish(msg_ptr);
820  }
821 
822 }; // Ardrone3PilotingStateAutoTakeOffModeChanged
823 
824 
825 // Drones altitude changed.\n The altitude reported is the altitude above the take off point.\n To get the altitude above sea level, see [PositionChanged](#1-4-4).
827 {
828 private:
829  ::bebop_msgs::Ardrone3PilotingStateAltitudeChanged::Ptr msg_ptr;
830 
831 public:
832 
833  Ardrone3PilotingStateAltitudeChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
834  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_ALTITUDECHANGED)
835  {
836  if (priv_nh.getParam("states/enable_pilotingstate_altitudechanged", pub_enabled_) && pub_enabled_)
837  {
838  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
839  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStateAltitudeChanged>(topic, 10, true);
840  } // pub_enabled_ is false
841  }
842 
843  ::bebop_msgs::Ardrone3PilotingStateAltitudeChanged::ConstPtr GetDataCstPtr() const
844  {
845  ::boost::lock_guard<boost::mutex> lock(mutex_);
846  return msg_ptr;
847  }
848 
849  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
850  {
851  if (arguments == NULL)
852  {
853  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStateAltitudeChanged::Update() arguments is NULL");
854  return;
855  }
856 
857  ::boost::lock_guard<boost::mutex> lock(mutex_);
858  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStateAltitudeChanged());
859  msg_ptr->header.stamp = t;
860  msg_ptr->header.frame_id = "base_link";
861 
862 
863  arg = NULL;
864  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_ALTITUDECHANGED_ALTITUDE, arg);
865  if (arg)
866  {
867  msg_ptr->altitude = arg->value.Double;
868  }
869 
870  if (pub_enabled_) ros_pub_.publish(msg_ptr);
871  }
872 
873 }; // Ardrone3PilotingStateAltitudeChanged
874 
875 
876 // Drones location changed.\n This event is meant to replace [PositionChanged](#1-4-4).
878 {
879 private:
880  ::bebop_msgs::Ardrone3PilotingStateGpsLocationChanged::Ptr msg_ptr;
881 
882 public:
883 
884  Ardrone3PilotingStateGpsLocationChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
885  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_GPSLOCATIONCHANGED)
886  {
887  if (priv_nh.getParam("states/enable_pilotingstate_gpslocationchanged", pub_enabled_) && pub_enabled_)
888  {
889  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
890  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStateGpsLocationChanged>(topic, 10, true);
891  } // pub_enabled_ is false
892  }
893 
894  ::bebop_msgs::Ardrone3PilotingStateGpsLocationChanged::ConstPtr GetDataCstPtr() const
895  {
896  ::boost::lock_guard<boost::mutex> lock(mutex_);
897  return msg_ptr;
898  }
899 
900  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
901  {
902  if (arguments == NULL)
903  {
904  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStateGpsLocationChanged::Update() arguments is NULL");
905  return;
906  }
907 
908  ::boost::lock_guard<boost::mutex> lock(mutex_);
909  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStateGpsLocationChanged());
910  msg_ptr->header.stamp = t;
911  msg_ptr->header.frame_id = "base_link";
912 
913 
914  arg = NULL;
915  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_GPSLOCATIONCHANGED_LATITUDE, arg);
916  if (arg)
917  {
918  msg_ptr->latitude = arg->value.Double;
919  }
920 
921  arg = NULL;
922  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_GPSLOCATIONCHANGED_LONGITUDE, arg);
923  if (arg)
924  {
925  msg_ptr->longitude = arg->value.Double;
926  }
927 
928  arg = NULL;
929  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_GPSLOCATIONCHANGED_ALTITUDE, arg);
930  if (arg)
931  {
932  msg_ptr->altitude = arg->value.Double;
933  }
934 
935  arg = NULL;
936  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_GPSLOCATIONCHANGED_LATITUDE_ACCURACY, arg);
937  if (arg)
938  {
939  msg_ptr->latitude_accuracy = arg->value.I8;
940  }
941 
942  arg = NULL;
943  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_GPSLOCATIONCHANGED_LONGITUDE_ACCURACY, arg);
944  if (arg)
945  {
946  msg_ptr->longitude_accuracy = arg->value.I8;
947  }
948 
949  arg = NULL;
950  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_GPSLOCATIONCHANGED_ALTITUDE_ACCURACY, arg);
951  if (arg)
952  {
953  msg_ptr->altitude_accuracy = arg->value.I8;
954  }
955 
956  if (pub_enabled_) ros_pub_.publish(msg_ptr);
957  }
958 
959 }; // Ardrone3PilotingStateGpsLocationChanged
960 
961 
962 // Landing state.\n Only available for fixed wings (which have two landing modes).
964 {
965 private:
966  ::bebop_msgs::Ardrone3PilotingStateLandingStateChanged::Ptr msg_ptr;
967 
968 public:
969 
970  Ardrone3PilotingStateLandingStateChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
971  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_LANDINGSTATECHANGED)
972  {
973  if (priv_nh.getParam("states/enable_pilotingstate_landingstatechanged", pub_enabled_) && pub_enabled_)
974  {
975  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
976  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStateLandingStateChanged>(topic, 10, true);
977  } // pub_enabled_ is false
978  }
979 
980  ::bebop_msgs::Ardrone3PilotingStateLandingStateChanged::ConstPtr GetDataCstPtr() const
981  {
982  ::boost::lock_guard<boost::mutex> lock(mutex_);
983  return msg_ptr;
984  }
985 
986  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
987  {
988  if (arguments == NULL)
989  {
990  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStateLandingStateChanged::Update() arguments is NULL");
991  return;
992  }
993 
994  ::boost::lock_guard<boost::mutex> lock(mutex_);
995  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStateLandingStateChanged());
996  msg_ptr->header.stamp = t;
997  msg_ptr->header.frame_id = "base_link";
998 
999 
1000  arg = NULL;
1001  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_LANDINGSTATECHANGED_STATE, arg);
1002  if (arg)
1003  {
1004  msg_ptr->state = arg->value.I32;
1005  }
1006 
1007  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1008  }
1009 
1010 }; // Ardrone3PilotingStateLandingStateChanged
1011 
1012 
1013 // Drones air speed changed\n Expressed in the drones referential.
1015 {
1016 private:
1017  ::bebop_msgs::Ardrone3PilotingStateAirSpeedChanged::Ptr msg_ptr;
1018 
1019 public:
1020 
1021  Ardrone3PilotingStateAirSpeedChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1022  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_AIRSPEEDCHANGED)
1023  {
1024  if (priv_nh.getParam("states/enable_pilotingstate_airspeedchanged", pub_enabled_) && pub_enabled_)
1025  {
1026  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1027  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStateAirSpeedChanged>(topic, 10, true);
1028  } // pub_enabled_ is false
1029  }
1030 
1031  ::bebop_msgs::Ardrone3PilotingStateAirSpeedChanged::ConstPtr GetDataCstPtr() const
1032  {
1033  ::boost::lock_guard<boost::mutex> lock(mutex_);
1034  return msg_ptr;
1035  }
1036 
1037  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1038  {
1039  if (arguments == NULL)
1040  {
1041  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStateAirSpeedChanged::Update() arguments is NULL");
1042  return;
1043  }
1044 
1045  ::boost::lock_guard<boost::mutex> lock(mutex_);
1046  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStateAirSpeedChanged());
1047  msg_ptr->header.stamp = t;
1048  msg_ptr->header.frame_id = "base_link";
1049 
1050 
1051  arg = NULL;
1052  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_AIRSPEEDCHANGED_AIRSPEED, arg);
1053  if (arg)
1054  {
1055  msg_ptr->airSpeed = arg->value.Float;
1056  }
1057 
1058  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1059  }
1060 
1061 }; // Ardrone3PilotingStateAirSpeedChanged
1062 
1063 
1064 // The drone moves or moved to a given location.
1066 {
1067 private:
1068  ::bebop_msgs::Ardrone3PilotingStatemoveToChanged::Ptr msg_ptr;
1069 
1070 public:
1071 
1072  Ardrone3PilotingStatemoveToChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1073  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_MOVETOCHANGED)
1074  {
1075  if (priv_nh.getParam("states/enable_pilotingstate_movetochanged", pub_enabled_) && pub_enabled_)
1076  {
1077  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1078  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PilotingStatemoveToChanged>(topic, 10, true);
1079  } // pub_enabled_ is false
1080  }
1081 
1082  ::bebop_msgs::Ardrone3PilotingStatemoveToChanged::ConstPtr GetDataCstPtr() const
1083  {
1084  ::boost::lock_guard<boost::mutex> lock(mutex_);
1085  return msg_ptr;
1086  }
1087 
1088  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1089  {
1090  if (arguments == NULL)
1091  {
1092  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PilotingStatemoveToChanged::Update() arguments is NULL");
1093  return;
1094  }
1095 
1096  ::boost::lock_guard<boost::mutex> lock(mutex_);
1097  msg_ptr.reset(new ::bebop_msgs::Ardrone3PilotingStatemoveToChanged());
1098  msg_ptr->header.stamp = t;
1099  msg_ptr->header.frame_id = "base_link";
1100 
1101 
1102  arg = NULL;
1103  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_MOVETOCHANGED_LATITUDE, arg);
1104  if (arg)
1105  {
1106  msg_ptr->latitude = arg->value.Double;
1107  }
1108 
1109  arg = NULL;
1110  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_MOVETOCHANGED_LONGITUDE, arg);
1111  if (arg)
1112  {
1113  msg_ptr->longitude = arg->value.Double;
1114  }
1115 
1116  arg = NULL;
1117  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_MOVETOCHANGED_ALTITUDE, arg);
1118  if (arg)
1119  {
1120  msg_ptr->altitude = arg->value.Double;
1121  }
1122 
1123  arg = NULL;
1124  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_MOVETOCHANGED_ORIENTATION_MODE, arg);
1125  if (arg)
1126  {
1127  msg_ptr->orientation_mode = arg->value.I32;
1128  }
1129 
1130  arg = NULL;
1131  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_MOVETOCHANGED_HEADING, arg);
1132  if (arg)
1133  {
1134  msg_ptr->heading = arg->value.Float;
1135  }
1136 
1137  arg = NULL;
1138  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PILOTINGSTATE_MOVETOCHANGED_STATUS, arg);
1139  if (arg)
1140  {
1141  msg_ptr->status = arg->value.I32;
1142  }
1143 
1144  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1145  }
1146 
1147 }; // Ardrone3PilotingStatemoveToChanged
1148 
1149 
1150 // Wifi scan results.\n Please note that the list is not complete until you receive the event [WifiScanEnded](#1-14-1).
1152 {
1153 private:
1154  ::bebop_msgs::Ardrone3NetworkStateWifiScanListChanged::Ptr msg_ptr;
1155 
1156 public:
1157 
1158  Ardrone3NetworkStateWifiScanListChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1159  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_NETWORKSTATE_WIFISCANLISTCHANGED)
1160  {
1161  if (priv_nh.getParam("states/enable_networkstate_wifiscanlistchanged", pub_enabled_) && pub_enabled_)
1162  {
1163  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1164  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3NetworkStateWifiScanListChanged>(topic, 10, true);
1165  } // pub_enabled_ is false
1166  }
1167 
1168  ::bebop_msgs::Ardrone3NetworkStateWifiScanListChanged::ConstPtr GetDataCstPtr() const
1169  {
1170  ::boost::lock_guard<boost::mutex> lock(mutex_);
1171  return msg_ptr;
1172  }
1173 
1174  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1175  {
1176  if (arguments == NULL)
1177  {
1178  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3NetworkStateWifiScanListChanged::Update() arguments is NULL");
1179  return;
1180  }
1181 
1182  ::boost::lock_guard<boost::mutex> lock(mutex_);
1183  msg_ptr.reset(new ::bebop_msgs::Ardrone3NetworkStateWifiScanListChanged());
1184  msg_ptr->header.stamp = t;
1185  msg_ptr->header.frame_id = "base_link";
1186 
1187 
1188  arg = NULL;
1189  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_NETWORKSTATE_WIFISCANLISTCHANGED_SSID, arg);
1190  if (arg)
1191  {
1192  msg_ptr->ssid = arg->value.String;
1193  }
1194 
1195  arg = NULL;
1196  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_NETWORKSTATE_WIFISCANLISTCHANGED_RSSI, arg);
1197  if (arg)
1198  {
1199  msg_ptr->rssi = arg->value.I16;
1200  }
1201 
1202  arg = NULL;
1203  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_NETWORKSTATE_WIFISCANLISTCHANGED_BAND, arg);
1204  if (arg)
1205  {
1206  msg_ptr->band = arg->value.I32;
1207  }
1208 
1209  arg = NULL;
1210  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_NETWORKSTATE_WIFISCANLISTCHANGED_CHANNEL, arg);
1211  if (arg)
1212  {
1213  msg_ptr->channel = arg->value.U8;
1214  }
1215 
1216  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1217  }
1218 
1219 }; // Ardrone3NetworkStateWifiScanListChanged
1220 
1221 
1222 // Wifi scan ended.\n When receiving this event, the list of [WifiScanResults](#1-14-0) is complete.
1224 {
1225 private:
1226  ::bebop_msgs::Ardrone3NetworkStateAllWifiScanChanged::Ptr msg_ptr;
1227 
1228 public:
1229 
1230  Ardrone3NetworkStateAllWifiScanChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1231  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_NETWORKSTATE_ALLWIFISCANCHANGED)
1232  {
1233  if (priv_nh.getParam("states/enable_networkstate_allwifiscanchanged", pub_enabled_) && pub_enabled_)
1234  {
1235  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1236  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3NetworkStateAllWifiScanChanged>(topic, 10, true);
1237  } // pub_enabled_ is false
1238  }
1239 
1240  ::bebop_msgs::Ardrone3NetworkStateAllWifiScanChanged::ConstPtr GetDataCstPtr() const
1241  {
1242  ::boost::lock_guard<boost::mutex> lock(mutex_);
1243  return msg_ptr;
1244  }
1245 
1246  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1247  {
1248  if (arguments == NULL)
1249  {
1250  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3NetworkStateAllWifiScanChanged::Update() arguments is NULL");
1251  return;
1252  }
1253 
1254  ::boost::lock_guard<boost::mutex> lock(mutex_);
1255  msg_ptr.reset(new ::bebop_msgs::Ardrone3NetworkStateAllWifiScanChanged());
1256  msg_ptr->header.stamp = t;
1257  msg_ptr->header.frame_id = "base_link";
1258 
1259 
1260  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1261  }
1262 
1263 }; // Ardrone3NetworkStateAllWifiScanChanged
1264 
1265 
1266 // Available wifi channels.\n Please note that the list is not complete until you receive the event [AvailableWifiChannelsCompleted](#1-14-3).
1268 {
1269 private:
1270  ::bebop_msgs::Ardrone3NetworkStateWifiAuthChannelListChanged::Ptr msg_ptr;
1271 
1272 public:
1273 
1275  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_NETWORKSTATE_WIFIAUTHCHANNELLISTCHANGED)
1276  {
1277  if (priv_nh.getParam("states/enable_networkstate_wifiauthchannellistchanged", pub_enabled_) && pub_enabled_)
1278  {
1279  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1280  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3NetworkStateWifiAuthChannelListChanged>(topic, 10, true);
1281  } // pub_enabled_ is false
1282  }
1283 
1284  ::bebop_msgs::Ardrone3NetworkStateWifiAuthChannelListChanged::ConstPtr GetDataCstPtr() const
1285  {
1286  ::boost::lock_guard<boost::mutex> lock(mutex_);
1287  return msg_ptr;
1288  }
1289 
1290  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1291  {
1292  if (arguments == NULL)
1293  {
1294  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3NetworkStateWifiAuthChannelListChanged::Update() arguments is NULL");
1295  return;
1296  }
1297 
1298  ::boost::lock_guard<boost::mutex> lock(mutex_);
1299  msg_ptr.reset(new ::bebop_msgs::Ardrone3NetworkStateWifiAuthChannelListChanged());
1300  msg_ptr->header.stamp = t;
1301  msg_ptr->header.frame_id = "base_link";
1302 
1303 
1304  arg = NULL;
1305  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_NETWORKSTATE_WIFIAUTHCHANNELLISTCHANGED_BAND, arg);
1306  if (arg)
1307  {
1308  msg_ptr->band = arg->value.I32;
1309  }
1310 
1311  arg = NULL;
1312  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_NETWORKSTATE_WIFIAUTHCHANNELLISTCHANGED_CHANNEL, arg);
1313  if (arg)
1314  {
1315  msg_ptr->channel = arg->value.U8;
1316  }
1317 
1318  arg = NULL;
1319  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_NETWORKSTATE_WIFIAUTHCHANNELLISTCHANGED_IN_OR_OUT, arg);
1320  if (arg)
1321  {
1322  msg_ptr->in_or_out = arg->value.U8;
1323  }
1324 
1325  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1326  }
1327 
1328 }; // Ardrone3NetworkStateWifiAuthChannelListChanged
1329 
1330 
1331 // Available wifi channels completed.\n When receiving this event, the list of [AvailableWifiChannels](#1-14-2) is complete.
1333 {
1334 private:
1335  ::bebop_msgs::Ardrone3NetworkStateAllWifiAuthChannelChanged::Ptr msg_ptr;
1336 
1337 public:
1338 
1340  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_NETWORKSTATE_ALLWIFIAUTHCHANNELCHANGED)
1341  {
1342  if (priv_nh.getParam("states/enable_networkstate_allwifiauthchannelchanged", pub_enabled_) && pub_enabled_)
1343  {
1344  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1345  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3NetworkStateAllWifiAuthChannelChanged>(topic, 10, true);
1346  } // pub_enabled_ is false
1347  }
1348 
1349  ::bebop_msgs::Ardrone3NetworkStateAllWifiAuthChannelChanged::ConstPtr GetDataCstPtr() const
1350  {
1351  ::boost::lock_guard<boost::mutex> lock(mutex_);
1352  return msg_ptr;
1353  }
1354 
1355  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1356  {
1357  if (arguments == NULL)
1358  {
1359  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3NetworkStateAllWifiAuthChannelChanged::Update() arguments is NULL");
1360  return;
1361  }
1362 
1363  ::boost::lock_guard<boost::mutex> lock(mutex_);
1364  msg_ptr.reset(new ::bebop_msgs::Ardrone3NetworkStateAllWifiAuthChannelChanged());
1365  msg_ptr->header.stamp = t;
1366  msg_ptr->header.frame_id = "base_link";
1367 
1368 
1369  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1370  }
1371 
1372 }; // Ardrone3NetworkStateAllWifiAuthChannelChanged
1373 
1374 
1375 // Video stream state.
1377 {
1378 private:
1379  ::bebop_msgs::Ardrone3MediaStreamingStateVideoEnableChanged::Ptr msg_ptr;
1380 
1381 public:
1382 
1384  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIASTREAMINGSTATE_VIDEOENABLECHANGED)
1385  {
1386  if (priv_nh.getParam("states/enable_mediastreamingstate_videoenablechanged", pub_enabled_) && pub_enabled_)
1387  {
1388  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1389  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3MediaStreamingStateVideoEnableChanged>(topic, 10, true);
1390  } // pub_enabled_ is false
1391  }
1392 
1393  ::bebop_msgs::Ardrone3MediaStreamingStateVideoEnableChanged::ConstPtr GetDataCstPtr() const
1394  {
1395  ::boost::lock_guard<boost::mutex> lock(mutex_);
1396  return msg_ptr;
1397  }
1398 
1399  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1400  {
1401  if (arguments == NULL)
1402  {
1403  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3MediaStreamingStateVideoEnableChanged::Update() arguments is NULL");
1404  return;
1405  }
1406 
1407  ::boost::lock_guard<boost::mutex> lock(mutex_);
1408  msg_ptr.reset(new ::bebop_msgs::Ardrone3MediaStreamingStateVideoEnableChanged());
1409  msg_ptr->header.stamp = t;
1410  msg_ptr->header.frame_id = "base_link";
1411 
1412 
1413  arg = NULL;
1414  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIASTREAMINGSTATE_VIDEOENABLECHANGED_ENABLED, arg);
1415  if (arg)
1416  {
1417  msg_ptr->enabled = arg->value.I32;
1418  }
1419 
1420  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1421  }
1422 
1423 }; // Ardrone3MediaStreamingStateVideoEnableChanged
1424 
1425 
1426 //
1428 {
1429 private:
1430  ::bebop_msgs::Ardrone3MediaStreamingStateVideoStreamModeChanged::Ptr msg_ptr;
1431 
1432 public:
1433 
1435  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIASTREAMINGSTATE_VIDEOSTREAMMODECHANGED)
1436  {
1437  if (priv_nh.getParam("states/enable_mediastreamingstate_videostreammodechanged", pub_enabled_) && pub_enabled_)
1438  {
1439  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1440  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3MediaStreamingStateVideoStreamModeChanged>(topic, 10, true);
1441  } // pub_enabled_ is false
1442  }
1443 
1444  ::bebop_msgs::Ardrone3MediaStreamingStateVideoStreamModeChanged::ConstPtr GetDataCstPtr() const
1445  {
1446  ::boost::lock_guard<boost::mutex> lock(mutex_);
1447  return msg_ptr;
1448  }
1449 
1450  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1451  {
1452  if (arguments == NULL)
1453  {
1454  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3MediaStreamingStateVideoStreamModeChanged::Update() arguments is NULL");
1455  return;
1456  }
1457 
1458  ::boost::lock_guard<boost::mutex> lock(mutex_);
1459  msg_ptr.reset(new ::bebop_msgs::Ardrone3MediaStreamingStateVideoStreamModeChanged());
1460  msg_ptr->header.stamp = t;
1461  msg_ptr->header.frame_id = "base_link";
1462 
1463 
1464  arg = NULL;
1465  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_MEDIASTREAMINGSTATE_VIDEOSTREAMMODECHANGED_MODE, arg);
1466  if (arg)
1467  {
1468  msg_ptr->mode = arg->value.I32;
1469  }
1470 
1471  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1472  }
1473 
1474 }; // Ardrone3MediaStreamingStateVideoStreamModeChanged
1475 
1476 
1477 // Camera orientation.
1479 {
1480 private:
1481  ::bebop_msgs::Ardrone3CameraStateOrientation::Ptr msg_ptr;
1482 
1483 public:
1484 
1485  Ardrone3CameraStateOrientation(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1486  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_ORIENTATION)
1487  {
1488  if (priv_nh.getParam("states/enable_camerastate_orientation", pub_enabled_) && pub_enabled_)
1489  {
1490  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1491  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3CameraStateOrientation>(topic, 10, true);
1492  } // pub_enabled_ is false
1493  }
1494 
1495  ::bebop_msgs::Ardrone3CameraStateOrientation::ConstPtr GetDataCstPtr() const
1496  {
1497  ::boost::lock_guard<boost::mutex> lock(mutex_);
1498  return msg_ptr;
1499  }
1500 
1501  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1502  {
1503  if (arguments == NULL)
1504  {
1505  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3CameraStateOrientation::Update() arguments is NULL");
1506  return;
1507  }
1508 
1509  ::boost::lock_guard<boost::mutex> lock(mutex_);
1510  msg_ptr.reset(new ::bebop_msgs::Ardrone3CameraStateOrientation());
1511  msg_ptr->header.stamp = t;
1512  msg_ptr->header.frame_id = "base_link";
1513 
1514 
1515  arg = NULL;
1516  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_ORIENTATION_TILT, arg);
1517  if (arg)
1518  {
1519  msg_ptr->tilt = arg->value.I8;
1520  }
1521 
1522  arg = NULL;
1523  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_ORIENTATION_PAN, arg);
1524  if (arg)
1525  {
1526  msg_ptr->pan = arg->value.I8;
1527  }
1528 
1529  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1530  }
1531 
1532 }; // Ardrone3CameraStateOrientation
1533 
1534 
1535 // Orientation of the center of the camera.\n This is the value to send when you want to center the camera.
1537 {
1538 private:
1539  ::bebop_msgs::Ardrone3CameraStatedefaultCameraOrientation::Ptr msg_ptr;
1540 
1541 public:
1542 
1543  Ardrone3CameraStatedefaultCameraOrientation(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1544  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_DEFAULTCAMERAORIENTATION)
1545  {
1546  if (priv_nh.getParam("states/enable_camerastate_defaultcameraorientation", pub_enabled_) && pub_enabled_)
1547  {
1548  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1549  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3CameraStatedefaultCameraOrientation>(topic, 10, true);
1550  } // pub_enabled_ is false
1551  }
1552 
1553  ::bebop_msgs::Ardrone3CameraStatedefaultCameraOrientation::ConstPtr GetDataCstPtr() const
1554  {
1555  ::boost::lock_guard<boost::mutex> lock(mutex_);
1556  return msg_ptr;
1557  }
1558 
1559  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1560  {
1561  if (arguments == NULL)
1562  {
1563  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3CameraStatedefaultCameraOrientation::Update() arguments is NULL");
1564  return;
1565  }
1566 
1567  ::boost::lock_guard<boost::mutex> lock(mutex_);
1568  msg_ptr.reset(new ::bebop_msgs::Ardrone3CameraStatedefaultCameraOrientation());
1569  msg_ptr->header.stamp = t;
1570  msg_ptr->header.frame_id = "base_link";
1571 
1572 
1573  arg = NULL;
1574  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_DEFAULTCAMERAORIENTATION_TILT, arg);
1575  if (arg)
1576  {
1577  msg_ptr->tilt = arg->value.I8;
1578  }
1579 
1580  arg = NULL;
1581  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_DEFAULTCAMERAORIENTATION_PAN, arg);
1582  if (arg)
1583  {
1584  msg_ptr->pan = arg->value.I8;
1585  }
1586 
1587  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1588  }
1589 
1590 }; // Ardrone3CameraStatedefaultCameraOrientation
1591 
1592 
1593 // Camera orientation with float arguments.
1595 {
1596 private:
1597  ::bebop_msgs::Ardrone3CameraStateOrientationV2::Ptr msg_ptr;
1598 
1599 public:
1600 
1601  Ardrone3CameraStateOrientationV2(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1602  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_ORIENTATIONV2)
1603  {
1604  if (priv_nh.getParam("states/enable_camerastate_orientationv2", pub_enabled_) && pub_enabled_)
1605  {
1606  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1607  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3CameraStateOrientationV2>(topic, 10, true);
1608  } // pub_enabled_ is false
1609  }
1610 
1611  ::bebop_msgs::Ardrone3CameraStateOrientationV2::ConstPtr GetDataCstPtr() const
1612  {
1613  ::boost::lock_guard<boost::mutex> lock(mutex_);
1614  return msg_ptr;
1615  }
1616 
1617  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1618  {
1619  if (arguments == NULL)
1620  {
1621  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3CameraStateOrientationV2::Update() arguments is NULL");
1622  return;
1623  }
1624 
1625  ::boost::lock_guard<boost::mutex> lock(mutex_);
1626  msg_ptr.reset(new ::bebop_msgs::Ardrone3CameraStateOrientationV2());
1627  msg_ptr->header.stamp = t;
1628  msg_ptr->header.frame_id = "base_link";
1629 
1630 
1631  arg = NULL;
1632  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_ORIENTATIONV2_TILT, arg);
1633  if (arg)
1634  {
1635  msg_ptr->tilt = arg->value.Float;
1636  }
1637 
1638  arg = NULL;
1639  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_ORIENTATIONV2_PAN, arg);
1640  if (arg)
1641  {
1642  msg_ptr->pan = arg->value.Float;
1643  }
1644 
1645  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1646  }
1647 
1648 }; // Ardrone3CameraStateOrientationV2
1649 
1650 
1651 // Orientation of the center of the camera.\n This is the value to send when you want to center the camera.
1653 {
1654 private:
1655  ::bebop_msgs::Ardrone3CameraStatedefaultCameraOrientationV2::Ptr msg_ptr;
1656 
1657 public:
1658 
1660  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_DEFAULTCAMERAORIENTATIONV2)
1661  {
1662  if (priv_nh.getParam("states/enable_camerastate_defaultcameraorientationv2", pub_enabled_) && pub_enabled_)
1663  {
1664  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1665  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3CameraStatedefaultCameraOrientationV2>(topic, 10, true);
1666  } // pub_enabled_ is false
1667  }
1668 
1669  ::bebop_msgs::Ardrone3CameraStatedefaultCameraOrientationV2::ConstPtr GetDataCstPtr() const
1670  {
1671  ::boost::lock_guard<boost::mutex> lock(mutex_);
1672  return msg_ptr;
1673  }
1674 
1675  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1676  {
1677  if (arguments == NULL)
1678  {
1679  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3CameraStatedefaultCameraOrientationV2::Update() arguments is NULL");
1680  return;
1681  }
1682 
1683  ::boost::lock_guard<boost::mutex> lock(mutex_);
1684  msg_ptr.reset(new ::bebop_msgs::Ardrone3CameraStatedefaultCameraOrientationV2());
1685  msg_ptr->header.stamp = t;
1686  msg_ptr->header.frame_id = "base_link";
1687 
1688 
1689  arg = NULL;
1690  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_DEFAULTCAMERAORIENTATIONV2_TILT, arg);
1691  if (arg)
1692  {
1693  msg_ptr->tilt = arg->value.Float;
1694  }
1695 
1696  arg = NULL;
1697  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_DEFAULTCAMERAORIENTATIONV2_PAN, arg);
1698  if (arg)
1699  {
1700  msg_ptr->pan = arg->value.Float;
1701  }
1702 
1703  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1704  }
1705 
1706 }; // Ardrone3CameraStatedefaultCameraOrientationV2
1707 
1708 
1709 // Camera Orientation velocity limits.
1711 {
1712 private:
1713  ::bebop_msgs::Ardrone3CameraStateVelocityRange::Ptr msg_ptr;
1714 
1715 public:
1716 
1717  Ardrone3CameraStateVelocityRange(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1718  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_VELOCITYRANGE)
1719  {
1720  if (priv_nh.getParam("states/enable_camerastate_velocityrange", pub_enabled_) && pub_enabled_)
1721  {
1722  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1723  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3CameraStateVelocityRange>(topic, 10, true);
1724  } // pub_enabled_ is false
1725  }
1726 
1727  ::bebop_msgs::Ardrone3CameraStateVelocityRange::ConstPtr GetDataCstPtr() const
1728  {
1729  ::boost::lock_guard<boost::mutex> lock(mutex_);
1730  return msg_ptr;
1731  }
1732 
1733  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1734  {
1735  if (arguments == NULL)
1736  {
1737  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3CameraStateVelocityRange::Update() arguments is NULL");
1738  return;
1739  }
1740 
1741  ::boost::lock_guard<boost::mutex> lock(mutex_);
1742  msg_ptr.reset(new ::bebop_msgs::Ardrone3CameraStateVelocityRange());
1743  msg_ptr->header.stamp = t;
1744  msg_ptr->header.frame_id = "base_link";
1745 
1746 
1747  arg = NULL;
1748  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_VELOCITYRANGE_MAX_TILT, arg);
1749  if (arg)
1750  {
1751  msg_ptr->max_tilt = arg->value.Float;
1752  }
1753 
1754  arg = NULL;
1755  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_CAMERASTATE_VELOCITYRANGE_MAX_PAN, arg);
1756  if (arg)
1757  {
1758  msg_ptr->max_pan = arg->value.Float;
1759  }
1760 
1761  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1762  }
1763 
1764 }; // Ardrone3CameraStateVelocityRange
1765 
1766 
1767 // Electric frequency.\n This piece of information is used for the antiflickering when the [AntiflickeringMode](#1-30-1) is set to *auto*.
1769 {
1770 private:
1771  ::bebop_msgs::Ardrone3AntiflickeringStateelectricFrequencyChanged::Ptr msg_ptr;
1772 
1773 public:
1774 
1776  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_ANTIFLICKERINGSTATE_ELECTRICFREQUENCYCHANGED)
1777  {
1778  if (priv_nh.getParam("states/enable_antiflickeringstate_electricfrequencychanged", pub_enabled_) && pub_enabled_)
1779  {
1780  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1781  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3AntiflickeringStateelectricFrequencyChanged>(topic, 10, true);
1782  } // pub_enabled_ is false
1783  }
1784 
1785  ::bebop_msgs::Ardrone3AntiflickeringStateelectricFrequencyChanged::ConstPtr GetDataCstPtr() const
1786  {
1787  ::boost::lock_guard<boost::mutex> lock(mutex_);
1788  return msg_ptr;
1789  }
1790 
1791  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1792  {
1793  if (arguments == NULL)
1794  {
1795  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3AntiflickeringStateelectricFrequencyChanged::Update() arguments is NULL");
1796  return;
1797  }
1798 
1799  ::boost::lock_guard<boost::mutex> lock(mutex_);
1800  msg_ptr.reset(new ::bebop_msgs::Ardrone3AntiflickeringStateelectricFrequencyChanged());
1801  msg_ptr->header.stamp = t;
1802  msg_ptr->header.frame_id = "base_link";
1803 
1804 
1805  arg = NULL;
1806  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_ANTIFLICKERINGSTATE_ELECTRICFREQUENCYCHANGED_FREQUENCY, arg);
1807  if (arg)
1808  {
1809  msg_ptr->frequency = arg->value.I32;
1810  }
1811 
1812  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1813  }
1814 
1815 }; // Ardrone3AntiflickeringStateelectricFrequencyChanged
1816 
1817 
1818 // Antiflickering mode.
1820 {
1821 private:
1822  ::bebop_msgs::Ardrone3AntiflickeringStatemodeChanged::Ptr msg_ptr;
1823 
1824 public:
1825 
1826  Ardrone3AntiflickeringStatemodeChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1827  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_ANTIFLICKERINGSTATE_MODECHANGED)
1828  {
1829  if (priv_nh.getParam("states/enable_antiflickeringstate_modechanged", pub_enabled_) && pub_enabled_)
1830  {
1831  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1832  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3AntiflickeringStatemodeChanged>(topic, 10, true);
1833  } // pub_enabled_ is false
1834  }
1835 
1836  ::bebop_msgs::Ardrone3AntiflickeringStatemodeChanged::ConstPtr GetDataCstPtr() const
1837  {
1838  ::boost::lock_guard<boost::mutex> lock(mutex_);
1839  return msg_ptr;
1840  }
1841 
1842  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1843  {
1844  if (arguments == NULL)
1845  {
1846  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3AntiflickeringStatemodeChanged::Update() arguments is NULL");
1847  return;
1848  }
1849 
1850  ::boost::lock_guard<boost::mutex> lock(mutex_);
1851  msg_ptr.reset(new ::bebop_msgs::Ardrone3AntiflickeringStatemodeChanged());
1852  msg_ptr->header.stamp = t;
1853  msg_ptr->header.frame_id = "base_link";
1854 
1855 
1856  arg = NULL;
1857  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_ANTIFLICKERINGSTATE_MODECHANGED_MODE, arg);
1858  if (arg)
1859  {
1860  msg_ptr->mode = arg->value.I32;
1861  }
1862 
1863  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1864  }
1865 
1866 }; // Ardrone3AntiflickeringStatemodeChanged
1867 
1868 
1869 // Number of GPS satellites.
1871 {
1872 private:
1873  ::bebop_msgs::Ardrone3GPSStateNumberOfSatelliteChanged::Ptr msg_ptr;
1874 
1875 public:
1876 
1877  Ardrone3GPSStateNumberOfSatelliteChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1878  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_GPSSTATE_NUMBEROFSATELLITECHANGED)
1879  {
1880  if (priv_nh.getParam("states/enable_gpsstate_numberofsatellitechanged", pub_enabled_) && pub_enabled_)
1881  {
1882  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1883  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3GPSStateNumberOfSatelliteChanged>(topic, 10, true);
1884  } // pub_enabled_ is false
1885  }
1886 
1887  ::bebop_msgs::Ardrone3GPSStateNumberOfSatelliteChanged::ConstPtr GetDataCstPtr() const
1888  {
1889  ::boost::lock_guard<boost::mutex> lock(mutex_);
1890  return msg_ptr;
1891  }
1892 
1893  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1894  {
1895  if (arguments == NULL)
1896  {
1897  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3GPSStateNumberOfSatelliteChanged::Update() arguments is NULL");
1898  return;
1899  }
1900 
1901  ::boost::lock_guard<boost::mutex> lock(mutex_);
1902  msg_ptr.reset(new ::bebop_msgs::Ardrone3GPSStateNumberOfSatelliteChanged());
1903  msg_ptr->header.stamp = t;
1904  msg_ptr->header.frame_id = "base_link";
1905 
1906 
1907  arg = NULL;
1908  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_GPSSTATE_NUMBEROFSATELLITECHANGED_NUMBEROFSATELLITE, arg);
1909  if (arg)
1910  {
1911  msg_ptr->numberOfSatellite = arg->value.U8;
1912  }
1913 
1914  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1915  }
1916 
1917 }; // Ardrone3GPSStateNumberOfSatelliteChanged
1918 
1919 
1920 // Home type availability.
1922 {
1923 private:
1924  ::bebop_msgs::Ardrone3GPSStateHomeTypeAvailabilityChanged::Ptr msg_ptr;
1925 
1926 public:
1927 
1928  Ardrone3GPSStateHomeTypeAvailabilityChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1929  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_GPSSTATE_HOMETYPEAVAILABILITYCHANGED)
1930  {
1931  if (priv_nh.getParam("states/enable_gpsstate_hometypeavailabilitychanged", pub_enabled_) && pub_enabled_)
1932  {
1933  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1934  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3GPSStateHomeTypeAvailabilityChanged>(topic, 10, true);
1935  } // pub_enabled_ is false
1936  }
1937 
1938  ::bebop_msgs::Ardrone3GPSStateHomeTypeAvailabilityChanged::ConstPtr GetDataCstPtr() const
1939  {
1940  ::boost::lock_guard<boost::mutex> lock(mutex_);
1941  return msg_ptr;
1942  }
1943 
1944  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
1945  {
1946  if (arguments == NULL)
1947  {
1948  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3GPSStateHomeTypeAvailabilityChanged::Update() arguments is NULL");
1949  return;
1950  }
1951 
1952  ::boost::lock_guard<boost::mutex> lock(mutex_);
1953  msg_ptr.reset(new ::bebop_msgs::Ardrone3GPSStateHomeTypeAvailabilityChanged());
1954  msg_ptr->header.stamp = t;
1955  msg_ptr->header.frame_id = "base_link";
1956 
1957 
1958  arg = NULL;
1959  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_GPSSTATE_HOMETYPEAVAILABILITYCHANGED_TYPE, arg);
1960  if (arg)
1961  {
1962  msg_ptr->type = arg->value.I32;
1963  }
1964 
1965  arg = NULL;
1966  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_GPSSTATE_HOMETYPEAVAILABILITYCHANGED_AVAILABLE, arg);
1967  if (arg)
1968  {
1969  msg_ptr->available = arg->value.U8;
1970  }
1971 
1972  if (pub_enabled_) ros_pub_.publish(msg_ptr);
1973  }
1974 
1975 }; // Ardrone3GPSStateHomeTypeAvailabilityChanged
1976 
1977 
1978 // Home type.\n This choice is made by the drone, according to the [PreferredHomeType](#1-24-4) and the [HomeTypeAvailability](#1-31-1). The drone will choose the type matching with the user preference only if this type is available. If not, it will chose a type in this order:\n FOLLOWEE ; TAKEOFF ; PILOT ; FIRST_FIX
1980 {
1981 private:
1982  ::bebop_msgs::Ardrone3GPSStateHomeTypeChosenChanged::Ptr msg_ptr;
1983 
1984 public:
1985 
1986  Ardrone3GPSStateHomeTypeChosenChanged(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
1987  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_GPSSTATE_HOMETYPECHOSENCHANGED)
1988  {
1989  if (priv_nh.getParam("states/enable_gpsstate_hometypechosenchanged", pub_enabled_) && pub_enabled_)
1990  {
1991  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
1992  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3GPSStateHomeTypeChosenChanged>(topic, 10, true);
1993  } // pub_enabled_ is false
1994  }
1995 
1996  ::bebop_msgs::Ardrone3GPSStateHomeTypeChosenChanged::ConstPtr GetDataCstPtr() const
1997  {
1998  ::boost::lock_guard<boost::mutex> lock(mutex_);
1999  return msg_ptr;
2000  }
2001 
2002  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
2003  {
2004  if (arguments == NULL)
2005  {
2006  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3GPSStateHomeTypeChosenChanged::Update() arguments is NULL");
2007  return;
2008  }
2009 
2010  ::boost::lock_guard<boost::mutex> lock(mutex_);
2011  msg_ptr.reset(new ::bebop_msgs::Ardrone3GPSStateHomeTypeChosenChanged());
2012  msg_ptr->header.stamp = t;
2013  msg_ptr->header.frame_id = "base_link";
2014 
2015 
2016  arg = NULL;
2017  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_GPSSTATE_HOMETYPECHOSENCHANGED_TYPE, arg);
2018  if (arg)
2019  {
2020  msg_ptr->type = arg->value.I32;
2021  }
2022 
2023  if (pub_enabled_) ros_pub_.publish(msg_ptr);
2024  }
2025 
2026 }; // Ardrone3GPSStateHomeTypeChosenChanged
2027 
2028 
2029 // Pro features.
2031 {
2032 private:
2033  ::bebop_msgs::Ardrone3PROStateFeatures::Ptr msg_ptr;
2034 
2035 public:
2036 
2037  Ardrone3PROStateFeatures(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
2038  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PROSTATE_FEATURES)
2039  {
2040  if (priv_nh.getParam("states/enable_prostate_features", pub_enabled_) && pub_enabled_)
2041  {
2042  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
2043  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3PROStateFeatures>(topic, 10, true);
2044  } // pub_enabled_ is false
2045  }
2046 
2047  ::bebop_msgs::Ardrone3PROStateFeatures::ConstPtr GetDataCstPtr() const
2048  {
2049  ::boost::lock_guard<boost::mutex> lock(mutex_);
2050  return msg_ptr;
2051  }
2052 
2053  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
2054  {
2055  if (arguments == NULL)
2056  {
2057  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3PROStateFeatures::Update() arguments is NULL");
2058  return;
2059  }
2060 
2061  ::boost::lock_guard<boost::mutex> lock(mutex_);
2062  msg_ptr.reset(new ::bebop_msgs::Ardrone3PROStateFeatures());
2063  msg_ptr->header.stamp = t;
2064  msg_ptr->header.frame_id = "base_link";
2065 
2066 
2067  arg = NULL;
2068  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_PROSTATE_FEATURES_FEATURES, arg);
2069  if (arg)
2070  {
2071  msg_ptr->features = arg->value.U64;
2072  }
2073 
2074  if (pub_enabled_) ros_pub_.publish(msg_ptr);
2075  }
2076 
2077 }; // Ardrone3PROStateFeatures
2078 
2079 
2080 // List of all connected accessories. This event presents the list of all connected accessories. To actually use the component, use the component dedicated feature.
2082 {
2083 private:
2084  ::bebop_msgs::Ardrone3AccessoryStateConnectedAccessories::Ptr msg_ptr;
2085 
2086 public:
2087 
2088  Ardrone3AccessoryStateConnectedAccessories(::ros::NodeHandle& nh, ::ros::NodeHandle& priv_nh, const ::std::string& topic)
2089  : AbstractState(ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_ACCESSORYSTATE_CONNECTEDACCESSORIES)
2090  {
2091  if (priv_nh.getParam("states/enable_accessorystate_connectedaccessories", pub_enabled_) && pub_enabled_)
2092  {
2093  ARSAL_PRINT(ARSAL_PRINT_INFO, "CB" , "[STATES] Enabling %s", topic.c_str());
2094  ros_pub_ = nh.advertise<bebop_msgs::Ardrone3AccessoryStateConnectedAccessories>(topic, 10, true);
2095  } // pub_enabled_ is false
2096  }
2097 
2098  ::bebop_msgs::Ardrone3AccessoryStateConnectedAccessories::ConstPtr GetDataCstPtr() const
2099  {
2100  ::boost::lock_guard<boost::mutex> lock(mutex_);
2101  return msg_ptr;
2102  }
2103 
2104  void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time& t)
2105  {
2106  if (arguments == NULL)
2107  {
2108  ARSAL_PRINT(ARSAL_PRINT_WARNING, "CB", "Ardrone3AccessoryStateConnectedAccessories::Update() arguments is NULL");
2109  return;
2110  }
2111 
2112  ::boost::lock_guard<boost::mutex> lock(mutex_);
2113  msg_ptr.reset(new ::bebop_msgs::Ardrone3AccessoryStateConnectedAccessories());
2114  msg_ptr->header.stamp = t;
2115  msg_ptr->header.frame_id = "base_link";
2116 
2117 
2118  arg = NULL;
2119  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_ACCESSORYSTATE_CONNECTEDACCESSORIES_ID, arg);
2120  if (arg)
2121  {
2122  msg_ptr->id = arg->value.U8;
2123  }
2124 
2125  arg = NULL;
2126  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_ACCESSORYSTATE_CONNECTEDACCESSORIES_ACCESSORY_TYPE, arg);
2127  if (arg)
2128  {
2129  msg_ptr->accessory_type = arg->value.I32;
2130  }
2131 
2132  arg = NULL;
2133  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_ACCESSORYSTATE_CONNECTEDACCESSORIES_UID, arg);
2134  if (arg)
2135  {
2136  msg_ptr->uid = arg->value.String;
2137  }
2138 
2139  arg = NULL;
2140  HASH_FIND_STR (arguments, ARCONTROLLER_DICTIONARY_KEY_ARDRONE3_ACCESSORYSTATE_CONNECTEDACCESSORIES_SWVERSION, arg);
2141  if (arg)
2142  {
2143  msg_ptr->swVersion = arg->value.String;
2144  }
2145 
2146  if (pub_enabled_) ros_pub_.publish(msg_ptr);
2147  }
2148 
2149 }; // Ardrone3AccessoryStateConnectedAccessories
2150 
2151 
2152 } // namespace cb
2153 } // namespace bebop_driver
2154 #endif // BEBOP_AUTONOMY_AUTOGENERATED_ardrone3_STATE_CALLBACKS_H
::bebop_msgs::Ardrone3GPSStateHomeTypeAvailabilityChanged::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3PilotingStateAttitudeChanged::ConstPtr GetDataCstPtr() const
Ardrone3MediaRecordStatePictureStateChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3NetworkStateWifiAuthChannelListChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3AntiflickeringStatemodeChanged::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3PilotingStateAlertStateChanged::ConstPtr GetDataCstPtr() const
Ardrone3AccessoryStateConnectedAccessories(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3PROStateFeatures(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3PilotingStateAltitudeChanged::Ptr msg_ptr
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3CameraStatedefaultCameraOrientationV2::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3PilotingStateLandingStateChanged::ConstPtr GetDataCstPtr() const
void publish(const boost::shared_ptr< M > &message) const
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3CameraStatedefaultCameraOrientation::ConstPtr GetDataCstPtr() const
Ardrone3AntiflickeringStatemodeChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3PilotingStateAttitudeChanged::Ptr msg_ptr
Ardrone3PilotingStateAltitudeChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3GPSStateNumberOfSatelliteChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3PilotingStateLandingStateChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3MediaRecordStateVideoStateChangedV2::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3CameraStateVelocityRange::Ptr msg_ptr
Ardrone3CameraStateOrientationV2(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3PilotingStatemoveToChanged::ConstPtr GetDataCstPtr() const
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
Ardrone3PilotingStateAutoTakeOffModeChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3AccessoryStateConnectedAccessories::Ptr msg_ptr
::bebop_msgs::Ardrone3PilotingStatemoveToChanged::Ptr msg_ptr
Ardrone3PilotingStateGpsLocationChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3AntiflickeringStateelectricFrequencyChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3MediaStreamingStateVideoStreamModeChanged::ConstPtr GetDataCstPtr() const
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
Ardrone3PilotingStateAttitudeChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3PROStateFeatures::Ptr msg_ptr
Ardrone3MediaRecordStateVideoStateChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3PilotingStateFlatTrimChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3MediaRecordStateVideoResolutionState(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3MediaRecordStatePictureStateChanged::ConstPtr GetDataCstPtr() const
Ardrone3MediaStreamingStateVideoStreamModeChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3MediaRecordStateVideoStateChanged::ConstPtr GetDataCstPtr() const
Ardrone3CameraStatedefaultCameraOrientation(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3AntiflickeringStateelectricFrequencyChanged::Ptr msg_ptr
Ardrone3GPSStateHomeTypeAvailabilityChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3PilotingStateLandingStateChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3MediaStreamingStateVideoStreamModeChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3MediaRecordStateVideoStateChanged::Ptr msg_ptr
Ardrone3PilotingStateAirSpeedChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3PilotingStateSpeedChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3NetworkStateAllWifiAuthChannelChanged::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3MediaRecordStateVideoResolutionState::Ptr msg_ptr
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3MediaStreamingStateVideoEnableChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged::ConstPtr GetDataCstPtr() const
Ardrone3PilotingStatePositionChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3CameraStatedefaultCameraOrientation::Ptr msg_ptr
::bebop_msgs::Ardrone3PilotingStateSpeedChanged::ConstPtr GetDataCstPtr() const
Ardrone3PilotingStateFlyingStateChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3GPSStateHomeTypeChosenChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3NetworkStateWifiScanListChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3PilotingStateAirSpeedChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3PilotingStateFlyingStateChanged::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3GPSStateHomeTypeChosenChanged::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3PilotingStateAutoTakeOffModeChanged::ConstPtr GetDataCstPtr() const
Ardrone3PilotingStateAlertStateChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3NetworkStateAllWifiScanChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3NetworkStateWifiScanListChanged::ConstPtr GetDataCstPtr() const
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3PilotingStateAltitudeChanged::ConstPtr GetDataCstPtr() const
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3MediaRecordStatePictureStateChangedV2::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3CameraStatedefaultCameraOrientationV2::Ptr msg_ptr
::bebop_msgs::Ardrone3NetworkStateWifiAuthChannelListChanged::Ptr msg_ptr
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
Ardrone3NetworkStateAllWifiScanChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3PilotingStatePositionChanged::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3PilotingStateAutoTakeOffModeChanged::Ptr msg_ptr
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
::bebop_msgs::Ardrone3GPSStateHomeTypeChosenChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3NetworkStateAllWifiAuthChannelChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3CameraStateOrientationV2::ConstPtr GetDataCstPtr() const
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged::Ptr msg_ptr
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3MediaRecordStatePictureStateChangedV2::Ptr msg_ptr
::bebop_msgs::Ardrone3AntiflickeringStateelectricFrequencyChanged::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3PilotingStateAirSpeedChanged::ConstPtr GetDataCstPtr() const
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3NetworkStateWifiAuthChannelListChanged::ConstPtr GetDataCstPtr() const
Ardrone3MediaRecordStateVideoStateChangedV2(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3CameraStateOrientation(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3NetworkStateAllWifiScanChanged::ConstPtr GetDataCstPtr() const
Ardrone3CameraStateVelocityRange(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3MediaRecordStateVideoStateChangedV2::Ptr msg_ptr
::bebop_msgs::Ardrone3CameraStateOrientation::ConstPtr GetDataCstPtr() const
bool getParam(const std::string &key, std::string &s) const
::bebop_msgs::Ardrone3PilotingStateAlertStateChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3AccessoryStateConnectedAccessories::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3PilotingStateGpsLocationChanged::ConstPtr GetDataCstPtr() const
Ardrone3PilotingStateNavigateHomeStateChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3GPSStateNumberOfSatelliteChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3NetworkStateAllWifiAuthChannelChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
Ardrone3MediaRecordStatePictureStateChangedV2(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
ARCONTROLLER_DICTIONARY_ARG_t * arg
Ardrone3CameraStatedefaultCameraOrientationV2(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
::bebop_msgs::Ardrone3AntiflickeringStatemodeChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3MediaRecordStateVideoResolutionState::ConstPtr GetDataCstPtr() const
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3GPSStateNumberOfSatelliteChanged::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3PilotingStateFlatTrimChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3PilotingStateFlatTrimChanged::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3GPSStateHomeTypeAvailabilityChanged::Ptr msg_ptr
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3PilotingStateFlyingStateChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3PilotingStateGpsLocationChanged::Ptr msg_ptr
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3CameraStateOrientation::Ptr msg_ptr
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3MediaStreamingStateVideoEnableChanged::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3NetworkStateWifiScanListChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3PROStateFeatures::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3MediaRecordStatePictureStateChanged::Ptr msg_ptr
::bebop_msgs::Ardrone3CameraStateVelocityRange::ConstPtr GetDataCstPtr() const
::bebop_msgs::Ardrone3PilotingStatePositionChanged::Ptr msg_ptr
Ardrone3PilotingStatemoveToChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3CameraStateOrientationV2::Ptr msg_ptr
Ardrone3MediaStreamingStateVideoEnableChanged(::ros::NodeHandle &nh,::ros::NodeHandle &priv_nh, const ::std::string &topic)
void Update(const ARCONTROLLER_DICTIONARY_ARG_t *arguments, const ::ros::Time &t)
::bebop_msgs::Ardrone3PilotingStateSpeedChanged::Ptr msg_ptr


bebop_driver
Author(s): Mani Monajjemi
autogenerated on Mon Jun 10 2019 12:58:56