Skip to content

Commit

Permalink
Basic Survey Planning (#114)
Browse files Browse the repository at this point in the history
* Add `survey_manager` subdirectory without layout for survey nodes

Includes placeholder directories with hyperlinked `readme.md` files in
the documentation hierarchy for the manger, planner, and bridge.

Per discussion with @marinagmoreira `survey_manager` lives under
`astrobee` to signify the code is intended for cross-compilation.

* Improve linking to survey manager docs

* Add files via upload

Adding planning domain, problem, and xml of the atomic actions of the robotic agents

* added  files to the correct directory

* adding soft constraints problem files

* Attempt at a complete MVP domain model

* Oops, remove redundant effect

* Simplified collision checking predicate

* In a working state

* Add sample_output_plan.txt

* Oops, remove obsolete commented-out code

* Fixed stereo survey part of the model based on analysis of old stereo surveys by Marina - unfortunately causes additional planner flakiness

* Update sample_output_plan.txt to reflect latest domain/problem

* Now generate PDDL problem from higher-level problem specification

* Tune panorama estimated duration

* Add plan_interpreter.py. Minor cleanup in problem_generator.py

* Simplify dynamic config just a bit

* Add `survey_manager` subdirectory without layout for survey nodes

Includes placeholder directories with hyperlinked `readme.md` files in
the documentation hierarchy for the manger, planner, and bridge.

Per discussion with @marinagmoreira `survey_manager` lives under
`astrobee` to signify the code is intended for cross-compilation.

* Improve linking to survey manager docs

* Remove `survey_bridge` capability will be added to `astrobee`

* Add traclabs plansys2 backport via submodule, thanks @ana-GT

* Move sub-modules to `survey_manager` path

* Upgrade behaviortree to V4

NOTE: If already installed, remove V3 before installing V4

* Cleanup unused, misplaced sub-modules, again.

* Remove `survey_manager` package and organize `survey_planner`

* Deprecate Ubuntu-16.04 (xenial) builds of Isaac to support Plansys2

- Remove Ubuntu-16.04 (xenial) CI builds
- Update dockerfile ubuntu version defaults to Ubuntu-20.04 (focal)
- Update apk build environment to Ubuntu-20.04 (focal)

* Fix python formatting

* Update to forks of traclabs backports

* Add readline development files to setup for plansys2 terminal interface

If you have already built your VM, run `sudo apt install libreadline-dev`

* Removed outdated PDDL files per @trey0

#107 (comment)

* Revert CI upgrades for APK builds

* Plansys2 on Astrobee Noetic (#107)

* Add `survey_manager` subdirectory without layout for survey nodes

Includes placeholder directories with hyperlinked `readme.md` files in
the documentation hierarchy for the manger, planner, and bridge.

Per discussion with @marinagmoreira `survey_manager` lives under
`astrobee` to signify the code is intended for cross-compilation.

* Improve linking to survey manager docs

* Add files via upload

Adding planning domain, problem, and xml of the atomic actions of the robotic agents

* added  files to the correct directory

* adding soft constraints problem files

* Attempt at a complete MVP domain model

* Oops, remove redundant effect

* Simplified collision checking predicate

* In a working state

* Add sample_output_plan.txt

* Oops, remove obsolete commented-out code

* Fixed stereo survey part of the model based on analysis of old stereo surveys by Marina - unfortunately causes additional planner flakiness

* Update sample_output_plan.txt to reflect latest domain/problem

* Now generate PDDL problem from higher-level problem specification

* Tune panorama estimated duration

* Add plan_interpreter.py. Minor cleanup in problem_generator.py

* Simplify dynamic config just a bit

* Add `survey_manager` subdirectory without layout for survey nodes

Includes placeholder directories with hyperlinked `readme.md` files in
the documentation hierarchy for the manger, planner, and bridge.

Per discussion with @marinagmoreira `survey_manager` lives under
`astrobee` to signify the code is intended for cross-compilation.

* Improve linking to survey manager docs

* Remove `survey_bridge` capability will be added to `astrobee`

* Add traclabs plansys2 backport via submodule, thanks @ana-GT

* Move sub-modules to `survey_manager` path

* Upgrade behaviortree to V4

NOTE: If already installed, remove V3 before installing V4

* Cleanup unused, misplaced sub-modules, again.

* Remove `survey_manager` package and organize `survey_planner`

* Deprecate Ubuntu-16.04 (xenial) builds of Isaac to support Plansys2

- Remove Ubuntu-16.04 (xenial) CI builds
- Update dockerfile ubuntu version defaults to Ubuntu-20.04 (focal)
- Update apk build environment to Ubuntu-20.04 (focal)

* Fix python formatting

* Update to forks of traclabs backports

* Add readline development files to setup for plansys2 terminal interface

If you have already built your VM, run `sudo apt install libreadline-dev`

* Removed outdated PDDL files per @trey0

#107 (comment)

* Revert CI upgrades for APK builds

---------

Co-authored-by: Abiola Akanni <[email protected]>
Co-authored-by: Trey Smith <[email protected]>

* Update ci_pr.yml

make survey manager PR's run CI

* problem_generator.py: Simplified config, and runs with default args again

* Removed run number argument from planner actions

* Add support for PlanSys2 terminal output; remove num-orders from config

* Refactor problem_generator.py to more cleanly support two output formats

* plan_interpreter.py works with default arguments again

* Update .isort.cfg using scripts/git/configure_isort_paths.sh

* jem_survey_dynamic.yaml: Remove unused run parameter.

* Fix legacy isort styling error in unrelated file so lint passes

* Remove newlines in PDDL domain predicates to work around [1]

[1] PlanSys2/ros2_planning_system#286

* Setup planner stack for action tests

* Move submodules to avoid nested catkin packages

* Added let-other-robot-reach constraint so we can solve the full problem with POPF/OPTIC

* Fix pylint and mypy complaints

* Add `popf` package and remove vendored solver in favor of built binary

* Update plansys2 backport to fix domain validation and parameters

* Make predicates on one line.

* Update vendored libraries for cross compilation

* making submodules their own folder for organization

* updating submodule + fix bug in cmake

* only check isort files that were modified

* src dir doesn't exist anymore and usually not in include

* fix gitmodules link

* fixing PR CI

---------

Co-authored-by: Abiola Akanni <[email protected]>
Co-authored-by: Trey Smith <[email protected]>
Co-authored-by: Marina Moreira <[email protected]>
Co-authored-by: Brian Coltin <[email protected]>
Co-authored-by: Marina Moreira <[email protected]>
  • Loading branch information
6 people authored Jan 5, 2024
1 parent 7c0ea09 commit c5a1c22
Show file tree
Hide file tree
Showing 14 changed files with 176 additions and 33 deletions.
15 changes: 10 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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

1 change: 1 addition & 0 deletions astrobee/survey_manager/survey_dependencies/popf
Submodule popf added at 13b2a5
38 changes: 38 additions & 0 deletions astrobee/survey_manager/survey_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
43 changes: 43 additions & 0 deletions astrobee/survey_manager/survey_planner/launch/survey_domain.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0"?>
<launch>

<!-- arguments -->
<arg name="model_file" default="$(find survey_planner)/pddl/domain_survey.pddl"/>
<arg name="namespace" default="" />
<arg name="params_file" default="$(find plansys2_bringup)/params/plansys2_params.yaml" />

<!-- true: There is a lifecycle management node for the Lifecycles nodes. If false, the nodes start on their own -->
<param name="lifecycle_enabled" value="true"/>

<!-- Domain Expert -->
<include file="$(find plansys2_domain_expert)/launch/domain_expert.launch">
<arg name="model_file" value="$(arg model_file)"/>
<arg name="namespace" value="$(arg namespace)"/>
<arg name="params_file" value="$(arg params_file)"/>
</include>

<!-- Problem Expert -->
<include file="$(find plansys2_problem_expert)/launch/problem_expert.launch">
<arg name="model_file" value="$(arg model_file)"/>
<arg name="namespace" value="$(arg namespace)"/>
<arg name="params_file" value="$(arg params_file)"/>
</include>

<!-- Planner -->
<include file="$(find plansys2_planner)/launch/planner.launch">
<arg name="namespace" value="$(arg namespace)"/>
<arg name="params_file" value="$(arg params_file)"/>
</include>

<!-- Executor -->
<include file="$(find plansys2_executor)/launch/executor.launch">
<arg name="namespace" value="$(arg namespace)"/>
<arg name="params_file" value="$(arg params_file)"/>
</include>

<!-- Manager -->
<node name="lifecycle_manager_node" pkg="plansys2_lifecycle_manager" type="lifecycle_manager_node" output="screen">
</node>

</launch>

34 changes: 34 additions & 0 deletions astrobee/survey_manager/survey_planner/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<package format="2">
<name>survey_planner</name>
<version>0.1.0</version>
<description>PDDL Planning via Plansys2 on ROS1 Noetic for Astrobee</description>
<license>
Apache License, Version 2.0
</license>
<author email="[email protected]">
ISAAC Flight Software
</author>
<maintainer email="[email protected]">
ISAAC Flight Software
</maintainer>

<buildtool_depend>catkin</buildtool_depend>

<depend>roscpp</depend>
<depend>std_srvs</depend>
<depend>lifecycle_msgs</depend>

<depend>plansys2_domain_expert</depend>
<depend>plansys2_problem_expert</depend>
<depend>plansys2_executor</depend>
<depend>plansys2_planner</depend>
<depend>plansys2_msgs</depend>
<depend>tf</depend>

<depend>ff_msgs</depend>

<export>
<nodelet plugin="${prefix}/nodelet_plugins.xml" />
</export>
</package>
5 changes: 3 additions & 2 deletions scripts/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
10 changes: 0 additions & 10 deletions scripts/docker/docker_compose/astrobee.docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 28 additions & 0 deletions scripts/docker/docker_compose/isaac.docker-compose.build.yml
Original file line number Diff line number Diff line change
@@ -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



Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions scripts/docker/isaac_astrobee.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/git/pre-commit.linter_python
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 7 additions & 2 deletions scripts/setup/packages_focal.lst
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c5a1c22

Please sign in to comment.