From ef7ab2c041333324b4b3801fb0306dbeb0d5e87e Mon Sep 17 00:00:00 2001 From: Tomas Baca Date: Sat, 6 Jan 2024 10:08:05 +0100 Subject: [PATCH] ControlManager: removed automatic shutdown method --- config/public/control_manager.yaml | 4 ---- launch/control_manager.launch | 1 - src/control_manager/control_manager.cpp | 27 ------------------------- 3 files changed, 32 deletions(-) diff --git a/config/public/control_manager.yaml b/config/public/control_manager.yaml index 8684fe24..52b08ab9 100644 --- a/config/public/control_manager.yaml +++ b/config/public/control_manager.yaml @@ -118,10 +118,6 @@ mrs_uav_managers: vertical: threshold_distance: 1.2 # [m] - automatic_pc_shutdown: - - enabled: false - joystick: enabled: true diff --git a/launch/control_manager.launch b/launch/control_manager.launch index 12f13f25..4e26d22f 100644 --- a/launch/control_manager.launch +++ b/launch/control_manager.launch @@ -162,7 +162,6 @@ - diff --git a/src/control_manager/control_manager.cpp b/src/control_manager/control_manager.cpp index bd7af46f..f0b26996 100644 --- a/src/control_manager/control_manager.cpp +++ b/src/control_manager/control_manager.cpp @@ -765,9 +765,6 @@ class ControlManager : public nodelet::Nodelet { mrs_lib::Profiler profiler_; bool _profiler_enabled_ = false; - // automatic pc shutdown (DARPA specific) - bool _automatic_pc_shutdown_enabled_ = false; - // diagnostics publishing void publishDiagnostics(void); std::mutex mutex_diagnostics_; @@ -878,7 +875,6 @@ class ControlManager : public nodelet::Nodelet { mrs_msgs::ReferenceStamped velocityReferenceToReference(const mrs_msgs::VelocityReferenceStamped& vel_reference); - void shutdown(); void setCallbacks(bool in); bool isOffboard(void); bool elandSrv(void); @@ -1212,8 +1208,6 @@ void ControlManager::initialize(void) { param_loader.loadParam("rc_joystick/channels/heading", _rc_channel_heading_); param_loader.loadParam("rc_joystick/channels/throttle", _rc_channel_throttle_); - param_loader.loadParam("automatic_pc_shutdown/enabled", _automatic_pc_shutdown_enabled_); - param_loader.loadParam("pirouette/speed", _pirouette_speed_); param_loader.loadParam("pirouette/timer_rate", _pirouette_timer_rate_); @@ -2928,8 +2922,6 @@ void ControlManager::timerEland(const ros::TimerEvent& event) { arming(false); } - shutdown(); - changeLandingState(IDLE_STATE); ROS_WARN("[ControlManager]: emergency landing finished"); @@ -7744,8 +7736,6 @@ std::tuple ControlManager::arming(const bool input) { ROS_DEBUG("[ControlManager]: stopping the eland timer"); timer_eland_.stop(); ROS_DEBUG("[ControlManager]: eland timer stopped"); - - shutdown(); } } else { @@ -7814,23 +7804,6 @@ bool ControlManager::elandSrv(void) { //} -/* shutdown() //{ */ - -void ControlManager::shutdown() { - // copy member variables - auto uav_state = mrs_lib::get_mutexed(mutex_uav_state_, uav_state_); - - if (_automatic_pc_shutdown_enabled_) { - - ROS_INFO("[ControlManager]: calling service for PC shutdown"); - - std_srvs::Trigger shutdown_out; - sch_shutdown_.call(shutdown_out); - } -} - -//} - /* parachuteSrv() //{ */ bool ControlManager::parachuteSrv(void) {