Skip to content

Commit

Permalink
removed duplicit check of control manager diagnostics, updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kratkvit committed Jan 16, 2024
1 parent ed6a776 commit 51f6ecf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions config/public/automatic_start.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ pre_takeoff_sleep: 0.0 # [s]
safety_timeout: 5.0 # [s]

# true: will cause the UAV to take off
# false: will switch the drone to offboard, but the service
# uav_manager/takeoff
# needs to be called manually.
# false: will perform all checks and enable control output, but the service
# uav_manager/takeoff needs to be called manually.
handle_takeoff: true

preflight_check:
Expand All @@ -21,16 +20,15 @@ preflight_check:

max_speed: 0.3 # [m/s]

# the node with wait for the following topics and won't allow
# the node will wait for the following topics and won't allow
# takeoff until some data apear on them
topic_check:

enabled: true
timeout: 5.0 # [s], allowed timeout for the last accepted message

# if "/" is provided at the beginning of topic_name, the topic name is considered as written,
# if there is no "/" at the beginning, UAV_NAME is automatically added in from of the topic name (/uav1/topic_name)
# if there is no "/" at the beginning, UAV_NAME is automatically added in front of the topic name (e.g., /uav1/topic_name)
topics: [
"estimation_manager/uav_state",
"control_manager/diagnostics",
]
4 changes: 2 additions & 2 deletions src/automatic_start.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ typedef enum
STATE_FINISHED
} LandingStates_t;

const char* state_names[4] = {"IDLING", "TAKEOFF", "FINISHED"};
const char* state_names[3] = {"IDLING", "TAKEOFF", "FINISHED"};

class AutomaticStart : public nodelet::Nodelet {

Expand Down Expand Up @@ -404,7 +404,7 @@ void AutomaticStart::timerMain([[maybe_unused]] const ros::TimerEvent& event) {
bool got_estimation_diag = sh_estimation_diag_.hasMsg();

if (!got_control_manager_diag || !got_hw_api_status_ || !got_uav_manager_diag || !got_estimation_diag) {
ROS_WARN_THROTTLE(5.0, "[AutomaticStart]: waiting for data: ControManager=%s, UavManager=%s, HW Api=%s, EstimationManager=%s",
ROS_WARN_THROTTLE(5.0, "[AutomaticStart]: waiting for data: ControlManager=%s, UavManager=%s, HW Api=%s, EstimationManager=%s",
got_control_manager_diag ? "true" : "FALSE", got_uav_manager_diag ? "true" : "FALSE", got_hw_api_status_ ? "true" : "FALSE",
got_estimation_diag ? "true" : "FALSE");
return;
Expand Down

0 comments on commit 51f6ecf

Please sign in to comment.