diff --git a/.gitmodules b/.gitmodules index 6d14a890..10ba949e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,16 @@ [submodule "isaac_msgs"] path = communications/isaac_msgs url = https://github.com/nasa/isaac_msgs.git -[submodule "astrobee/survey_manager/survey_planner/src/ros2_planning_system"] - path = astrobee/survey_manager/survey_planner/src/ros2_planning_system +[submodule "ros2_planning_system"] + path = astrobee/survey_manager/survey_dependencies/ros2_planning_system url = https://github.com/bckempa/ros2_planning_system branch = noetic-devel -[submodule "astrobee/survey_manager/survey_planner/src/ros1_lifecycle"] - path = astrobee/survey_manager/survey_planner/src/ros1_lifecycle - url = https://github.com/bckempa/ros1_lifecycle +[submodule "ros1_lifecycle"] + path = astrobee/survey_manager/survey_dependencies/ros1_lifecycle + url = https://github.com/bckempa/ros1_lifecycle.git branch = noetic-devel +[submodule "popf"] + path = astrobee/survey_manager/survey_dependencies/popf + url = https://github.com/Bckempa/popf.git + branch = noetic-devel + diff --git a/astrobee/survey_manager/survey_dependencies/popf b/astrobee/survey_manager/survey_dependencies/popf new file mode 160000 index 00000000..13b2a506 --- /dev/null +++ b/astrobee/survey_manager/survey_dependencies/popf @@ -0,0 +1 @@ +Subproject commit 13b2a506490dd624204badd52af124e2936bdd6c diff --git a/astrobee/survey_manager/survey_planner/src/ros1_lifecycle b/astrobee/survey_manager/survey_dependencies/ros1_lifecycle similarity index 100% rename from astrobee/survey_manager/survey_planner/src/ros1_lifecycle rename to astrobee/survey_manager/survey_dependencies/ros1_lifecycle diff --git a/astrobee/survey_manager/survey_planner/src/ros2_planning_system b/astrobee/survey_manager/survey_dependencies/ros2_planning_system similarity index 100% rename from astrobee/survey_manager/survey_planner/src/ros2_planning_system rename to astrobee/survey_manager/survey_dependencies/ros2_planning_system diff --git a/astrobee/survey_manager/survey_planner/CMakeLists.txt b/astrobee/survey_manager/survey_planner/CMakeLists.txt new file mode 100644 index 00000000..eb0bc8e4 --- /dev/null +++ b/astrobee/survey_manager/survey_planner/CMakeLists.txt @@ -0,0 +1,38 @@ +# Copyright (c) 2023, 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. + +cmake_minimum_required(VERSION 2.8.3) +project(survey_planner) + +add_compile_options(-std=c++17) + +find_package(catkin REQUIRED) +SET(catkin2_DIR "${CMAKE_SOURCE_DIR}/../../../cmake") +find_package(catkin2 REQUIRED COMPONENTS + roscpp + ff_msgs +) + +catkin_package( + CATKIN_DEPENDS +) + +foreach( dir pddl launch) + install( DIRECTORY ${dir}/ + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir} ) +endforeach(dir) diff --git a/astrobee/survey_manager/survey_planner/launch/survey_domain.launch b/astrobee/survey_manager/survey_planner/launch/survey_domain.launch new file mode 100644 index 00000000..bbcd5145 --- /dev/null +++ b/astrobee/survey_manager/survey_planner/launch/survey_domain.launch @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/astrobee/survey_manager/survey_planner/package.xml b/astrobee/survey_manager/survey_planner/package.xml new file mode 100644 index 00000000..279b7f24 --- /dev/null +++ b/astrobee/survey_manager/survey_planner/package.xml @@ -0,0 +1,34 @@ + + + survey_planner + 0.1.0 + PDDL Planning via Plansys2 on ROS1 Noetic for Astrobee + + Apache License, Version 2.0 + + + ISAAC Flight Software + + + ISAAC Flight Software + + + catkin + + roscpp + std_srvs + lifecycle_msgs + + plansys2_domain_expert + plansys2_problem_expert + plansys2_executor + plansys2_planner + plansys2_msgs + tf + + ff_msgs + + + + + diff --git a/scripts/docker/build.sh b/scripts/docker/build.sh index 370df208..8093f5f1 100755 --- a/scripts/docker/build.sh +++ b/scripts/docker/build.sh @@ -127,10 +127,11 @@ export MAST_PATH=${mast_source} ###################################################################### files=" -f ${thisdir}/docker_compose/ros.docker-compose.yml" +files+=" -f ${thisdir}/docker_compose/isaac.docker-compose.build.yml" +files+=" -f ${thisdir}/docker_compose/isaac.docker-compose.yml" if [ $REMOTE == "" ]; then files+=" -f ${thisdir}/docker_compose/astrobee.docker-compose.build.yml" - files+=" -f ${thisdir}/docker_compose/astrobee.docker-compose.yml" fi if [ "$os" == "focal" ]; then @@ -144,4 +145,4 @@ if [ $mast == 1 ]; then files+=" -f ${script_dir}/docker_compose/mast.docker-compose.yml" fi -docker compose ${files} build +docker compose ${files} -p isaac build diff --git a/scripts/docker/docker_compose/astrobee.docker-compose.build.yml b/scripts/docker/docker_compose/astrobee.docker-compose.build.yml index 26f75f53..ca3edbcc 100644 --- a/scripts/docker/docker_compose/astrobee.docker-compose.build.yml +++ b/scripts/docker/docker_compose/astrobee.docker-compose.build.yml @@ -24,18 +24,8 @@ services: - astrobee-base isaac-astrobee: - image: ${REMOTE:-isaac}/isaac:latest-astrobee-ubuntu${UBUNTU_VERSION} - build: - context: ${ISAAC_PATH} - dockerfile: ${ISAAC_PATH}/scripts/docker/isaac_astrobee.Dockerfile - args: - UBUNTU_VERSION: ${UBUNTU_VERSION:-20.04} - REMOTE: ${REMOTE:-astrobee} - ROS_VERSION: ${ROS_VERSION:-noetic} - PYTHON: ${PYTHON:-3} links: - astrobee - isaac: links: - isaac-astrobee diff --git a/scripts/docker/docker_compose/isaac.docker-compose.build.yml b/scripts/docker/docker_compose/isaac.docker-compose.build.yml new file mode 100644 index 00000000..23d3fa10 --- /dev/null +++ b/scripts/docker/docker_compose/isaac.docker-compose.build.yml @@ -0,0 +1,28 @@ +version: "3.9" +services: + isaac-astrobee: + image: ${REMOTE:-isaac}/isaac:latest-astrobee-ubuntu${UBUNTU_VERSION} + build: + context: ${ISAAC_PATH} + dockerfile: ${ISAAC_PATH}/scripts/docker/isaac_astrobee.Dockerfile + args: + UBUNTU_VERSION: ${UBUNTU_VERSION:-20.04} + REMOTE: ${REMOTE:-astrobee} + ROS_VERSION: ${ROS_VERSION:-noetic} + PYTHON: ${PYTHON:-3} + + isaac: + image: ${REMOTE:-isaac}/isaac:latest-ubuntu${UBUNTU_VERSION} + build: + context: ${ISAAC_PATH} + dockerfile: ${ISAAC_PATH}/scripts/docker/isaac.Dockerfile + args: + UBUNTU_VERSION: ${UBUNTU_VERSION:-20.04} + REMOTE: ${REMOTE:-isaac} + ROS_VERSION: ${ROS_VERSION:-noetic} + PYTHON: ${PYTHON:-3} + links: + - isaac-astrobee + + + diff --git a/scripts/docker/docker_compose/astrobee.docker-compose.yml b/scripts/docker/docker_compose/isaac.docker-compose.yml similarity index 60% rename from scripts/docker/docker_compose/astrobee.docker-compose.yml rename to scripts/docker/docker_compose/isaac.docker-compose.yml index 1c2c023e..9a662349 100644 --- a/scripts/docker/docker_compose/astrobee.docker-compose.yml +++ b/scripts/docker/docker_compose/isaac.docker-compose.yml @@ -2,14 +2,6 @@ version: "3.9" services: isaac: image: ${REMOTE:-isaac}/isaac:latest-ubuntu${UBUNTU_VERSION} - build: - context: ${ISAAC_PATH} - dockerfile: ${ISAAC_PATH}/scripts/docker/isaac.Dockerfile - args: - UBUNTU_VERSION: ${UBUNTU_VERSION:-20.04} - REMOTE: ${REMOTE:-isaac} - ROS_VERSION: ${ROS_VERSION:-noetic} - PYTHON: ${PYTHON:-3} entrypoint: "/ros_entrypoint.sh" command: ${cmd} hostname: isaac diff --git a/scripts/docker/isaac_astrobee.Dockerfile b/scripts/docker/isaac_astrobee.Dockerfile index 12afb06d..f10f4bca 100644 --- a/scripts/docker/isaac_astrobee.Dockerfile +++ b/scripts/docker/isaac_astrobee.Dockerfile @@ -27,10 +27,16 @@ FROM ${REMOTE}/astrobee:latest-ubuntu${UBUNTU_VERSION} ARG ROS_VERSION=noetic ARG PYTHON=3 -RUN apt-get update && apt-get install -y \ - libmnl-dev \ - ros-${ROS_VERSION}-eigen-conversions \ - ros-${ROS_VERSION}-pcl-ros \ +# Install isaac souce dependecies +COPY ./scripts/setup/*.sh /setup/isaac/ +COPY ./scripts/setup/dependencies /setup/isaac/dependencies +RUN apt-get update \ + && /setup/isaac/build_install_dependencies.sh \ + && rm -rf /var/lib/apt/lists/* + +# Install isaac package dependencies +COPY ./scripts/setup/packages*.lst /setup/isaac/ +RUN /setup/isaac/install_desktop_packages.sh \ && rm -rf /var/lib/apt/lists/* # Minimal isaac robot folders diff --git a/scripts/git/pre-commit.linter_python b/scripts/git/pre-commit.linter_python index 89574084..6f33ccb9 100755 --- a/scripts/git/pre-commit.linter_python +++ b/scripts/git/pre-commit.linter_python @@ -72,11 +72,11 @@ echo " Analysing python code style with 'isort'." # could happen for example if the .isort.cfg src_paths list gets out # of date. -if $(isort . --extend-skip cmake --profile black --diff --check-only --quiet >/dev/null); then +if $(isort ${py_changed} --profile black --diff --check-only --quiet >/dev/null); then echo "Linter checks using 'isort' passed." else echo "Errors detected with 'isort'. Fixing them. Try to add and commit your files again." - isort . --extend-skip cmake --profile black >/dev/null + isort ${py_changed} --profile black >/dev/null failed_lint=true fi diff --git a/scripts/setup/packages_focal.lst b/scripts/setup/packages_focal.lst index e1c70e58..35b2833e 100644 --- a/scripts/setup/packages_focal.lst +++ b/scripts/setup/packages_focal.lst @@ -2,9 +2,14 @@ doxygen python3-catkin-tools python3-osrf-pycommon python3-rosdep -libreadline-dev ros-noetic-eigen-conversions ros-noetic-pcl-ros -ros-noetic-behaviortree-cpp libmnl-dev libproj-dev +libreadline-dev +ros-noetic-behaviortree-cpp +coinor-libcbc-dev +coinor-libclp-dev +coinor-libcoinutils-dev +bison +flex \ No newline at end of file