Skip to content

Commit

Permalink
ControlManager: removed automatic shutdown method
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Jan 6, 2024
1 parent 99bbf15 commit ef7ab2c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 32 deletions.
4 changes: 0 additions & 4 deletions config/public/control_manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ mrs_uav_managers:
vertical:
threshold_distance: 1.2 # [m]

automatic_pc_shutdown:

enabled: false

joystick:

enabled: true
Expand Down
1 change: 0 additions & 1 deletion launch/control_manager.launch
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
<remap from="~failsafe_escalating_in" to="~failsafe_escalating" />
<remap from="~eland_out" to="~landoff_tracker/eland" />
<remap from="~land_out" to="~landoff_tracker/land" />
<remap from="~shutdown_out" to="~shutdown" />
<remap from="~pirouette_in" to="~pirouette" />
<remap from="~bumper_in" to="~bumper" />
<remap from="~bumper_repulsion_in" to="~bumper_repulsion" />
Expand Down
27 changes: 0 additions & 27 deletions src/control_manager/control_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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_);

Expand Down Expand Up @@ -2928,8 +2922,6 @@ void ControlManager::timerEland(const ros::TimerEvent& event) {
arming(false);
}

shutdown();

changeLandingState(IDLE_STATE);

ROS_WARN("[ControlManager]: emergency landing finished");
Expand Down Expand Up @@ -7744,8 +7736,6 @@ std::tuple<bool, std::string> ControlManager::arming(const bool input) {
ROS_DEBUG("[ControlManager]: stopping the eland timer");
timer_eland_.stop();
ROS_DEBUG("[ControlManager]: eland timer stopped");

shutdown();
}

} else {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit ef7ab2c

Please sign in to comment.