diff --git a/astrobee/survey_manager/survey_planner/CMakeLists.txt b/astrobee/survey_manager/survey_planner/CMakeLists.txt index 84346094..bae60f96 100644 --- a/astrobee/survey_manager/survey_planner/CMakeLists.txt +++ b/astrobee/survey_manager/survey_planner/CMakeLists.txt @@ -72,8 +72,11 @@ catkin_python_setup() catkin_package() catkin_install_python(PROGRAMS - tools/survey_planner/command_astrobee - tools/survey_planner/monitor_astrobee + tools/command_astrobee + tools/monitor_astrobee + tools/plan_interpreter + tools/plan_survey + tools/problem_generator DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) # Mark executables and/or libraries for installation diff --git a/astrobee/survey_manager/survey_planner/setup.py b/astrobee/survey_manager/survey_planner/setup.py index ef0e38a1..36d2b9e2 100644 --- a/astrobee/survey_manager/survey_planner/setup.py +++ b/astrobee/survey_manager/survey_planner/setup.py @@ -2,6 +2,6 @@ from catkin_pkg.python_setup import generate_distutils_setup -d = generate_distutils_setup(packages=["survey_planner"], package_dir={"": "tools"}) +d = generate_distutils_setup(packages=["survey_planner"], package_dir={"": "src"}) setup(**d) diff --git a/astrobee/survey_manager/survey_planner/src/isaac_action_node.cpp b/astrobee/survey_manager/survey_planner/src/isaac_action_node.cpp index dfae9d16..b867b4fd 100644 --- a/astrobee/survey_manager/survey_planner/src/isaac_action_node.cpp +++ b/astrobee/survey_manager/survey_planner/src/isaac_action_node.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include "survey_planner/isaac_action_node.h" @@ -43,7 +44,8 @@ IsaacAction::IsaacAction(ros::NodeHandle nh, const std::string& action, const st void IsaacAction::do_work() { std::string from, towards; - if (get_arguments().size() < 3) { + const std::vector& command_args = get_arguments(); + if (command_args.size() < 3) { finish(false, 1.0, "Not enough arguments for [MOVE] command"); } @@ -58,10 +60,10 @@ void IsaacAction::do_work() { args[0] = "sh"; args[1] = "-c"; command_ = "rosrun survey_planner command_astrobee "; - for (const auto& arg : get_arguments()) { - command_ += arg + " "; + command_ += action_name_ + " "; + for (unsigned int i = 0; i < command_args.size(); i++) { + command_ += command_args[i] + " "; } - command_ += "run1"; args[2] = command_.c_str(); args[3] = NULL; printf("%s\n", args[2]); diff --git a/astrobee/survey_manager/survey_planner/tools/mypy.ini b/astrobee/survey_manager/survey_planner/src/mypy.ini similarity index 100% rename from astrobee/survey_manager/survey_planner/tools/mypy.ini rename to astrobee/survey_manager/survey_planner/src/mypy.ini diff --git a/astrobee/survey_manager/survey_planner/tools/survey_planner/__init__.py b/astrobee/survey_manager/survey_planner/src/survey_planner/__init__.py similarity index 100% rename from astrobee/survey_manager/survey_planner/tools/survey_planner/__init__.py rename to astrobee/survey_manager/survey_planner/src/survey_planner/__init__.py diff --git a/astrobee/survey_manager/survey_planner/tools/survey_planner/command_astrobee b/astrobee/survey_manager/survey_planner/src/survey_planner/command_astrobee.py similarity index 80% rename from astrobee/survey_manager/survey_planner/tools/survey_planner/command_astrobee rename to astrobee/survey_manager/survey_planner/src/survey_planner/command_astrobee.py index 2f6b0498..cde03e18 100755 --- a/astrobee/survey_manager/survey_planner/tools/survey_planner/command_astrobee +++ b/astrobee/survey_manager/survey_planner/src/survey_planner/command_astrobee.py @@ -2,16 +2,16 @@ # # Copyright (c) 2021, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. -# +# # All rights reserved. -# +# # The "ISAAC - Integrated System for Autonomous and Adaptive Caretaking # platform" software 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 @@ -48,6 +48,7 @@ MAX_COUNTER = 10 CHUNK_SIZE = 1024 + def exposure_change(config_static, bay_origin, bay_destination): # Going to JEM if bay_origin == "nod2_hatch_to_jem" and bay_destination == "jem_hatch_from_nod2": @@ -55,8 +56,12 @@ def exposure_change(config_static, bay_origin, bay_destination): return config_static["exposure"]["jem"] # Going to NOD2 - if (bay_origin == "jem_hatch_to_nod2" and bay_destination == "nod2_hatch_from_jem" - or bay_origin == "usl_hatch_to_nod2" and bay_destination == "nod2_hatch_from_usl"): + if ( + bay_origin == "jem_hatch_to_nod2" + and bay_destination == "nod2_hatch_from_jem" + or bay_origin == "usl_hatch_to_nod2" + and bay_destination == "nod2_hatch_from_usl" + ): print("CHANGING EXPOSURE TO NOD2") return config_static["exposure"]["nod2"] @@ -66,14 +71,19 @@ def exposure_change(config_static, bay_origin, bay_destination): return 0 + def map_change(config_static, bay_origin, bay_destination): # Going to JEM if bay_origin == "nod2_hatch_to_jem" and bay_destination == "jem_hatch_from_nod2": print("CHANGING MAP TO JEM") return config_static["maps"]["jem"] # Going to NOD2 - if (bay_origin == "jem_hatch_to_nod2" and bay_destination == "nod2_hatch_from_jem" - or bay_origin == "usl_hatch_to_nod2" and bay_destination == "nod2_hatch_from_usl"): + if ( + bay_origin == "jem_hatch_to_nod2" + and bay_destination == "nod2_hatch_from_jem" + or bay_origin == "usl_hatch_to_nod2" + and bay_destination == "nod2_hatch_from_usl" + ): print("CHANGING MAP TO NOD2") return config_static["maps"]["nod2"] # Going to USL @@ -81,6 +91,7 @@ def map_change(config_static, bay_origin, bay_destination): return config_static["maps"]["usl"] return "" + def get_ops_plan_path(): # Check if the path /opt/astrobee/ops/gds/plans/ exists if os.path.exists("/opt/astrobee/ops/gds/plans/"): @@ -103,14 +114,13 @@ def get_ops_plan_path(): # Return None if none of the conditions are met return None + # This class starts a new process and lets you monitor the input and output # Mostly used for actions where user inteference might be required class ProcessExecutor: - def __init__(self, robot_name): - - self.input_path = '/tmp/input_' + robot_name - self.output_path = '/tmp/output_' + robot_name + self.input_path = "/tmp/input_" + robot_name + self.output_path = "/tmp/output_" + robot_name # Check if the file exists if os.path.exists(self.input_path): @@ -135,9 +145,7 @@ def __init__(self, robot_name): # Declare event that will stop input thread self._stop_event = threading.Event() - def __del__(self): - self.sock_input.close() self.sock_output.close() @@ -150,7 +158,9 @@ def thread_write_output(self, process): # Get output from process # print("waiting for output") output = process.stdout.readline() - if (output == '' and process.poll() is not None) or self._stop_event.is_set(): + if ( + output == "" and process.poll() is not None + ) or self._stop_event.is_set(): break if output: rospy.loginfo(output) @@ -167,7 +177,7 @@ def thread_write_output(self, process): encoded_message = output_total.encode("ascii", errors="replace") for i in range(0, len(encoded_message), CHUNK_SIZE): - chunk = encoded_message[i:i + CHUNK_SIZE] + chunk = encoded_message[i : i + CHUNK_SIZE] conn.sendall(chunk) # If socket is already connected, send output @@ -201,7 +211,6 @@ def thread_read_input(self, process): break client_socket.settimeout(1) # Set a timeout for socket operations - while True: # print("accepted connection:") print(client_address) @@ -209,7 +218,9 @@ def thread_read_input(self, process): while not self._stop_event.is_set(): # print("waiting to receive") try: - request = client_socket.recv(CHUNK_SIZE).decode("ascii", errors="replace") + request = client_socket.recv(CHUNK_SIZE).decode( + "ascii", errors="replace" + ) break except socket.timeout: continue @@ -228,19 +239,29 @@ def thread_read_input(self, process): print("exit input:") print(e) - def send_command(self, command): print(command) return_code = 1 try: # Start the process - process = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + process = subprocess.Popen( + command, + shell=True, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True, + ) # Start input and output threads - input_thread = threading.Thread(target=self.thread_read_input, args=(process,)) + input_thread = threading.Thread( + target=self.thread_read_input, args=(process,) + ) input_thread.start() - output_thread = threading.Thread(target=self.thread_write_output, args=(process,)) + output_thread = threading.Thread( + target=self.thread_write_output, args=(process,) + ) output_thread.start() while output_thread.is_alive(): @@ -278,22 +299,29 @@ def send_command_recursive(self, command): exit_code = exit_code = self.send_command_recursive(command) return exit_code + # This class sends a command to the astrobee executor and waits to get a response # Mostly used for short actions that should be immediate and require no feedback # This method is needed on actions that run remotely and are not controlled by topics class CommandExecutor: - - def __init__(self, ns): self.ns = ns rospy.loginfo(self.ns + "/command") # Declare guest science command publisher - self.sub_ack = rospy.Subscriber(self.ns + "/mgt/ack", AckStamped, self.ack_callback) + self.sub_ack = rospy.Subscriber( + self.ns + "/mgt/ack", AckStamped, self.ack_callback + ) self.ack_needed = False - self.sub_plan_status = rospy.Subscriber(self.ns + "/mgt/executive/plan_status", PlanStatusStamped, self.plan_status_callback) + self.sub_plan_status = rospy.Subscriber( + self.ns + "/mgt/executive/plan_status", + PlanStatusStamped, + self.plan_status_callback, + ) self.plan_status_needed = False self.plan_name = "" - self.pub_command = rospy.Publisher(self.ns + "/command", CommandStamped, queue_size=5) + self.pub_command = rospy.Publisher( + self.ns + "/command", CommandStamped, queue_size=5 + ) while self.pub_command.get_num_connections() == 0: rospy.loginfo("Waiting for subscriber to connect") rospy.sleep(1) @@ -332,12 +360,12 @@ def stop_recording(self): return result def change_exposure(self, val): - #TBD + # TBD rospy.loginfo("Change exposure to " + str(val)) return 0 def change_map(self, map_name): - #TBD + # TBD rospy.loginfo("Change map to " + map_name) return 0 @@ -350,7 +378,9 @@ def plan_status_callback(self, msg): if self.plan_status_needed == True: rospy.loginfo("plan_name" + self.plan_name + "; msg name " + msg.name) if self.plan_name in msg.name: - rospy.loginfo("In point " + str(msg.point) + " status " + str(msg.status.status)) + rospy.loginfo( + "In point " + str(msg.point) + " status " + str(msg.status.status) + ) if msg.status.status == 3: self.plan_status_needed = False else: @@ -396,9 +426,7 @@ def wait_plan(self): return 1 - def survey_manager_executor(command_names, run, config_static_path: pathlib.Path): - # Read the static configs that convert constants to values config_static = load_yaml(config_static_path) @@ -409,12 +437,12 @@ def survey_manager_executor(command_names, run, config_static_path: pathlib.Path sim = False # Figure out robot name and whether we are in simulation or hardware - current_robot = os.environ.get('ROBOTNAME') + current_robot = os.environ.get("ROBOTNAME") if not current_robot: rospy.loginfo("ROBOTNAME not defined. Let's get the robotname using the topic") # This is a latching messge so it shouldn't take long try: - data = rospy.wait_for_message('/robot_name', String, timeout=5) + data = rospy.wait_for_message("/robot_name", String, timeout=5) current_robot = data.data.lower() except: current_robot = "" @@ -435,15 +463,28 @@ def survey_manager_executor(command_names, run, config_static_path: pathlib.Path exit_code = 0 if args["type"] == "dock": - exit_code += process_executor.send_command_recursive("rosrun executive teleop_tool -dock" + ns + " -berth " + config_static["berth"][args["berth"]]) + exit_code += process_executor.send_command_recursive( + "rosrun executive teleop_tool -dock" + + ns + + " -berth " + + config_static["berth"][args["berth"]] + ) elif args["type"] == "undock": - exit_code += process_executor.send_command_recursive("rosrun executive teleop_tool -undock" + ns) + exit_code += process_executor.send_command_recursive( + "rosrun executive teleop_tool -undock" + ns + ) elif args["type"] == "move": - exit_code += process_executor.send_command_recursive("rosrun executive teleop_tool -move " + config_static["bays_move"][args["to_name"]] + ns) + exit_code += process_executor.send_command_recursive( + "rosrun executive teleop_tool -move " + + config_static["bays_move"][args["to_name"]] + + ns + ) # Change exposure if needed - exposure_value = exposure_change(config_static, args["from_name"], args["to_name"]) + exposure_value = exposure_change( + config_static, args["from_name"], args["to_name"] + ) if exposure_value != 0: exit_code += command_executor.change_exposure(exposure_value) # Change map if needed @@ -452,56 +493,86 @@ def survey_manager_executor(command_names, run, config_static_path: pathlib.Path exit_code += command_executor.change_map(map_name) elif args["type"] == "panorama": - exit_code += command_executor.start_recording("pano_" + args["location_name"] + "_" + run) - exit_code += process_executor.send_command_recursive("rosrun inspection inspection_tool -geometry -geometry_poses /resources/" + config_static["bays_pano"][args["location_name"]] + ns) + exit_code += command_executor.start_recording( + "pano_" + args["location_name"] + "_" + run + ) + exit_code += process_executor.send_command_recursive( + "rosrun inspection inspection_tool -geometry -geometry_poses /resources/" + + config_static["bays_pano"][args["location_name"]] + + ns + ) exit_code += command_executor.stop_recording() elif args["type"] == "stereo": - exit_code += command_executor.start_recording("stereo_" + os.path.basename(args["fplan"]) + "_" + run) + exit_code += command_executor.start_recording( + "stereo_" + os.path.basename(args["fplan"]) + "_" + run + ) # This starts the plan plan_path = get_ops_plan_path() command_executor.plan_status_needed = True command_executor.plan_name = os.path.basename(args["fplan"]) - exit_code += process_executor.send_command_recursive("rosrun executive plan_pub " + os.path.join(plan_path, args["fplan"] + ".fplan") + ns) + exit_code += process_executor.send_command_recursive( + "rosrun executive plan_pub " + + os.path.join(plan_path, args["fplan"] + ".fplan") + + ns + ) if exit_code == 0: exit_code += command_executor.wait_plan() exit_code += command_executor.stop_recording() return exit_code -def survey_manager_executor_recursive(command_names, run_number, config_static_path: pathlib.Path): - exit_code = survey_manager_executor(command_names, f"run{run_number}", config_static_path) + +def survey_manager_executor_recursive( + command_names, run_number, config_static_path: pathlib.Path +): + exit_code = survey_manager_executor( + command_names, f"run{run_number}", config_static_path + ) if exit_code != 0: repeat = input("Do you want to repeat the survey? (yes/no): ").lower() if repeat == "yes": run_number += 1 - exit_code = survey_manager_executor_recursive(command_names, run_number, config_static_path) + exit_code = survey_manager_executor_recursive( + command_names, run_number, config_static_path + ) return exit_code + class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter): pass -if __name__ == "__main__": + +def main(): parser = argparse.ArgumentParser( description=__doc__, formatter_class=CustomFormatter ) parser.add_argument( "command_names", - nargs='*', + nargs="*", help="Prefixes for bagfiles to merge. Bags should all be in the current working directory.", ) parser.add_argument( "--config_static", help="Path to input static problem config YAML (module geometry, available stereo surveys, etc.)", type=pathlib.Path, - default=os.path.join(rospkg.RosPack().get_path('survey_planner'), "data/survey_static.yaml"), + default=os.path.join( + rospkg.RosPack().get_path("survey_planner"), "data/survey_static.yaml" + ), ) args = parser.parse_args() - exit_code = survey_manager_executor_recursive(args.command_names, 1, args.config_static) + exit_code = survey_manager_executor_recursive( + args.command_names, 1, args.config_static + ) print("Finished plan action with code " + str(exit_code)) + return exit_code + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/astrobee/survey_manager/survey_planner/tools/survey_planner/monitor_astrobee b/astrobee/survey_manager/survey_planner/src/survey_planner/monitor_astrobee.py similarity index 85% rename from astrobee/survey_manager/survey_planner/tools/survey_planner/monitor_astrobee rename to astrobee/survey_manager/survey_planner/src/survey_planner/monitor_astrobee.py index 9c7acbd0..89fc12f7 100755 --- a/astrobee/survey_manager/survey_planner/tools/survey_planner/monitor_astrobee +++ b/astrobee/survey_manager/survey_planner/src/survey_planner/monitor_astrobee.py @@ -2,16 +2,16 @@ # # Copyright (c) 2021, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. -# +# # All rights reserved. -# +# # The "ISAAC - Integrated System for Autonomous and Adaptive Caretaking # platform" software 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 @@ -27,6 +27,7 @@ # Constants CHUNK_SIZE = 1024 + def thread_write_input(sock_input): # print("starting thread_write_input...") try: @@ -35,13 +36,14 @@ def thread_write_input(sock_input): user_input = input() print("user input: " + user_input) # Check if the user wants to exit - if user_input.lower().strip() == 'exit': + if user_input.lower().strip() == "exit": break sock_input.send(user_input.encode("ascii", errors="replace")[:CHUNK_SIZE]) except: print("exit output") + def thread_read_output(sock_output): # print("starting thread_read_output...") try: @@ -49,13 +51,14 @@ def thread_read_output(sock_output): request = sock_output.recv(CHUNK_SIZE) request = request.decode("ascii", errors="replace") # convert bytes to str - print(request, end='') + print(request, end="") except: print("exit input") + def survey_monitor(robot_name): - input_path = '/tmp/input_' + robot_name - output_path = '/tmp/output_' + robot_name + input_path = "/tmp/input_" + robot_name + output_path = "/tmp/output_" + robot_name sock_client_input = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock_client_input.connect(input_path) @@ -63,9 +66,13 @@ def survey_monitor(robot_name): sock_client_output.connect(output_path) # Start input and output threads - input_thread = threading.Thread(target=thread_write_input, args=(sock_client_input,)) + input_thread = threading.Thread( + target=thread_write_input, args=(sock_client_input,) + ) input_thread.start() - output_thread = threading.Thread(target=thread_read_output, args=(sock_client_output,)) + output_thread = threading.Thread( + target=thread_read_output, args=(sock_client_output,) + ) output_thread.start() # Wait for the thread @@ -76,11 +83,12 @@ def survey_monitor(robot_name): sock_client_input.close() sock_client_output.close() + class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter): pass -if __name__ == "__main__": +def main(): parser = argparse.ArgumentParser( description=__doc__, formatter_class=CustomFormatter ) @@ -92,3 +100,8 @@ class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter): args = parser.parse_args() survey_monitor(args.robot_name) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/astrobee/survey_manager/survey_planner/tools/survey_planner/plan_interpreter.py b/astrobee/survey_manager/survey_planner/src/survey_planner/plan_interpreter.py similarity index 99% rename from astrobee/survey_manager/survey_planner/tools/survey_planner/plan_interpreter.py rename to astrobee/survey_manager/survey_planner/src/survey_planner/plan_interpreter.py index 0939e803..13404b03 100755 --- a/astrobee/survey_manager/survey_planner/tools/survey_planner/plan_interpreter.py +++ b/astrobee/survey_manager/survey_planner/src/survey_planner/plan_interpreter.py @@ -319,7 +319,8 @@ def main(): output_path=args.output, plot_path=args.plot, ) + return 0 if __name__ == "__main__": - main() + sys.exit(main()) diff --git a/astrobee/survey_manager/survey_planner/tools/survey_planner.py b/astrobee/survey_manager/survey_planner/src/survey_planner/plan_survey.py similarity index 99% rename from astrobee/survey_manager/survey_planner/tools/survey_planner.py rename to astrobee/survey_manager/survey_planner/src/survey_planner/plan_survey.py index 7c6582e2..c43be3d0 100755 --- a/astrobee/survey_manager/survey_planner/tools/survey_planner.py +++ b/astrobee/survey_manager/survey_planner/src/survey_planner/plan_survey.py @@ -29,7 +29,7 @@ import pyparsing as pp import yaml -from problem_generator import PDDL_DIR +from survey_planner.problem_generator import PDDL_DIR LocationName = str # Names PDDL object of type location LocationIndex = int # Index of location in CONFIG.locations @@ -982,6 +982,7 @@ def survey_planner(domain_path: pathlib.Path, problem_path: pathlib.Path): exec_state = ExecState(sim_state=sim_state, robot_exec_states=robot_exec_states) exec_state.run() + print("; Solution Found") print(format_trace(exec_state.sim_state.trace)) @@ -1013,7 +1014,8 @@ def main(): args = parser.parse_args() survey_planner(domain_path=args.domain, problem_path=args.problem) + return 0 if __name__ == "__main__": - main() + sys.exit(main()) diff --git a/astrobee/survey_manager/survey_planner/tools/survey_planner/problem_generator.py b/astrobee/survey_manager/survey_planner/src/survey_planner/problem_generator.py similarity index 98% rename from astrobee/survey_manager/survey_planner/tools/survey_planner/problem_generator.py rename to astrobee/survey_manager/survey_planner/src/survey_planner/problem_generator.py index cf718dcd..4968f00c 100755 --- a/astrobee/survey_manager/survey_planner/tools/survey_planner/problem_generator.py +++ b/astrobee/survey_manager/survey_planner/src/survey_planner/problem_generator.py @@ -72,8 +72,12 @@ THIS_DIR = pathlib.Path(__file__).resolve().parent CWD = pathlib.Path.cwd() -DATA_DIR = pathlib.Path(os.path.relpath(str((THIS_DIR / ".." / "data").resolve()), CWD)) -PDDL_DIR = pathlib.Path(os.path.relpath(str((THIS_DIR / ".." / "pddl").resolve()), CWD)) +DATA_DIR = pathlib.Path( + os.path.relpath(str((THIS_DIR / ".." / ".." / "data").resolve()), CWD) +) +PDDL_DIR = pathlib.Path( + os.path.relpath(str((THIS_DIR / ".." / ".." / "pddl").resolve()), CWD) +) DEFAULT_CONFIGS = [ DATA_DIR / "survey_static.yaml", DATA_DIR / "jem_survey_dynamic.yaml", @@ -570,7 +574,8 @@ def main(): command=shlex.join(sys.argv), terminal=args.terminal, ) + return 0 if __name__ == "__main__": - main() + sys.exit(main()) diff --git a/astrobee/survey_manager/survey_planner/tools/command_astrobee b/astrobee/survey_manager/survey_planner/tools/command_astrobee new file mode 100755 index 00000000..f3f0f881 --- /dev/null +++ b/astrobee/survey_manager/survey_planner/tools/command_astrobee @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2021, United States Government, as represented by the +# Administrator of the National Aeronautics and Space Administration. +# +# All rights reserved. +# +# The "ISAAC - Integrated System for Autonomous and Adaptive Caretaking +# platform" software 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. + +import sys + +from survey_planner import command_astrobee + +if __name__ == "__main__": + sys.exit(command_astrobee.main()) diff --git a/astrobee/survey_manager/survey_planner/tools/monitor_astrobee b/astrobee/survey_manager/survey_planner/tools/monitor_astrobee new file mode 100755 index 00000000..ca434147 --- /dev/null +++ b/astrobee/survey_manager/survey_planner/tools/monitor_astrobee @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2021, United States Government, as represented by the +# Administrator of the National Aeronautics and Space Administration. +# +# All rights reserved. +# +# The "ISAAC - Integrated System for Autonomous and Adaptive Caretaking +# platform" software 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. + +import sys + +from survey_planner import monitor_astrobee + +if __name__ == "__main__": + sys.exit(monitor_astrobee.main()) diff --git a/astrobee/survey_manager/survey_planner/tools/plan_interpreter b/astrobee/survey_manager/survey_planner/tools/plan_interpreter new file mode 100755 index 00000000..7cdd4999 --- /dev/null +++ b/astrobee/survey_manager/survey_planner/tools/plan_interpreter @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2021, United States Government, as represented by the +# Administrator of the National Aeronautics and Space Administration. +# +# All rights reserved. +# +# The "ISAAC - Integrated System for Autonomous and Adaptive Caretaking +# platform" software 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. + +import sys + +from survey_planner import plan_interpreter + +if __name__ == "__main__": + sys.exit(plan_interpreter.main()) diff --git a/astrobee/survey_manager/survey_planner/tools/plan_survey b/astrobee/survey_manager/survey_planner/tools/plan_survey new file mode 100755 index 00000000..4fe23f84 --- /dev/null +++ b/astrobee/survey_manager/survey_planner/tools/plan_survey @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2021, United States Government, as represented by the +# Administrator of the National Aeronautics and Space Administration. +# +# All rights reserved. +# +# The "ISAAC - Integrated System for Autonomous and Adaptive Caretaking +# platform" software 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. + +import sys + +from survey_planner import plan_survey + +if __name__ == "__main__": + sys.exit(plan_survey.main()) diff --git a/astrobee/survey_manager/survey_planner/tools/problem_generator b/astrobee/survey_manager/survey_planner/tools/problem_generator new file mode 100755 index 00000000..60ec545d --- /dev/null +++ b/astrobee/survey_manager/survey_planner/tools/problem_generator @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2021, United States Government, as represented by the +# Administrator of the National Aeronautics and Space Administration. +# +# All rights reserved. +# +# The "ISAAC - Integrated System for Autonomous and Adaptive Caretaking +# platform" software 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. + +import sys + +from survey_planner import problem_generator + +if __name__ == "__main__": + sys.exit(problem_generator.main())