From 815c635be84c80492243e9afaa22b70edfbaa4f4 Mon Sep 17 00:00:00 2001 From: kbrowne15 Date: Mon, 3 Apr 2023 16:15:19 -0700 Subject: [PATCH] Remove old ekf tool (#716) --- management/executive/CMakeLists.txt | 8 --- management/executive/tools/ekf_switch_mux.cc | 76 -------------------- 2 files changed, 84 deletions(-) delete mode 100644 management/executive/tools/ekf_switch_mux.cc diff --git a/management/executive/CMakeLists.txt b/management/executive/CMakeLists.txt index ac8ef7e8a8..17de870092 100644 --- a/management/executive/CMakeLists.txt +++ b/management/executive/CMakeLists.txt @@ -94,12 +94,6 @@ add_dependencies(data_to_disk_pub ${catkin_EXPORTED_TARGETS}) target_link_libraries(data_to_disk_pub executive gflags ${catkin_LIBRARIES}) -## Declare a C++ executable: ekf_switch_mux -add_executable(ekf_switch_mux tools/ekf_switch_mux.cc) -add_dependencies(ekf_switch_mux ${catkin_EXPORTED_TARGETS}) -target_link_libraries(ekf_switch_mux - executive gflags ${catkin_LIBRARIES}) - ## Declare a C++ executable: plan_pub add_executable(plan_pub tools/plan_pub.cc) add_dependencies(plan_pub ${catkin_EXPORTED_TARGETS}) @@ -160,14 +154,12 @@ install(FILES nodelet_plugins.xml # Install C++ executables install(TARGETS data_to_disk_pub DESTINATION bin) -install(TARGETS ekf_switch_mux DESTINATION bin) install(TARGETS plan_pub DESTINATION bin) install(TARGETS simple_move DESTINATION bin) install(TARGETS teleop_tool DESTINATION bin) install(TARGETS zones_pub DESTINATION bin) install(CODE "execute_process( COMMAND ln -s ../../bin/data_to_disk_pub share/${PROJECT_NAME} - COMMAND ln -s ../../bin/ekf_switch_mux share/${PROJECT_NAME} COMMAND ln -s ../../bin/plan_pub share/${PROJECT_NAME} COMMAND ln -s ../../bin/simple_move share/${PROJECT_NAME} COMMAND ln -s ../../bin/teleop_tool share/${PROJECT_NAME} diff --git a/management/executive/tools/ekf_switch_mux.cc b/management/executive/tools/ekf_switch_mux.cc deleted file mode 100644 index 7c6ceaeec2..0000000000 --- a/management/executive/tools/ekf_switch_mux.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (c) 2017, United States Government, as represented by the - * Administrator of the National Aeronautics and Space Administration. - * - * All rights reserved. - * - * The Astrobee platform is licensed under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ - -// A node to switch the EKF input from landmarks to sparse mapping, -// or something else. This is needed because both landmarks and registration -// need to be switched at the same time. - -#include -#include - -#include - -#include - -#include -#include - -const std::string kRegistrationNode = "mux_registration"; -const std::string kLandmarksNode = "mux_landmarks"; - -int main(int argc, char **argv) { - ff_common::InitFreeFlyerApplication(&argc, &argv); - ros::init(argc, argv, "ekf_switch_mux"); - - if (argc < 2) { - std::cerr << "Usage: " << argv[0] << " [sparse_mapping|marker_tracking]" - << std::endl; - return 1; - } - - ros::NodeHandle n("~"); - - - if (!ros::service::waitForService("mux_registration/select", 10000)) { - std::cerr << "Error: no mux services? is mux_registration running?" - << std::endl; - return 1; - } - - topic_tools::MuxSelect reg_sel; - reg_sel.request.topic = std::string(argv[1]) + "/registration"; - - if (!ros::service::call("/mux_registration/select", reg_sel)) { - std::cerr << "Error: error calling mux_registration/select" - << std::endl; - return 1; - } - - topic_tools::MuxSelect land_sel; - land_sel.request.topic = std::string(argv[1]) + "/landmarks"; - - if (!ros::service::call("/mux_landmarks/select", land_sel)) { - std::cerr << "Error: error calling mux_landmarks/select" - << std::endl; - std::cerr << "NOTE: mux_registration and mux_landmarks are inconsistent!" - << std::endl; - return 1; - } - - return 0; -}