diff --git a/.github/workflows/ci_pr.yml b/.github/workflows/ci_pr.yml index 7cf85928..aae6a8f9 100644 --- a/.github/workflows/ci_pr.yml +++ b/.github/workflows/ci_pr.yml @@ -2,7 +2,7 @@ name: Build and Test CI for Pull Requests on: pull_request: - branches: [ 'master', 'develop', 'survey_manager' ] + branches: [ 'master', 'develop' ] workflow_dispatch: jobs: diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 029441b7..0a6ecc8f 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -24,7 +24,7 @@ jobs: - name: Run black run: | - black . --diff --extend-exclude=cmake --extend-exclude=submodules --extend-exclude=astrobee/survey_manager/survey_dependencies --check + black . --diff --extend-exclude=cmake --extend-exclude=submodules --extend-exclude=astrobee/survey/survey_dependencies --check - name: Run isort run: | - isort . --diff --extend-skip=cmake --extend-skip=submodules --extend-skip=astrobee/survey_manager/survey_dependencies --profile=black --check-only + isort . --diff --extend-skip=cmake --extend-skip=submodules --extend-skip=astrobee/survey/survey_dependencies --profile=black --check-only diff --git a/.gitmodules b/.gitmodules index 473c0f7a..9e03ea51 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,18 +2,18 @@ path = communications/isaac_msgs url = https://github.com/nasa/isaac_msgs.git [submodule "ros2_planning_system"] - path = astrobee/survey_manager/survey_dependencies/ros2_planning_system + path = astrobee/survey/survey_dependencies/ros2_planning_system url = https://github.com/bckempa/ros2_planning_system branch = noetic-devel [submodule "ros1_lifecycle"] - path = astrobee/survey_manager/survey_dependencies/ros1_lifecycle + path = astrobee/survey/survey_dependencies/ros1_lifecycle url = https://github.com/bckempa/ros1_lifecycle.git branch = noetic-devel [submodule "popf"] - path = astrobee/survey_manager/survey_dependencies/popf + path = astrobee/survey/survey_dependencies/popf url = https://github.com/Bckempa/popf.git branch = noetic-devel [submodule "optic_planner"] - path = astrobee/survey_manager/survey_dependencies/optic_planner + path = astrobee/survey/survey_dependencies/optic_planner url = https://github.com/Bckempa/optic_planner.git branch = noetic-devel diff --git a/.isort.cfg b/.isort.cfg index 0f2c426d..f9bd1047 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -15,4 +15,4 @@ # folder, you can auto-update it by running # scripts/git/configure_isort_paths.sh. -src_paths = analyst/workspace/scripts,anomaly/gmm-change-detection,anomaly/gmm-change-detection/scripts/gmm,anomaly/image/scripts,astrobee/behaviors/inspection/scripts,astrobee/simulation/acoustics_cam/src,astrobee/survey_manager/survey_planner,astrobee/survey_manager/survey_planner/scripts,astrobee/survey_manager/survey_planner/src/survey_planner,astrobee/survey_manager/survey_planner/tools/bak,communications/isaac_msgs/isaac_msgs/test,dense_map/geometry_mapper/tools,dense_map/volumetric_mapper/scripts,pano/pano_stitch/scripts,pano/pano_view/scripts,scripts/git +src_paths = analyst/workspace/scripts,anomaly/gmm-change-detection,anomaly/gmm-change-detection/scripts/gmm,anomaly/image/scripts,astrobee/behaviors/inspection/scripts,astrobee/simulation/acoustics_cam/src,astrobee/survey/survey_manager,astrobee/survey/survey_manager/scripts,astrobee/survey/survey_manager/src/survey_manager,astrobee/survey/survey_manager/tools/bak,communications/isaac_msgs/isaac_msgs/test,dense_map/geometry_mapper/tools,dense_map/volumetric_mapper/scripts,pano/pano_stitch/scripts,pano/pano_view/scripts,scripts/git diff --git a/astrobee/survey/readme.md b/astrobee/survey/readme.md new file mode 100644 index 00000000..4b695cab --- /dev/null +++ b/astrobee/survey/readme.md @@ -0,0 +1,5 @@ +\page survey Survey + +The ISAAC Survey provides semi-autonomous planning and execution of panorama and stereophotography tasks to reduce operator loading and improve activity utilization. + +\subpage survey_manager : Planning and scheduling of queued survey actions. diff --git a/astrobee/survey_manager/survey_dependencies/optic_planner b/astrobee/survey/survey_dependencies/optic_planner similarity index 100% rename from astrobee/survey_manager/survey_dependencies/optic_planner rename to astrobee/survey/survey_dependencies/optic_planner diff --git a/astrobee/survey_manager/survey_dependencies/popf b/astrobee/survey/survey_dependencies/popf similarity index 100% rename from astrobee/survey_manager/survey_dependencies/popf rename to astrobee/survey/survey_dependencies/popf diff --git a/astrobee/survey_manager/survey_dependencies/ros1_lifecycle b/astrobee/survey/survey_dependencies/ros1_lifecycle similarity index 100% rename from astrobee/survey_manager/survey_dependencies/ros1_lifecycle rename to astrobee/survey/survey_dependencies/ros1_lifecycle diff --git a/astrobee/survey_manager/survey_dependencies/ros2_planning_system b/astrobee/survey/survey_dependencies/ros2_planning_system similarity index 100% rename from astrobee/survey_manager/survey_dependencies/ros2_planning_system rename to astrobee/survey/survey_dependencies/ros2_planning_system diff --git a/astrobee/survey_manager/survey_planner/CMakeLists.txt b/astrobee/survey/survey_manager/CMakeLists.txt similarity index 99% rename from astrobee/survey_manager/survey_planner/CMakeLists.txt rename to astrobee/survey/survey_manager/CMakeLists.txt index 7850f60e..2e43d6e8 100644 --- a/astrobee/survey_manager/survey_planner/CMakeLists.txt +++ b/astrobee/survey/survey_manager/CMakeLists.txt @@ -17,7 +17,7 @@ # under the License. cmake_minimum_required(VERSION 3.5) -project(survey_planner) +project(survey_manager) set(CMAKE_CXX_STANDARD 17) diff --git a/astrobee/survey_manager/survey_planner/action_testing.md b/astrobee/survey/survey_manager/action_testing.md similarity index 100% rename from astrobee/survey_manager/survey_planner/action_testing.md rename to astrobee/survey/survey_manager/action_testing.md diff --git a/astrobee/survey_manager/survey_planner/data/granite_survey_dynamic.yaml b/astrobee/survey/survey_manager/data/granite_survey_dynamic.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/granite_survey_dynamic.yaml rename to astrobee/survey/survey_manager/data/granite_survey_dynamic.yaml diff --git a/astrobee/survey_manager/survey_planner/data/granite_survey_static.yaml b/astrobee/survey/survey_manager/data/granite_survey_static.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/granite_survey_static.yaml rename to astrobee/survey/survey_manager/data/granite_survey_static.yaml diff --git a/astrobee/survey_manager/survey_planner/data/jem_survey_dynamic.yaml b/astrobee/survey/survey_manager/data/jem_survey_dynamic.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/jem_survey_dynamic.yaml rename to astrobee/survey/survey_manager/data/jem_survey_dynamic.yaml diff --git a/astrobee/survey_manager/survey_planner/data/jem_survey_static.yaml b/astrobee/survey/survey_manager/data/jem_survey_static.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/jem_survey_static.yaml rename to astrobee/survey/survey_manager/data/jem_survey_static.yaml diff --git a/astrobee/survey_manager/survey_planner/data/sample_output_plan.png b/astrobee/survey/survey_manager/data/sample_output_plan.png similarity index 100% rename from astrobee/survey_manager/survey_planner/data/sample_output_plan.png rename to astrobee/survey/survey_manager/data/sample_output_plan.png diff --git a/astrobee/survey_manager/survey_planner/data/sample_output_plan.txt b/astrobee/survey/survey_manager/data/sample_output_plan.txt similarity index 100% rename from astrobee/survey_manager/survey_planner/data/sample_output_plan.txt rename to astrobee/survey/survey_manager/data/sample_output_plan.txt diff --git a/astrobee/survey_manager/survey_planner/data/sample_output_plan.yaml b/astrobee/survey/survey_manager/data/sample_output_plan.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/sample_output_plan.yaml rename to astrobee/survey/survey_manager/data/sample_output_plan.yaml diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/README.md b/astrobee/survey/survey_manager/data/test_cases/README.md similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/README.md rename to astrobee/survey/survey_manager/data/test_cases/README.md diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/completed1_config.yaml b/astrobee/survey/survey_manager/data/test_cases/completed1_config.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/completed1_config.yaml rename to astrobee/survey/survey_manager/data/test_cases/completed1_config.yaml diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/completed1_plan.pddl b/astrobee/survey/survey_manager/data/test_cases/completed1_plan.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/completed1_plan.pddl rename to astrobee/survey/survey_manager/data/test_cases/completed1_plan.pddl diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/completed1_plan.yaml b/astrobee/survey/survey_manager/data/test_cases/completed1_plan.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/completed1_plan.yaml rename to astrobee/survey/survey_manager/data/test_cases/completed1_plan.yaml diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/completed1_problem.pddl b/astrobee/survey/survey_manager/data/test_cases/completed1_problem.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/completed1_problem.pddl rename to astrobee/survey/survey_manager/data/test_cases/completed1_problem.pddl diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/completed2_config.yaml b/astrobee/survey/survey_manager/data/test_cases/completed2_config.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/completed2_config.yaml rename to astrobee/survey/survey_manager/data/test_cases/completed2_config.yaml diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/completed2_plan.pddl b/astrobee/survey/survey_manager/data/test_cases/completed2_plan.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/completed2_plan.pddl rename to astrobee/survey/survey_manager/data/test_cases/completed2_plan.pddl diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/completed2_plan.yaml b/astrobee/survey/survey_manager/data/test_cases/completed2_plan.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/completed2_plan.yaml rename to astrobee/survey/survey_manager/data/test_cases/completed2_plan.yaml diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/completed2_problem.pddl b/astrobee/survey/survey_manager/data/test_cases/completed2_problem.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/completed2_problem.pddl rename to astrobee/survey/survey_manager/data/test_cases/completed2_problem.pddl diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/generate.bash b/astrobee/survey/survey_manager/data/test_cases/generate.bash similarity index 81% rename from astrobee/survey_manager/survey_planner/data/test_cases/generate.bash rename to astrobee/survey/survey_manager/data/test_cases/generate.bash index 032e9ec2..2e804672 100755 --- a/astrobee/survey_manager/survey_planner/data/test_cases/generate.bash +++ b/astrobee/survey/survey_manager/data/test_cases/generate.bash @@ -26,9 +26,9 @@ set -eu -o pipefail THIS_FILE=$(readlink -f "$0") THIS_DIR=$(dirname "${THIS_FILE}") -SURVEY_PLANNER_DIR=$(readlink -f "${THIS_DIR}/../..") -PDDL_DIR="${SURVEY_PLANNER_DIR}/pddl" -DATA_DIR="${SURVEY_PLANNER_DIR}/data" +SURVEY_MANAGER_DIR=$(readlink -f "${THIS_DIR}/../..") +PDDL_DIR="${SURVEY_MANAGER_DIR}/pddl" +DATA_DIR="${SURVEY_MANAGER_DIR}/data" CASES_DIR="${DATA_DIR}/test_cases" DOMAIN="${PDDL_DIR}/domain_survey.pddl" cd "${THIS_DIR}" @@ -40,11 +40,11 @@ for i in "${TEST_CASES[@]}"; do { echo -e "\n=== $i ==="; } 2> /dev/null PROBLEM="${CASES_DIR}/${i}_problem.pddl" PLAN="${CASES_DIR}/${i}_plan.pddl" - rosrun survey_planner problem_generator.py "--config=${DATA_DIR}/survey_static.yaml,${CASES_DIR}/${i}_config.yaml" "--output=${PROBLEM}" + rosrun survey_manager problem_generator.py "--config=${DATA_DIR}/survey_static.yaml,${CASES_DIR}/${i}_config.yaml" "--output=${PROBLEM}" # Try to eliminate variation in problem.pddl due to embedding different local install paths in the output. - perl -i -ple "s:${SURVEY_PLANNER_DIR}/::g;" "${PROBLEM}" - rosrun survey_planner plan_survey.py "${DOMAIN}" "${PROBLEM}" > "${PLAN}" + perl -i -ple "s:${SURVEY_MANAGER_DIR}/::g;" "${PROBLEM}" + rosrun survey_manager plan_survey.py "${DOMAIN}" "${PROBLEM}" > "${PLAN}" { echo "[plan_survey.py stdout redirected to ${PLAN}]"; } 2> /dev/null rosrun popf validate -t 0.0001 -e "${DOMAIN}" "${PROBLEM}" "${PLAN}" - rosrun survey_planner plan_interpreter.py "--plan=${PLAN}" "--plot=${CASES_DIR}/${i}_plot.png" "--output=${CASES_DIR}/${i}_plan.yaml" + rosrun survey_manager plan_interpreter.py "--plan=${PLAN}" "--plot=${CASES_DIR}/${i}_plot.png" "--output=${CASES_DIR}/${i}_plan.yaml" done diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive1_config.yaml b/astrobee/survey/survey_manager/data/test_cases/proactive1_config.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive1_config.yaml rename to astrobee/survey/survey_manager/data/test_cases/proactive1_config.yaml diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive1_plan.pddl b/astrobee/survey/survey_manager/data/test_cases/proactive1_plan.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive1_plan.pddl rename to astrobee/survey/survey_manager/data/test_cases/proactive1_plan.pddl diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive1_plan.yaml b/astrobee/survey/survey_manager/data/test_cases/proactive1_plan.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive1_plan.yaml rename to astrobee/survey/survey_manager/data/test_cases/proactive1_plan.yaml diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive1_problem.pddl b/astrobee/survey/survey_manager/data/test_cases/proactive1_problem.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive1_problem.pddl rename to astrobee/survey/survey_manager/data/test_cases/proactive1_problem.pddl diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive2_config.yaml b/astrobee/survey/survey_manager/data/test_cases/proactive2_config.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive2_config.yaml rename to astrobee/survey/survey_manager/data/test_cases/proactive2_config.yaml diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive2_plan.pddl b/astrobee/survey/survey_manager/data/test_cases/proactive2_plan.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive2_plan.pddl rename to astrobee/survey/survey_manager/data/test_cases/proactive2_plan.pddl diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive2_plan.yaml b/astrobee/survey/survey_manager/data/test_cases/proactive2_plan.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive2_plan.yaml rename to astrobee/survey/survey_manager/data/test_cases/proactive2_plan.yaml diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive2_problem.pddl b/astrobee/survey/survey_manager/data/test_cases/proactive2_problem.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive2_problem.pddl rename to astrobee/survey/survey_manager/data/test_cases/proactive2_problem.pddl diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive3_config.yaml b/astrobee/survey/survey_manager/data/test_cases/proactive3_config.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive3_config.yaml rename to astrobee/survey/survey_manager/data/test_cases/proactive3_config.yaml diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive3_plan.pddl b/astrobee/survey/survey_manager/data/test_cases/proactive3_plan.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive3_plan.pddl rename to astrobee/survey/survey_manager/data/test_cases/proactive3_plan.pddl diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive3_plan.yaml b/astrobee/survey/survey_manager/data/test_cases/proactive3_plan.yaml similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive3_plan.yaml rename to astrobee/survey/survey_manager/data/test_cases/proactive3_plan.yaml diff --git a/astrobee/survey_manager/survey_planner/data/test_cases/proactive3_problem.pddl b/astrobee/survey/survey_manager/data/test_cases/proactive3_problem.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/data/test_cases/proactive3_problem.pddl rename to astrobee/survey/survey_manager/data/test_cases/proactive3_problem.pddl diff --git a/astrobee/survey_manager/survey_planner/include/survey_planner/isaac_action_node.h b/astrobee/survey/survey_manager/include/survey_manager/isaac_action_node.h similarity index 91% rename from astrobee/survey_manager/survey_planner/include/survey_planner/isaac_action_node.h rename to astrobee/survey/survey_manager/include/survey_manager/isaac_action_node.h index 5bd48a2d..6cfe0821 100644 --- a/astrobee/survey_manager/survey_planner/include/survey_planner/isaac_action_node.h +++ b/astrobee/survey/survey_manager/include/survey_manager/isaac_action_node.h @@ -17,8 +17,8 @@ * under the License. */ -#ifndef SURVEY_PLANNER_ISAAC_ACTION_NODE_H_ -#define SURVEY_PLANNER_ISAAC_ACTION_NODE_H_ +#ifndef SURVEY_MANAGER_ISAAC_ACTION_NODE_H_ +#define SURVEY_MANAGER_ISAAC_ACTION_NODE_H_ #include @@ -48,4 +48,4 @@ class IsaacAction : public plansys2::ActionExecutorClient { // Main entry point for application int isaac_action_main(int argc, char *argv[], const char* action_name); -#endif // SURVEY_PLANNER_ISAAC_ACTION_NODE_H_ +#endif // SURVEY_MANAGER_ISAAC_ACTION_NODE_H_ diff --git a/astrobee/survey_manager/survey_planner/launch/survey.launch b/astrobee/survey/survey_manager/launch/survey.launch similarity index 78% rename from astrobee/survey_manager/survey_planner/launch/survey.launch rename to astrobee/survey/survey_manager/launch/survey.launch index 98c7a138..0f66cbf1 100644 --- a/astrobee/survey_manager/survey_planner/launch/survey.launch +++ b/astrobee/survey/survey_manager/launch/survey.launch @@ -9,9 +9,9 @@ - + - + @@ -49,29 +49,29 @@ - + - + - + - + - + - + - + - + - + - + diff --git a/astrobee/survey_manager/survey_planner/package.xml b/astrobee/survey/survey_manager/package.xml similarity index 97% rename from astrobee/survey_manager/survey_planner/package.xml rename to astrobee/survey/survey_manager/package.xml index 0a530666..fda53111 100644 --- a/astrobee/survey_manager/survey_planner/package.xml +++ b/astrobee/survey/survey_manager/package.xml @@ -1,6 +1,6 @@ - survey_planner + survey_manager 0.1.0 PDDL Planning via Plansys2 on ROS1 Noetic for Astrobee diff --git a/astrobee/survey_manager/survey_planner/params/plansys2_optic_params.yaml b/astrobee/survey/survey_manager/params/plansys2_optic_params.yaml similarity index 84% rename from astrobee/survey_manager/survey_planner/params/plansys2_optic_params.yaml rename to astrobee/survey/survey_manager/params/plansys2_optic_params.yaml index 108d30d7..7182dae0 100644 --- a/astrobee/survey_manager/survey_planner/params/plansys2_optic_params.yaml +++ b/astrobee/survey/survey_manager/params/plansys2_optic_params.yaml @@ -6,7 +6,7 @@ planner: arguments: "-N" TREY: plugin: "plansys2/OPTICPlanSolver" - command: "rosrun survey_planner plan_survey" + command: "rosrun survey_manager plan_survey" POPF: plugin: "plansys2/POPFPlanSolver" TFD: diff --git a/astrobee/survey_manager/survey_planner/params/plansys2_trey_params.yaml b/astrobee/survey/survey_manager/params/plansys2_trey_params.yaml similarity index 83% rename from astrobee/survey_manager/survey_planner/params/plansys2_trey_params.yaml rename to astrobee/survey/survey_manager/params/plansys2_trey_params.yaml index 7da0be6d..fde07754 100644 --- a/astrobee/survey_manager/survey_planner/params/plansys2_trey_params.yaml +++ b/astrobee/survey/survey_manager/params/plansys2_trey_params.yaml @@ -6,7 +6,7 @@ planner: arguments: "-N" TREY: plugin: "plansys2/OPTICPlanSolver" - command: "rosrun survey_planner plan_survey" + command: "rosrun survey_manager plan_survey" POPF: plugin: "plansys2/POPFPlanSolver" TFD: diff --git a/astrobee/survey_manager/survey_planner/pddl/domain_survey.pddl b/astrobee/survey/survey_manager/pddl/domain_survey.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/pddl/domain_survey.pddl rename to astrobee/survey/survey_manager/pddl/domain_survey.pddl diff --git a/astrobee/survey_manager/survey_planner/pddl/jem_survey_template.pddl b/astrobee/survey/survey_manager/pddl/jem_survey_template.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/pddl/jem_survey_template.pddl rename to astrobee/survey/survey_manager/pddl/jem_survey_template.pddl diff --git a/astrobee/survey_manager/survey_planner/pddl/problem_granite_survey.ps2.pddl b/astrobee/survey/survey_manager/pddl/problem_granite_survey.ps2.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/pddl/problem_granite_survey.ps2.pddl rename to astrobee/survey/survey_manager/pddl/problem_granite_survey.ps2.pddl diff --git a/astrobee/survey_manager/survey_planner/pddl/problem_jem_survey.pddl b/astrobee/survey/survey_manager/pddl/problem_jem_survey.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/pddl/problem_jem_survey.pddl rename to astrobee/survey/survey_manager/pddl/problem_jem_survey.pddl diff --git a/astrobee/survey_manager/survey_planner/pddl/problem_jem_survey.ps2.pddl b/astrobee/survey/survey_manager/pddl/problem_jem_survey.ps2.pddl similarity index 100% rename from astrobee/survey_manager/survey_planner/pddl/problem_jem_survey.ps2.pddl rename to astrobee/survey/survey_manager/pddl/problem_jem_survey.ps2.pddl diff --git a/astrobee/survey_manager/survey_planner/readme.md b/astrobee/survey/survey_manager/readme.md similarity index 92% rename from astrobee/survey_manager/survey_planner/readme.md rename to astrobee/survey/survey_manager/readme.md index 0db9e9e4..cf3f83e3 100644 --- a/astrobee/survey_manager/survey_planner/readme.md +++ b/astrobee/survey/survey_manager/readme.md @@ -1,4 +1,4 @@ -\page survey_planner Survey Planner +\page survey_manager Survey Planner Planning and scheduling of queued survey actions using Playsys2 for PDDL solutions and behavior trees for execution. @@ -6,25 +6,25 @@ Based on [preliminary work](https://github.com/traclabs/astrobee_task_planning_w ## Starting survey planner -The survey_planner as of now starts separately from the isaac fsw. This is necessary because the planner crashes very easily, so having the ability to easily restart this component is necessary. +The survey_manager as of now starts separately from the isaac fsw. This is necessary because the planner crashes very easily, so having the ability to easily restart this component is necessary. To start the planner and the terminal interface (in the robot, add the prefix `/opt/isaac/env_wrapper.sh`): - roslaunch survey_planner survey_domain.launch + roslaunch survey_manager survey_domain.launch rosrun plansys2_terminal plansys2_terminal To monitor an execution and to input commands to the execution: - rosrun survey_planner monitor_astrobee $ROBOTNAME + rosrun survey_manager monitor_astrobee $ROBOTNAME ## Running actions manually There are 5 different actions at the moment 'move', 'dock', 'undock', 'panorama', 'stereo'. -To run each action individually through the survey_planner you must add the correct predicates before sending the action command or else the plansys2 executor will crash. Also, if you want to re-send the action you'll want to re-send the predicates too. +To run each action individually through the survey_manager you must add the correct predicates before sending the action command or else the plansys2 executor will crash. Also, if you want to re-send the action you'll want to re-send the predicates too. Don't forget to change the commands to use the target robot's name (bumble is what is used in simulation) -If the survey_planner crashes sometimes the simulation has to be restarted for it to restart in a good state. +If the survey_manager crashes sometimes the simulation has to be restarted for it to restart in a good state. \subpage action_testing @@ -115,7 +115,7 @@ source "${ISAAC_WS}/devel/setup.bash" 4. Start the survey manager: ```bash # === In terminal 2 === - roslaunch survey_planner survey.launch quick:=true + roslaunch survey_manager survey.launch quick:=true # roslaunch will run indefinitely. Press Ctrl-C to shut down the system. # The quick:=true flag speeds up longer actions (for sim use only). @@ -137,8 +137,8 @@ source "${ISAAC_WS}/devel/setup.bash" EOF cat </tmp/plan_and_run.bash - data="${ISAAC_WS}/src/astrobee/survey_manager/survey_planner/data" - rosrun survey_planner problem_generator --terminal "--config=\${data}/jem_survey_static.yaml,\${data}/jem_survey_dynamic.yaml" --output=/tmp/problem.ps2.pddl + data="${ISAAC_WS}/src/astrobee/survey_manager/survey_manager/data" + rosrun survey_manager problem_generator --terminal "--config=\${data}/jem_survey_static.yaml,\${data}/jem_survey_dynamic.yaml" --output=/tmp/problem.ps2.pddl cat /tmp/term_commands.txt | rosrun plansys2_terminal plansys2_terminal EOF @@ -170,5 +170,5 @@ source "${ISAAC_WS}/devel/setup.bash" frames. To connect to the action running on a robot, choose the robot and run like this: ```bash - rosrun survey_planner monitor_astrobee bumble # or honey + rosrun survey_manager monitor_astrobee bumble # or honey ``` diff --git a/astrobee/survey_manager/survey_planner/scripts/pidwrap.sh b/astrobee/survey/survey_manager/scripts/pidwrap.sh similarity index 100% rename from astrobee/survey_manager/survey_planner/scripts/pidwrap.sh rename to astrobee/survey/survey_manager/scripts/pidwrap.sh diff --git a/astrobee/survey_manager/survey_planner/scripts/tmux_inject.py b/astrobee/survey/survey_manager/scripts/tmux_inject.py similarity index 100% rename from astrobee/survey_manager/survey_planner/scripts/tmux_inject.py rename to astrobee/survey/survey_manager/scripts/tmux_inject.py diff --git a/astrobee/survey_manager/survey_planner/setup.py b/astrobee/survey/survey_manager/setup.py similarity index 66% rename from astrobee/survey_manager/survey_planner/setup.py rename to astrobee/survey/survey_manager/setup.py index 36d2b9e2..9ebf0d4c 100644 --- a/astrobee/survey_manager/survey_planner/setup.py +++ b/astrobee/survey/survey_manager/setup.py @@ -2,6 +2,6 @@ from catkin_pkg.python_setup import generate_distutils_setup -d = generate_distutils_setup(packages=["survey_planner"], package_dir={"": "src"}) +d = generate_distutils_setup(packages=["survey_manager"], package_dir={"": "src"}) setup(**d) diff --git a/astrobee/survey_manager/survey_planner/src/dock_action_node.cpp b/astrobee/survey/survey_manager/src/dock_action_node.cpp similarity index 95% rename from astrobee/survey_manager/survey_planner/src/dock_action_node.cpp rename to astrobee/survey/survey_manager/src/dock_action_node.cpp index a06abca6..c38a0cde 100644 --- a/astrobee/survey_manager/survey_planner/src/dock_action_node.cpp +++ b/astrobee/survey/survey_manager/src/dock_action_node.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include int main(int argc, char *argv[]) { return isaac_action_main(argc, argv, "dock"); diff --git a/astrobee/survey_manager/survey_planner/src/isaac_action_node.cpp b/astrobee/survey/survey_manager/src/isaac_action_node.cpp similarity index 98% rename from astrobee/survey_manager/survey_planner/src/isaac_action_node.cpp rename to astrobee/survey/survey_manager/src/isaac_action_node.cpp index 64466071..b2891af5 100644 --- a/astrobee/survey_manager/survey_planner/src/isaac_action_node.cpp +++ b/astrobee/survey/survey_manager/src/isaac_action_node.cpp @@ -34,7 +34,7 @@ #include #include -#include "survey_planner/isaac_action_node.h" +#include "survey_manager/isaac_action_node.h" namespace plansys2_actions { @@ -122,7 +122,7 @@ class PopenReader { // Return the estimated duration (seconds) of action `action_name`. Queried from PDDL model. On // query error, return a default value of one minute. double get_action_duration(const std::string& action_name) { - std::string cmd = std::string("rosrun survey_planner pddl_query action_duration ") + action_name; + std::string cmd = std::string("rosrun survey_manager pddl_query action_duration ") + action_name; printf("get_action_duration %s: running query: %s\n", action_name.c_str(), cmd.c_str()); const double default_duration = 60.0; // one minute @@ -176,7 +176,7 @@ void IsaacAction::do_work() { } command_ = std::string("(") + args_str + ")"; std::string quick_str = quick_ ? "--quick " : ""; - std::string command_astrobee_call = std::string("rosrun survey_planner command_astrobee ") + quick_str + args_str; + std::string command_astrobee_call = std::string("rosrun survey_manager command_astrobee ") + quick_str + args_str; start_time_ = ros::Time::now(); pid_ = fork(); diff --git a/astrobee/survey_manager/survey_planner/src/move_action_node.cpp b/astrobee/survey/survey_manager/src/move_action_node.cpp similarity index 95% rename from astrobee/survey_manager/survey_planner/src/move_action_node.cpp rename to astrobee/survey/survey_manager/src/move_action_node.cpp index ca12cb92..a7d9a255 100644 --- a/astrobee/survey_manager/survey_planner/src/move_action_node.cpp +++ b/astrobee/survey/survey_manager/src/move_action_node.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include int main(int argc, char *argv[]) { return isaac_action_main(argc, argv, "move"); diff --git a/astrobee/survey_manager/survey_planner/src/panorama_action_node.cpp b/astrobee/survey/survey_manager/src/panorama_action_node.cpp similarity index 95% rename from astrobee/survey_manager/survey_planner/src/panorama_action_node.cpp rename to astrobee/survey/survey_manager/src/panorama_action_node.cpp index b63386a4..a80fa555 100644 --- a/astrobee/survey_manager/survey_planner/src/panorama_action_node.cpp +++ b/astrobee/survey/survey_manager/src/panorama_action_node.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include int main(int argc, char *argv[]) { return isaac_action_main(argc, argv, "panorama"); diff --git a/astrobee/survey_manager/survey_planner/src/stereo_action_node.cpp b/astrobee/survey/survey_manager/src/stereo_action_node.cpp similarity index 95% rename from astrobee/survey_manager/survey_planner/src/stereo_action_node.cpp rename to astrobee/survey/survey_manager/src/stereo_action_node.cpp index ddd0bd7b..ad4f85e3 100644 --- a/astrobee/survey_manager/survey_planner/src/stereo_action_node.cpp +++ b/astrobee/survey/survey_manager/src/stereo_action_node.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include int main(int argc, char *argv[]) { return isaac_action_main(argc, argv, "stereo"); diff --git a/astrobee/survey_manager/survey_planner/src/survey_planner/__init__.py b/astrobee/survey/survey_manager/src/survey_manager/__init__.py similarity index 100% rename from astrobee/survey_manager/survey_planner/src/survey_planner/__init__.py rename to astrobee/survey/survey_manager/src/survey_manager/__init__.py diff --git a/astrobee/survey_manager/survey_planner/src/survey_planner/command_astrobee.py b/astrobee/survey/survey_manager/src/survey_manager/command_astrobee.py similarity index 99% rename from astrobee/survey_manager/survey_planner/src/survey_planner/command_astrobee.py rename to astrobee/survey/survey_manager/src/survey_manager/command_astrobee.py index c4f36e1f..b3b0c1fb 100755 --- a/astrobee/survey_manager/survey_planner/src/survey_planner/command_astrobee.py +++ b/astrobee/survey/survey_manager/src/survey_manager/command_astrobee.py @@ -42,8 +42,8 @@ ) from std_msgs.msg import Header, String -# Imports from survey_planner package -from survey_planner.problem_generator import ( +# Imports from survey_manager package +from survey_manager.problem_generator import ( YamlMapping, load_yaml, yaml_action_from_pddl, @@ -855,10 +855,10 @@ class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter): def main(): default_config_paths = [ os.path.join( - rospkg.RosPack().get_path("survey_planner"), "data/jem_survey_static.yaml" + rospkg.RosPack().get_path("survey_manager"), "data/jem_survey_static.yaml" ), os.path.join( - rospkg.RosPack().get_path("survey_planner"), + rospkg.RosPack().get_path("survey_manager"), "data/granite_survey_static.yaml", ), ] diff --git a/astrobee/survey_manager/survey_planner/src/survey_planner/monitor_astrobee.py b/astrobee/survey/survey_manager/src/survey_manager/monitor_astrobee.py similarity index 100% rename from astrobee/survey_manager/survey_planner/src/survey_planner/monitor_astrobee.py rename to astrobee/survey/survey_manager/src/survey_manager/monitor_astrobee.py diff --git a/astrobee/survey_manager/survey_planner/src/survey_planner/mypy.ini b/astrobee/survey/survey_manager/src/survey_manager/mypy.ini similarity index 100% rename from astrobee/survey_manager/survey_planner/src/survey_planner/mypy.ini rename to astrobee/survey/survey_manager/src/survey_manager/mypy.ini diff --git a/astrobee/survey_manager/survey_planner/src/survey_planner/pddl_query.py b/astrobee/survey/survey_manager/src/survey_manager/pddl_query.py similarity index 96% rename from astrobee/survey_manager/survey_planner/src/survey_planner/pddl_query.py rename to astrobee/survey/survey_manager/src/survey_manager/pddl_query.py index d9fe95c3..b70b4381 100755 --- a/astrobee/survey_manager/survey_planner/src/survey_planner/pddl_query.py +++ b/astrobee/survey/survey_manager/src/survey_manager/pddl_query.py @@ -33,8 +33,8 @@ import pathlib from typing import List -from survey_planner.plan_survey import get_action_durations, parse_pddl -from survey_planner.problem_generator import PDDL_DIR +from survey_manager.plan_survey import get_action_durations, parse_pddl +from survey_manager.problem_generator import PDDL_DIR @enum.unique diff --git a/astrobee/survey_manager/survey_planner/src/survey_planner/plan_interpreter.py b/astrobee/survey/survey_manager/src/survey_manager/plan_interpreter.py similarity index 99% rename from astrobee/survey_manager/survey_planner/src/survey_planner/plan_interpreter.py rename to astrobee/survey/survey_manager/src/survey_manager/plan_interpreter.py index 6e3955eb..fee04569 100755 --- a/astrobee/survey_manager/survey_planner/src/survey_planner/plan_interpreter.py +++ b/astrobee/survey/survey_manager/src/survey_manager/plan_interpreter.py @@ -43,7 +43,7 @@ from matplotlib import patches as mp from matplotlib import pyplot as plt -from survey_planner.problem_generator import ( +from survey_manager.problem_generator import ( DATA_DIR, get_stereo_traj, load_yaml, diff --git a/astrobee/survey_manager/survey_planner/src/survey_planner/plan_survey.py b/astrobee/survey/survey_manager/src/survey_manager/plan_survey.py similarity index 99% rename from astrobee/survey_manager/survey_planner/src/survey_planner/plan_survey.py rename to astrobee/survey/survey_manager/src/survey_manager/plan_survey.py index b17b92fa..4d64beae 100755 --- a/astrobee/survey_manager/survey_planner/src/survey_planner/plan_survey.py +++ b/astrobee/survey/survey_manager/src/survey_manager/plan_survey.py @@ -32,7 +32,7 @@ import pyparsing as pp import yaml -from survey_planner.problem_generator import PDDL_DIR +from survey_manager.problem_generator import PDDL_DIR LocationName = str # Names PDDL object of type location LocationIndex = int # Index of location in CONFIG.locations diff --git a/astrobee/survey_manager/survey_planner/src/survey_planner/problem_generator.py b/astrobee/survey/survey_manager/src/survey_manager/problem_generator.py similarity index 99% rename from astrobee/survey_manager/survey_planner/src/survey_planner/problem_generator.py rename to astrobee/survey/survey_manager/src/survey_manager/problem_generator.py index 2b19fa94..6d0e1f20 100755 --- a/astrobee/survey_manager/survey_planner/src/survey_planner/problem_generator.py +++ b/astrobee/survey/survey_manager/src/survey_manager/problem_generator.py @@ -74,10 +74,10 @@ CWD = pathlib.Path.cwd() rospack = rospkg.RosPack() DATA_DIR = pathlib.Path( - os.path.relpath(pathlib.Path(rospack.get_path("survey_planner")) / "data", CWD) + os.path.relpath(pathlib.Path(rospack.get_path("survey_manager")) / "data", CWD) ) PDDL_DIR = pathlib.Path( - os.path.relpath(pathlib.Path(rospack.get_path("survey_planner")) / "pddl", CWD) + os.path.relpath(pathlib.Path(rospack.get_path("survey_manager")) / "pddl", CWD) ) DEFAULT_CONFIGS = [ DATA_DIR / "jem_survey_static.yaml", diff --git a/astrobee/survey_manager/survey_planner/src/undock_action_node.cpp b/astrobee/survey/survey_manager/src/undock_action_node.cpp similarity index 95% rename from astrobee/survey_manager/survey_planner/src/undock_action_node.cpp rename to astrobee/survey/survey_manager/src/undock_action_node.cpp index 09d3ca6e..5e206ab1 100644 --- a/astrobee/survey_manager/survey_planner/src/undock_action_node.cpp +++ b/astrobee/survey/survey_manager/src/undock_action_node.cpp @@ -17,7 +17,7 @@ * under the License. */ -#include +#include int main(int argc, char *argv[]) { return isaac_action_main(argc, argv, "undock"); diff --git a/astrobee/survey_manager/survey_planner/tools/command_astrobee b/astrobee/survey/survey_manager/tools/command_astrobee similarity index 95% rename from astrobee/survey_manager/survey_planner/tools/command_astrobee rename to astrobee/survey/survey_manager/tools/command_astrobee index f3f0f881..ed21641b 100755 --- a/astrobee/survey_manager/survey_planner/tools/command_astrobee +++ b/astrobee/survey/survey_manager/tools/command_astrobee @@ -20,7 +20,7 @@ import sys -from survey_planner import command_astrobee +from survey_manager 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/survey_manager/tools/monitor_astrobee similarity index 95% rename from astrobee/survey_manager/survey_planner/tools/monitor_astrobee rename to astrobee/survey/survey_manager/tools/monitor_astrobee index ca434147..7c2b4590 100755 --- a/astrobee/survey_manager/survey_planner/tools/monitor_astrobee +++ b/astrobee/survey/survey_manager/tools/monitor_astrobee @@ -20,7 +20,7 @@ import sys -from survey_planner import monitor_astrobee +from survey_manager import monitor_astrobee if __name__ == "__main__": sys.exit(monitor_astrobee.main()) diff --git a/astrobee/survey_manager/survey_planner/tools/pddl_query b/astrobee/survey/survey_manager/tools/pddl_query similarity index 95% rename from astrobee/survey_manager/survey_planner/tools/pddl_query rename to astrobee/survey/survey_manager/tools/pddl_query index c243960f..850011fa 100644 --- a/astrobee/survey_manager/survey_planner/tools/pddl_query +++ b/astrobee/survey/survey_manager/tools/pddl_query @@ -20,7 +20,7 @@ import sys -from survey_planner import pddl_query +from survey_manager import pddl_query if __name__ == "__main__": pddl_query.main() diff --git a/astrobee/survey_manager/survey_planner/tools/plan_interpreter b/astrobee/survey/survey_manager/tools/plan_interpreter similarity index 95% rename from astrobee/survey_manager/survey_planner/tools/plan_interpreter rename to astrobee/survey/survey_manager/tools/plan_interpreter index 7cdd4999..dbade6fd 100755 --- a/astrobee/survey_manager/survey_planner/tools/plan_interpreter +++ b/astrobee/survey/survey_manager/tools/plan_interpreter @@ -20,7 +20,7 @@ import sys -from survey_planner import plan_interpreter +from survey_manager 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/survey_manager/tools/plan_survey similarity index 95% rename from astrobee/survey_manager/survey_planner/tools/plan_survey rename to astrobee/survey/survey_manager/tools/plan_survey index 4fe23f84..a0ea412b 100755 --- a/astrobee/survey_manager/survey_planner/tools/plan_survey +++ b/astrobee/survey/survey_manager/tools/plan_survey @@ -20,7 +20,7 @@ import sys -from survey_planner import plan_survey +from survey_manager 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/survey_manager/tools/problem_generator similarity index 95% rename from astrobee/survey_manager/survey_planner/tools/problem_generator rename to astrobee/survey/survey_manager/tools/problem_generator index 60ec545d..e61a2e22 100755 --- a/astrobee/survey_manager/survey_planner/tools/problem_generator +++ b/astrobee/survey/survey_manager/tools/problem_generator @@ -20,7 +20,7 @@ import sys -from survey_planner import problem_generator +from survey_manager import problem_generator if __name__ == "__main__": sys.exit(problem_generator.main()) diff --git a/astrobee/survey_manager/readme.md b/astrobee/survey_manager/readme.md deleted file mode 100644 index 75b544a4..00000000 --- a/astrobee/survey_manager/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -\page survey Survey Manager - -The ISAAC Survey Manager provides semi-autonomous planning and execution of panorama and stereophotography tasks to reduce operator loading and improve activity utilization. - -\subpage survey_planner : Planning and scheduling of queued survey actions. diff --git a/isaac.doxyfile b/isaac.doxyfile index 29ac3c37..1d7d3208 100644 --- a/isaac.doxyfile +++ b/isaac.doxyfile @@ -899,7 +899,7 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE =astrobee/survey_manager/survey_dependencies +EXCLUDE =astrobee/survey/survey_dependencies # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded diff --git a/scripts/git/configure_isort_paths.sh b/scripts/git/configure_isort_paths.sh index 1323b50c..e3e20f11 100755 --- a/scripts/git/configure_isort_paths.sh +++ b/scripts/git/configure_isort_paths.sh @@ -31,7 +31,7 @@ pydirs=$( \ find . -name "*.py" -print0 \ | xargs -0 dirname \ | cut -c3- \ - | grep -Pv "^cmake|^submodules|^astrobee/survey_manager/survey_dependencies|^scripts/setup/dependencies" \ + | grep -Pv "^cmake|^submodules|^astrobee/survey/survey_dependencies|^scripts/setup/dependencies" \ | sort \ | uniq \ | paste -sd "," - \ diff --git a/scripts/git/pre-commit.linter_python b/scripts/git/pre-commit.linter_python index 6ed60178..db470e2f 100755 --- a/scripts/git/pre-commit.linter_python +++ b/scripts/git/pre-commit.linter_python @@ -75,7 +75,7 @@ echo " Analysing python code style with 'isort'." isort_args=( "--extend-skip=cmake" "--extend-skip=submodules" - "--extend-skip=astrobee/survey_manager/survey_dependencies" + "--extend-skip=astrobee/survey/survey_dependencies" "--profile=black" ) if $(isort . "${isort_args[@]}" --diff --check-only --quiet >/dev/null); then