ddrone_task_manager.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Yu ZHOU
3  *
4  * Created on: Jun 9, 2019
5  * Author: Yu ZHOU
6  */
7 #ifndef DDRONE_TASK_MANAGER_H
8 #define DDRONE_TASK_MANAGER_H
9 
10 #include "gpsUtils.h"
11 #include <common_msgs/state.h>
12 #include <common_msgs/target.h>
13 #include <diagnostic_msgs/DiagnosticArray.h>
14 #include <diagnostic_msgs/DiagnosticStatus.h>
15 #include <fstream>
16 #include <geometry_msgs/Point.h>
17 #include <geometry_msgs/Polygon.h>
18 #include <geometry_msgs/PoseStamped.h>
19 #include <geometry_msgs/TransformStamped.h>
20 #include <mavros_msgs/CommandBool.h>
21 #include <mavros_msgs/CommandHome.h>
22 #include <mavros_msgs/CommandTOL.h>
23 #include <mavros_msgs/HomePosition.h>
24 #include <mavros_msgs/PositionTarget.h>
25 #include <mavros_msgs/SetMode.h>
26 #include <mavros_msgs/State.h>
27 #include <ros/ros.h>
28 #include <sensor_msgs/NavSatFix.h>
29 #include <sstream>
30 #include <std_msgs/Bool.h>
31 #include <std_msgs/Byte.h>
32 #include <std_srvs/Empty.h>
33 #include <std_srvs/Trigger.h>
34 #include <string>
35 #include <tf/tf.h>
36 #define ENGINE0 0
37 #define TAKEOFF 1
38 #define MISSION 2
39 #define SWARM 3
40 #define HOVER 4
41 #define LAND 5
42 #define POS_CONTROL 0
43 #define VEL_CONTROL 1
44 
45 
51 {
59 };
60 
66 {
83 };
84 
89 {
90 
97  // kFlightTerminationActivated, // 110000 Flight Terminate
102 };
103 
104 // errors_count4: inflight check (By digits)
105 // enum InFlightCheck
106 // {
107 // kReturnHomeActivated = 1, // 1xx
108 // kNonGpsLandingActivated = 2, // 2xx
109 // kFlightTerminationActivated = 3, //3xx
110 // kSoftGeoViolence = 1, //x1x
111 // kHardGeoViolence = 2, //x2x
112 // kDisarmError = 1, // xx1
113 // kArmError = 2, // xx2
114 // kPrearmError = 3, // xx3
115 // kUnexpectedError = 4, // xx4
116 // };
117 
118 // enum PointsType
119 // {
120 // waypoints,
121 // refrence,
122 // ui_selection
123 // };
124 
131 {
132 public:
133  TaskManager(ros::NodeHandle &nodeHandle);
134  ~TaskManager();
140  // void initiswarm_pos_pubNodeHandle &nh);
141 
142 
152  bool loadMission();
153 
157  void jumpWp();
161  void engine0();
162 
166  void currentStateCallback(const common_msgs::state::ConstPtr &msg);
167 
171  void checkReached();
172 
176  void missionTimer(const ros::TimerEvent &);
177 
183  void missionCallback(int8_t msg);
184 
188  void webCmdCallback(const std_msgs::Byte::ConstPtr &msg);
189  // void gcsCmdCallback(const mavros::Cmd::ConstPtr& msg);
193  void uiPointsCallback(const geometry_msgs::Polygon::ConstPtr &msg);
197  void uavPoseCallback(const geometry_msgs::PoseStamped::ConstPtr &msg);
201  void velTgtCallback(const geometry_msgs::Point::ConstPtr &msg);
205  void posTgtCallback(const geometry_msgs::Point::ConstPtr &msg);
209  void velYawTgtCallback(const common_msgs::target::ConstPtr &msg);
213  void posYawTgtCallback(const common_msgs::target::ConstPtr &msg);
219  void approachCallback(const std_msgs::Bool::ConstPtr &msg);
223  void onlineCallback(const std_msgs::Bool::ConstPtr &msg);
227  void
228  diagnosticsCallback(const diagnostic_msgs::DiagnosticArray::ConstPtr &msg);
232  void gpsHomeCb(const mavros_msgs::HomePosition::ConstPtr &msg);
236  void gpsCurCb(const sensor_msgs::NavSatFix::ConstPtr &msg);
240  void uavStateCb(const mavros_msgs::State::ConstPtr &msg);
244  void calculateYaw();
248  void jumpWpCallback(const std_msgs::Bool::ConstPtr &msg);
252  void pubGpstgt();
257  void pubTarget(bool controlMode, float tgtX, float tgtY, float tgtZ);
263  void pubTargetWYaw(bool controlMode, float tgtX, float tgtY, float tgtZ,
264  float yaw);
268  void pubErrorState(std::int8_t val);
275  void shutdownSwarm();
282  void clearMission();
286  void preFlightCheck(uint16_t &pre_flight_check);
290  void inFlightCheck(uint16_t &in_flight_check);
294  bool landCb();
304  void takeoff();
305 
306 private:
307  ros::NodeHandle _nh;
308  ros::Publisher m_pos_cmd_pub;
309  ros::Publisher m_ref_pub;
310  ros::Publisher m_tgt_pub;
311  ros::Publisher m_engage_pub;
312  ros::Publisher m_swarm_pub;
313  ros::Publisher m_error_state_pub;
314  ros::Publisher m_mpc_pos_init_pub;
315  ros::Publisher Position_Setpoint_Pub;
316  ros::Publisher MPC_Position_Initial_Pub;
317  ros::Publisher swarm_pos_pub;
318 
319  ros::Subscriber m_current_state_sub;
320  ros::Subscriber m_mission_sub;
321  ros::Subscriber m_ui_points_sub;
322  ros::Subscriber m_uav_pose_sub;
323  ros::Subscriber m_skipCurPoint_sub;
324  ros::Subscriber m_vcmd_sub;
325  ros::Subscriber m_pcmd_sub;
326  ros::Subscriber m_gps_home_sub;
327  ros::Subscriber m_gps_cur_sub;
328  ros::Subscriber m_approach_cmd_sub;
329  ros::Subscriber m_diagnostics_sub;
330  ros::Subscriber m_gcs_cmd_sub;
331  ros::Subscriber m_online_status_sub;
332  ros::Subscriber uav_state_sub;
333 
334  std::vector<geometry_msgs::Point> _wp_list;
335  std::vector<common_msgs::state> _ref_list;
336  geometry_msgs::Point _curr;
337  // temp keep for switching variable
338  geometry_msgs::PoseStamped m_uav_pose;
339 
340  geometry_msgs::PoseStamped m_uav_pose_enu;
341  geometry_msgs::PoseStamped m_uav_pose_nwu;
342 
343  common_msgs::target m_tgt;
346 
348  // PointsType mPointsFrom;
349 
350  bool m_jump;
351  ros::Timer m_mission_timer;
355  std::string m_points_location;
356  ros::ServiceClient client_engine0;
357  ros::ServiceClient client_home;
358  ros::ServiceClient land_client;
359  ros::ServiceClient arming_client;
360  ros::ServiceClient set_mode_client;
361  std_msgs::Bool engage_msg;
362  geometry_msgs::Polygon m_ui_points;
363  mavros_msgs::HomePosition m_gps_home;
364  sensor_msgs::NavSatFix m_gps_cur;
365  double cos_y, sin_y, yaw_;
366  double yaw_init_nwu;
367  double yaw_init_enu;
368  double yaw_init;
369  geometry_msgs::Point pos_init;
373  std_msgs::Bool m_swarm;
382  mavros_msgs::State uav_current_state;
383 
387  geometry_msgs::PoseStamped transform_orientation_enu_nwu(geometry_msgs::PoseStamped);
388 };
389 
390 #endif
kAttituteOutofRange
@ kAttituteOutofRange
Definition: ddrone_task_manager.h:101
TaskManager::_ref_list
std::vector< common_msgs::state > _ref_list
reference list from file
Definition: ddrone_task_manager.h:335
kGPSTError
@ kGPSTError
13: gpsT
Definition: ddrone_task_manager.h:80
kAttitudeRollError
@ kAttitudeRollError
0: roll
Definition: ddrone_task_manager.h:67
TaskManager::m_tgt_pub
ros::Publisher m_tgt_pub
target publisher: /nndp_cpp/tgt
Definition: ddrone_task_manager.h:310
kIdle
@ kIdle
Definition: ddrone_task_manager.h:52
kMagEError
@ kMagEError
3: magE
Definition: ddrone_task_manager.h:70
TaskManager::velYawTgtCallback
void velYawTgtCallback(const common_msgs::target::ConstPtr &msg)
get velocity and yaw command
Definition: ddrone_task_manager.cpp:149
TaskManager
Task manager is used as a central module to communicate with other modules.
Definition: ddrone_task_manager.h:131
TaskManager::m_pcmd_sub
ros::Subscriber m_pcmd_sub
subscribe /posTgtFromSwarm
Definition: ddrone_task_manager.h:325
TaskManager::last_in_flight_check
uint16_t last_in_flight_check
previous inflight check
Definition: ddrone_task_manager.h:379
kTakeOff
@ kTakeOff
Definition: ddrone_task_manager.h:54
TaskManager::m_diagnostics_sub
ros::Subscriber m_diagnostics_sub
subscribe /diagnostics
Definition: ddrone_task_manager.h:329
TaskManager::m_mission_sub
ros::Subscriber m_mission_sub
subscribe mission from UI: /mission_from_ui
Definition: ddrone_task_manager.h:320
kMission
@ kMission
Definition: ddrone_task_manager.h:56
TaskManager::m_error_state_pub
ros::Publisher m_error_state_pub
error stater publisher (for UI): /task_manager/error_state
Definition: ddrone_task_manager.h:313
TaskManager::_nh
ros::NodeHandle _nh
ros node handle
Definition: ddrone_task_manager.h:307
kHealth
@ kHealth
15: no error
Definition: ddrone_task_manager.h:82
TaskManager::uav_state_sub
ros::Subscriber uav_state_sub
subscribe /mavros/state
Definition: ddrone_task_manager.h:332
TaskManager::currentStateCallback
void currentStateCallback(const common_msgs::state::ConstPtr &msg)
obtain current uav state
Definition: ddrone_task_manager.cpp:753
TaskManager::mUavTaskState
UavTaskState mUavTaskState
UAV current state: checkout enum UavTaskState.
Definition: ddrone_task_manager.h:347
TaskManager::missionCallback
void missionCallback(int8_t msg)
mission handler
Definition: ddrone_task_manager.cpp:266
kDisarmed
@ kDisarmed
00: arming error 01: Disarmed
Definition: ddrone_task_manager.h:91
TaskManager::m_uav_pose_enu
geometry_msgs::PoseStamped m_uav_pose_enu
Definition: ddrone_task_manager.h:340
TaskManager::m_uav_pose_sub
ros::Subscriber m_uav_pose_sub
subscribe current uav pose: /mavros/local_position/pose to update m_uav_pose
Definition: ddrone_task_manager.h:322
UavTaskState
UavTaskState
State machine elements.
Definition: ddrone_task_manager.h:51
kAttitudePitchError
@ kAttitudePitchError
1: pitch
Definition: ddrone_task_manager.h:68
TaskManager::yaw_init_nwu
double yaw_init_nwu
initial yaw in nwu frame
Definition: ddrone_task_manager.h:366
TaskManager::gpsHomeCb
void gpsHomeCb(const mavros_msgs::HomePosition::ConstPtr &msg)
Get GPS home location.
Definition: ddrone_task_manager.cpp:237
GpsUtils
Some helpers for converting GPS readings from the WGS84 geodetic system to a local North-East-Up cart...
Definition: gpsUtils.h:17
kGPSVelDError
@ kGPSVelDError
12: velD
Definition: ddrone_task_manager.h:79
kAccEError
@ kAccEError
6: accE
Definition: ddrone_task_manager.h:73
TaskManager::velTgtCallback
void velTgtCallback(const geometry_msgs::Point::ConstPtr &msg)
get velocity command
Definition: ddrone_task_manager.cpp:176
TaskManager::gpsToEnuCur
GpsUtils gpsToEnuCur
current gps(from px4) to enu local frame
Definition: ddrone_task_manager.h:376
TaskManager::clearMission
void clearMission()
Clear misson.
Definition: ddrone_task_manager.cpp:606
TaskManager::yaw_control_
bool yaw_control_
flag set to control yaw
Definition: ddrone_task_manager.h:381
kReserved
@ kReserved
Definition: ddrone_task_manager.h:98
TaskManager::TaskTerminateFlag
bool TaskTerminateFlag
task terminate flag when inflight or preflight check failed
Definition: ddrone_task_manager.h:377
kReturnHomeActivated
@ kReturnHomeActivated
010000: Return Home
Definition: ddrone_task_manager.h:95
TaskManager::_wp_list
std::vector< geometry_msgs::Point > _wp_list
waypoint list from file
Definition: ddrone_task_manager.h:334
TaskManager::pubGpstgt
void pubGpstgt()
Convert target from GPS into ENU coordinate.
Definition: ddrone_task_manager.cpp:592
TaskManager::ui_points_selected
bool ui_points_selected
flag showing points selected from UI
Definition: ddrone_task_manager.h:371
TaskManager::m_points_location
std::string m_points_location
set waypoint location: /home/nvidia(default)
Definition: ddrone_task_manager.h:355
kAccDError
@ kAccDError
7: accD
Definition: ddrone_task_manager.h:74
TaskManager::m_mission_timer
ros::Timer m_mission_timer
mission call back timer
Definition: ddrone_task_manager.h:351
TaskManager::m_uav_pose_nwu
geometry_msgs::PoseStamped m_uav_pose_nwu
current pose in nwu
Definition: ddrone_task_manager.h:341
kAccNError
@ kAccNError
5: accN
Definition: ddrone_task_manager.h:72
kGPSFail
@ kGPSFail
Definition: ddrone_task_manager.h:100
TaskManager::m_gcs_cmd_sub
ros::Subscriber m_gcs_cmd_sub
Definition: ddrone_task_manager.h:330
TaskManager::yaw_init
double yaw_init
initial yaw in enu frame
Definition: ddrone_task_manager.h:368
TaskManager::m_vcmd_sub
ros::Subscriber m_vcmd_sub
subscribe /velTgtFromSwarm
Definition: ddrone_task_manager.h:324
TaskManager::m_gps_cur
sensor_msgs::NavSatFix m_gps_cur
current gps location
Definition: ddrone_task_manager.h:364
TaskManager::yaw_initialized
bool yaw_initialized
flag showing yaw is initialized
Definition: ddrone_task_manager.h:370
kMagNError
@ kMagNError
2: magN
Definition: ddrone_task_manager.h:69
TaskManager::m_online_status_sub
ros::Subscriber m_online_status_sub
subscribe /swarm/online
Definition: ddrone_task_manager.h:331
TaskManager::uavPoseCallback
void uavPoseCallback(const geometry_msgs::PoseStamped::ConstPtr &msg)
get current uav pose
Definition: ddrone_task_manager.cpp:115
TaskManager::m_approach_cmd_sub
ros::Subscriber m_approach_cmd_sub
subscribe /swarm/approach
Definition: ddrone_task_manager.h:328
TaskManager::pubTarget
void pubTarget(bool controlMode, float tgtX, float tgtY, float tgtZ)
publish local target with control mode:
Definition: ddrone_task_manager.cpp:126
TaskManager::checkReached
void checkReached()
check if the uav reached the waypoint
Definition: ddrone_task_manager.cpp:825
TaskManager::m_gps_home
mavros_msgs::HomePosition m_gps_home
GPS home location.
Definition: ddrone_task_manager.h:363
TaskManager::sin_y
double sin_y
Definition: ddrone_task_manager.h:365
TaskManager::engage_msg
std_msgs::Bool engage_msg
removed
Definition: ddrone_task_manager.h:361
TaskManager::client_engine0
ros::ServiceClient client_engine0
removed service
Definition: ddrone_task_manager.h:356
TaskManager::swarm_pos_pub
ros::Publisher swarm_pos_pub
publish position in nwu: /task_manager/position_nwu
Definition: ddrone_task_manager.h:317
TaskManager::_simulation
bool _simulation
simulation mode is on if true
Definition: ddrone_task_manager.h:372
TaskManager::yaw_init_enu
double yaw_init_enu
initial yaw in enu frame
Definition: ddrone_task_manager.h:367
TaskManager::m_swarm
std_msgs::Bool m_swarm
swarm flag
Definition: ddrone_task_manager.h:373
TaskManager::pos_init
geometry_msgs::Point pos_init
the inital position of mission;
Definition: ddrone_task_manager.h:369
TaskManager::m_gps_home_sub
ros::Subscriber m_gps_home_sub
subscribe /mavros/home_position/home
Definition: ddrone_task_manager.h:326
kMagDError
@ kMagDError
4: magD
Definition: ddrone_task_manager.h:71
kSwarm
@ kSwarm
Definition: ddrone_task_manager.h:57
TaskManager::preFlightCheck
void preFlightCheck(uint16_t &pre_flight_check)
preflight Check
Definition: ddrone_task_manager.cpp:873
TaskManager::transform_orientation_enu_nwu
geometry_msgs::PoseStamped transform_orientation_enu_nwu(geometry_msgs::PoseStamped)
transform orientation from enu to nwu
Definition: ddrone_task_manager.cpp:1099
TaskManager::loadMission
bool loadMission()
load mission from UI or files
Definition: ddrone_task_manager.cpp:616
TaskManager::m_tgt
common_msgs::target m_tgt
current target point
Definition: ddrone_task_manager.h:343
TaskManager::m_skipCurPoint_sub
ros::Subscriber m_skipCurPoint_sub
subscribe /mission_skip_point
Definition: ddrone_task_manager.h:323
kLandActivated
@ kLandActivated
100000: Land mode
Definition: ddrone_task_manager.h:96
TaskManager::_points_source_param
int _points_source_param
Points from 0: local waypoints file; 1: refrence waypoints file; 2: ui selected waypoints; 3:velocity...
Definition: ddrone_task_manager.h:354
TaskManager::uiPointsCallback
void uiPointsCallback(const geometry_msgs::Polygon::ConstPtr &msg)
points for UI (lagacy function)
Definition: ddrone_task_manager.cpp:553
TaskManager::Position_Setpoint_Pub
ros::Publisher Position_Setpoint_Pub
Setpoints to MAVROS publisher: /mavros/setpoint_raw/local.
Definition: ddrone_task_manager.h:315
TaskManager::uavStateCb
void uavStateCb(const mavros_msgs::State::ConstPtr &msg)
Get UAV hardware state: connected/armed/guided/mode.
Definition: ddrone_task_manager.cpp:246
kBatteryLow
@ kBatteryLow
Definition: ddrone_task_manager.h:99
TaskManager::client_home
ros::ServiceClient client_home
/mavros/cmd/set_home service
Definition: ddrone_task_manager.h:357
TaskManager::engine0
void engine0()
removed for px4 1.8 version
Definition: ddrone_task_manager.cpp:506
TaskManager::onlineCallback
void onlineCallback(const std_msgs::Bool::ConstPtr &msg)
Landing triggered by offline status (msg: false)
Definition: ddrone_task_manager.cpp:228
TaskManager::m_gps_cur_sub
ros::Subscriber m_gps_cur_sub
subscribe /mavros/global_position/global
Definition: ddrone_task_manager.h:327
TaskManager::uav_current_state
mavros_msgs::State uav_current_state
uav hardware sate from /mavros/state
Definition: ddrone_task_manager.h:382
TaskManager::m_current_state_sub
ros::Subscriber m_current_state_sub
subscribe refrence: /rt_ref_gen/current_state
Definition: ddrone_task_manager.h:319
kGPSVelEError
@ kGPSVelEError
11: velE
Definition: ddrone_task_manager.h:78
kHover
@ kHover
Definition: ddrone_task_manager.h:55
kImuError
@ kImuError
14: imuStuck
Definition: ddrone_task_manager.h:81
TaskManager::m_jump
bool m_jump
Definition: ddrone_task_manager.h:350
TaskManager::m_swarm_pub
ros::Publisher m_swarm_pub
trigger swarm publisher: /task_manager/swarm
Definition: ddrone_task_manager.h:312
TaskManager::last_pre_flight_check
uint16_t last_pre_flight_check
precious preflight check
Definition: ddrone_task_manager.h:380
TaskManager::posTgtCallback
void posTgtCallback(const geometry_msgs::Point::ConstPtr &msg)
get gps position command and transfer it into UAV local coordinate
Definition: ddrone_task_manager.cpp:183
TaskManager::pubTargetWYaw
void pubTargetWYaw(bool controlMode, float tgtX, float tgtY, float tgtZ, float yaw)
publish local target with yaw, and set control mode:
Definition: ddrone_task_manager.cpp:137
TaskManager::yaw_
double yaw_
param for calculating yaw
Definition: ddrone_task_manager.h:365
kSoftGeoViolated
@ kSoftGeoViolated
Definition: ddrone_task_manager.h:93
TaskManager::m_ref_pub
ros::Publisher m_ref_pub
refrence from file publisher: /task_manager/current_state
Definition: ddrone_task_manager.h:309
TaskManager::TaskManager
TaskManager(ros::NodeHandle &nodeHandle)
Definition: ddrone_task_manager.cpp:9
TaskManager::set_mode_client
ros::ServiceClient set_mode_client
/mavros/set_mode service
Definition: ddrone_task_manager.h:360
TaskManager::inPcmdMode
bool inPcmdMode
position command flag
Definition: ddrone_task_manager.h:378
TaskManager::m_mpc_pos_init_pub
ros::Publisher m_mpc_pos_init_pub
mpc initial position publisher: /task_manager/mpc_init_position_nwu
Definition: ddrone_task_manager.h:314
TaskManager::m_pos_cmd_pub
ros::Publisher m_pos_cmd_pub
way points publisher: /dummy/pos_cmd
Definition: ddrone_task_manager.h:308
kGPSVelNError
@ kGPSVelNError
10: velN
Definition: ddrone_task_manager.h:77
TaskManager::land_client
ros::ServiceClient land_client
/mavros/cmd/land service
Definition: ddrone_task_manager.h:358
TaskManager::missionTimer
void missionTimer(const ros::TimerEvent &)
callback function for running mission (default: 0.2)
Definition: ddrone_task_manager.cpp:788
TaskManager::_points_id
int _points_id
Using this value to label points read from a file.
Definition: ddrone_task_manager.h:353
TaskManager::m_uav_pose
geometry_msgs::PoseStamped m_uav_pose
current pose(enu) from /mavros/local_position/pose
Definition: ddrone_task_manager.h:338
TaskManager::_flightHeight
double _flightHeight
takeoff flight height
Definition: ddrone_task_manager.h:344
kArmed
@ kArmed
10: armed 11: PreArmed
Definition: ddrone_task_manager.h:92
TaskManager::cos_y
double cos_y
Definition: ddrone_task_manager.h:365
TaskManager::~TaskManager
~TaskManager()
Definition: ddrone_task_manager.cpp:110
TaskManager::landCb
bool landCb()
call landing service
Definition: ddrone_task_manager.cpp:470
TaskManager::m_ui_points_sub
ros::Subscriber m_ui_points_sub
subscribe points from UI: /points_from_ui
Definition: ddrone_task_manager.h:321
kHardGeoViolated
@ kHardGeoViolated
Definition: ddrone_task_manager.h:94
TaskManager::MPC_Position_Initial_Pub
ros::Publisher MPC_Position_Initial_Pub
Definition: ddrone_task_manager.h:316
TaskManager::inFlightCheck
void inFlightCheck(uint16_t &in_flight_check)
inflight Check
Definition: ddrone_task_manager.cpp:938
TaskManager::arming_client
ros::ServiceClient arming_client
/mavros/cmd/arming service
Definition: ddrone_task_manager.h:359
InFlightCheck
InFlightCheck
errors_count4: inflight check
Definition: ddrone_task_manager.h:89
TaskManager::calculateYaw
void calculateYaw()
Calculate yaw angle from current attitude.
Definition: ddrone_task_manager.cpp:566
TaskManager::jumpWpCallback
void jumpWpCallback(const std_msgs::Bool::ConstPtr &msg)
Skip current waypoint.
Definition: ddrone_task_manager.cpp:560
kGPSEphError
@ kGPSEphError
8: eph
Definition: ddrone_task_manager.h:75
TaskManager::diagnosticsCallback
void diagnosticsCallback(const diagnostic_msgs::DiagnosticArray::ConstPtr &msg)
Analyse preflight and inflight check for UAV.
Definition: ddrone_task_manager.cpp:1041
TaskManager::takeoff
void takeoff()
Take off.
Definition: ddrone_task_manager.cpp:367
PreFlightCheck
PreFlightCheck
errors_count3: preflight check (By bits)
Definition: ddrone_task_manager.h:66
TaskManager::m_approach
bool m_approach
approach flag
Definition: ddrone_task_manager.h:374
TaskManager::jumpWp
void jumpWp()
jump one waypoint in list
TaskManager::gpsCurCb
void gpsCurCb(const sensor_msgs::NavSatFix::ConstPtr &msg)
Get UAV current GPS location.
Definition: ddrone_task_manager.cpp:242
kLand
@ kLand
Definition: ddrone_task_manager.h:58
kReady
@ kReady
Definition: ddrone_task_manager.h:53
TaskManager::_relativeHeight
double _relativeHeight
height relative to the ground
Definition: ddrone_task_manager.h:345
TaskManager::_curr
geometry_msgs::Point _curr
current uav position
Definition: ddrone_task_manager.h:336
TaskManager::pubErrorState
void pubErrorState(std::int8_t val)
Publish Error State from preflight and inflight state.
Definition: ddrone_task_manager.cpp:864
TaskManager::_missionPeriod
double _missionPeriod
mission call back period: 0.2s
Definition: ddrone_task_manager.h:352
kGPSEpvError
@ kGPSEpvError
9: epv
Definition: ddrone_task_manager.h:76
TaskManager::shutdownSwarm
void shutdownSwarm()
shutdown Swarm
Definition: ddrone_task_manager.cpp:201
gpsUtils.h
TaskManager::posYawTgtCallback
void posYawTgtCallback(const common_msgs::target::ConstPtr &msg)
get position and yaw command
Definition: ddrone_task_manager.cpp:155
TaskManager::webCmdCallback
void webCmdCallback(const std_msgs::Byte::ConstPtr &msg)
Get command from web GCS and pass to mission callback.
Definition: ddrone_task_manager.cpp:260
TaskManager::gpsToEnu
GpsUtils gpsToEnu
current gps target(from user) to enu local frame
Definition: ddrone_task_manager.h:375
TaskManager::approachCallback
void approachCallback(const std_msgs::Bool::ConstPtr &msg)
approach command for kerrigan project
Definition: ddrone_task_manager.cpp:211
TaskManager::m_engage_pub
ros::Publisher m_engage_pub
Definition: ddrone_task_manager.h:311
TaskManager::m_ui_points
geometry_msgs::Polygon m_ui_points
polygon points from UI
Definition: ddrone_task_manager.h:362


ddrone_task_manager
Author(s):
autogenerated on Thu Jul 30 2020 17:17:04