Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flexbe hfsmbth demo #51

Closed
wants to merge 55 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
dfd22d0
markdown linter
ct2034 Jul 4, 2024
d692107
workflows
ct2034 Jul 4, 2024
9f96a99
args
ct2034 Jul 4, 2024
162b87e
readme fixes
ct2034 Jul 4, 2024
1f122cc
draft of problems
ct2034 Jul 4, 2024
50cef9d
linter
ct2034 Jul 4, 2024
66d56aa
newlines
ct2034 Jul 4, 2024
54973ce
changes from meeting
ct2034 Jul 9, 2024
4e535f7
Merge pull request #2 from ros-wg-delib/add/problem_defs
ct2034 Jul 10, 2024
a55ccaa
Merge branch 'main' into add/problem_1
ct2034 Jul 10, 2024
100cdd2
right folder
ct2034 Jul 10, 2024
71ea739
simplifying model data
ct2034 Jul 14, 2024
754408b
remove unused import
ct2034 Jul 14, 2024
f82ed8e
docstring
ct2034 Jul 14, 2024
e88c774
license file on repo level
ct2034 Jul 14, 2024
94d335c
Merge pull request #3 from ros-wg-delib/add/problem_1
ct2034 Jul 14, 2024
efc240d
Update docker setup to use workshop files correctly (#5)
sea-bass Aug 15, 2024
c06bf4b
All problems and some python solutions (#6)
ct2034 Aug 18, 2024
cbb1bc8
Manage external dependencies with submodules, reuse colcon build arti…
sea-bass Aug 20, 2024
e2c9b5b
Add ros_bt_py with dependencies. (#9)
Oberacda Aug 20, 2024
e13b18b
Update to pyrobosim 3.0.0 (#14)
sea-bass Aug 27, 2024
2b60c18
Adds SkiROS2 skill repo (#10)
matthias-mayr Aug 29, 2024
47eca62
Simplify Python packages (#18)
sea-bass Sep 2, 2024
00e6bde
Create new home robot worlds (#19)
sea-bass Sep 2, 2024
17c8349
Reorganize repository structure (#20)
sea-bass Sep 5, 2024
1d93c1b
add beta of flexbe behaviors (#21)
dcconner Sep 5, 2024
7d075b1
update fastapi requirements (#23)
dcconner Sep 6, 2024
41ac382
Preliminary integration of BTCPP (#25)
facontidavide Sep 7, 2024
a3d0b6b
Actually add BehaviorTree.ROS submodule (#31)
sea-bass Sep 8, 2024
1ae23ed
Update pyrobosim submodule (#32)
sea-bass Sep 8, 2024
1071108
New: SkiROS2 knowledge modeling and problem 1 update (#34)
matthias-mayr Sep 8, 2024
8962ed7
New: Adds convenience functions and python warning suppression (#27)
matthias-mayr Sep 8, 2024
004a3cf
update flexbe_webui
Sep 9, 2024
0964684
update flexbe_webui target
Sep 10, 2024
eb9e2a5
Add nondefault navigation poses to dining room (#38)
sea-bass Sep 12, 2024
b0c4db8
Tune RRT parameters (#26)
sea-bass Sep 12, 2024
b15268f
Install Groot2 inside container (#39)
sea-bass Sep 14, 2024
801281e
Update pyrobosim submodule
sea-bass Sep 15, 2024
fed0b50
Update pyrobosim submodule to include reset UI button
sea-bass Sep 17, 2024
e5ddb08
Install gdb, nano, and RQT service caller in Docker image (#42)
sea-bass Sep 18, 2024
4da3add
Update: Newer commit hashes for SkiROS2 & skiros2_pyrobosim_lib (#43)
matthias-mayr Sep 19, 2024
f335fe8
Adding convince toolchain to docker and a small example to technologi…
ct2034 Sep 23, 2024
a83aabd
Temporary fix for conflicting matplotlib apt and pip installs
sea-bass Sep 24, 2024
812d674
Update PyRoboSim
sea-bass Sep 26, 2024
47991f8
Flexbe update (#49)
dcconner Sep 27, 2024
f0aca0d
Set ROS_LOCALHOST_ONLY and do not run entrypoint twice on container s…
sea-bass Oct 1, 2024
a56fe18
merged PR #41 to allow testing of ros_bt_py
Oct 3, 2024
a33eaeb
merge PR #40 with additional change to CMakeLists.txt to export inclu…
Oct 3, 2024
981ef5a
update flexbe_webui target to handle customizable license
Oct 3, 2024
3d3a8f0
modify to use BSD-3 clause license; add run_btcpp_tree_state and pyro…
Oct 3, 2024
d36cd86
add tic_count_; fix on_exit message; clean up
Oct 3, 2024
5b4ded8
adding more actions to BTCPP executor (#40)
facontidavide Oct 3, 2024
c376024
Merge branch 'main' into flexbe-hfsmbth
Oct 3, 2024
02432e0
update for latest BT.cpp technology changes
Oct 3, 2024
7614ce1
add more HFSMBTH info for BT.cpp, including groot2 use
Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
60 changes: 60 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Dockerfile for ROSCon 2024 Deliberation Workshop

FROM ros:jazzy-ros-base AS roscon_delib_ws_2024
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install apt dependencies.
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
apt-utils curl fuse3 libfuse2 gdb nano \
libegl1 libgl1-mesa-dev libglu1-mesa-dev '^libxcb.*-dev' libx11-xcb-dev \
libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libxrender-dev \
libnss3 libasound2t64 libxkbfile1 \
python3-pip python3-tk python3-wrapt python3-inflection \
ros-jazzy-rqt-service-caller

# Create a ROS 2 workspace.
RUN mkdir -p /delib_ws/src/
WORKDIR /delib_ws

# Install external dependencies.
# Groot2 for BehaviorTree.CPP
RUN curl -o Groot2.AppImage https://s3.us-west-1.amazonaws.com/download.behaviortree.dev/groot2_linux_installer/Groot2-v1.6.1-x86_64.AppImage && \
chmod a+x Groot2.AppImage && \
groupadd fuse && \
usermod -aG fuse root
# Aggregated Python dependencies
COPY python-requirements.txt /delib_ws
RUN pip3 install --break-system-packages -r python-requirements.txt
COPY dependencies src/dependencies
RUN source /opt/ros/jazzy/setup.bash && \
rosdep install --from-paths src -y --ignore-src
# SkiROS2 dependencies
RUN src/dependencies/SkiROS2/skiros2/skiros2/scripts/install_fd_task_planner.sh
# Convince toolchain
# (smc_storm)
RUN curl -O -L https://github.com/convince-project/smc_storm/releases/download/0.0.3/smc_storm_executable.tar.gz && \
tar -xzf smc_storm_executable.tar.gz && \
./install.sh --install-dependencies && \
ln -s /delib_ws/bin/smc_storm /usr/local/bin/smc_storm
# (AS2FM)
RUN cd src/dependencies/convince/AS2FM && \
pip3 install --break-system-packages as2fm_common/. && \
pip3 install --break-system-packages jani_generator/. && \
pip3 install --break-system-packages scxml_converter/. && \
pip3 uninstall -y --break-system-packages js2py && \
pip3 install --break-system-packages git+https://github.com/felixonmars/[email protected] # Temporary fix for js2py && \
pip3 uninstall -y --break-system-packages matplotlib # Temporary fix for MatPlotLib conflict

# Remove MatPlotLib display warnings.
RUN mkdir /tmp/runtime-root
ENV XDG_RUNTIME_DIR "/tmp/runtime-root"
RUN chmod -R 0700 /tmp/runtime-root
ENV NO_AT_BRIDGE 1

# Set up the entrypoint.
CMD /bin/bash
COPY .docker/entrypoint.sh /entrypoint.sh
RUN echo "source /entrypoint.sh" >> ~/.bashrc
73 changes: 73 additions & 0 deletions .docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/bin/bash

# Source ROS and the deliberation workspace.
source /opt/ros/jazzy/setup.bash

# Ignores additional output because of deprecated Python tooling in ament_python
export PYTHONWARNINGS="ignore:setup.py install is deprecated,ignore:easy_install command is deprecated"

export ROS_WS=/delib_ws
export WORKSPACE_ROOT=$ROS_WS # For FlexBE compatibility

function print_ros_variables () {
echo -e "ROS Distro: \t" $ROS_DISTRO
echo -e "ROS Domain ID: \t" $ROS_DOMAIN_ID
echo -e "ROS Workspace: \t" $ROS_WS
}
print_ros_variables

# Convenience functions
alias delib_src='cd $ROS_WS/src'
alias delib_ws='cd $ROS_WS'
# TODO(matthias-mayr): This ignored package is still being ported.
function delib_build() {
cwd=$(pwd)
delib_ws
colcon build --symlink-install --continue-on-error --packages-ignore skiros2_task
cd $cwd
}

function delib_build_packages() {
cwd=$(pwd)
delib_ws
colcon build --symlink-install --continue-on-error --packages-ignore skiros2_task --packages-select "$@"
cd $cwd
}

function delib_build_packages_up_to() {
cwd=$(pwd)
delib_ws
colcon build --symlink-install --continue-on-error --packages-ignore skiros2_task --packages-up-to "$@"
cd $cwd
}

function delib_clean () {
cwd=$(pwd)
delib_ws
local _ret=$?
if [ $_ret -ne 0 ] ; then
echo "Could not switch dirs. Aborting delib_clean"
return $_ret
fi
rm -r build/*
rm -r install/*
rm -r log/*
cd $cwd
}

# Use this to switch to software rendering to avoid
# conflicts with GPU and docker
function qt_soft_render() {
export QT_QUICK_BACKEND=software
echo "Using $QT_QUICK_BACKEND for QT rendering"
}

# Automatic build when entering the container
if [ ! -f $ROS_WS/install/setup.bash ]
then
delib_build
fi
source $ROS_WS/install/setup.bash

# Execute the command passed into this entrypoint.
exec "$@"
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.colcon/
.github/

.gitignore
.gitmodules
.pre-commit-config.yaml

docker-compose.yaml
LICENSE
README.md
15 changes: 0 additions & 15 deletions .github/format.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/ros_test.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
md-lint:
name: Lint README.md
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Lint markdown files
uses: avto-dev/[email protected]
with:
args: README.md

pre-commit:
name: Run pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
31 changes: 31 additions & 0 deletions .github/workflows/ros_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test
on:
pull_request:
push:
branches:
- main
schedule:
# Run every week at 20:00 on Sunday
- cron: "0 20 * * 0"

jobs:
build_and_test:
name: Build and test
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build and start docker
uses: hoverkraft-tech/[email protected]
with:
compose-file: ./docker-compose.yaml
services: base
# TODO: Add the following steps
# - name: Run tests
# run: |
# docker compose exec base colcon build
# docker compose exec base colcon test
# docker compose exec base colcon test-result
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
__pycache__/
.colcon/
.vscode
/build/*
/install/*
/log/*
42 changes: 42 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[submodule "pyrobosim"]
path = dependencies/pyrobosim
url = https://github.com/sea-bass/pyrobosim.git
branch = main
[submodule "skiros2"]
path = dependencies/SkiROS2/skiros2
url = https://github.com/RVMI/skiros2
branch = fix/ros2_jazzy_build
[submodule "skiros2_std_lib"]
path = dependencies/SkiROS2/skiros2_std_lib
url = https://github.com/RVMI/skiros2_std_lib
branch = ros2
[submodule "ros2_ros_bt_py"]
path = dependencies/ros_bt_py/ros2_ros_bt_py
url = https://github.com/fzi-forschungszentrum-informatik/ros2_ros_bt_py.git
branch = dev
[submodule "rosbridge_suite"]
path = dependencies/ros_bt_py/rosbridge_suite
url = https://github.com/RobotWebTools/rosbridge_suite.git
branch = ros2
[submodule "skiros2_pyrobosim_lib"]
path = technologies/SkiROS2/skiros2_pyrobosim_lib
url = https://github.com/matthias-mayr/skiros2_pyrobosim_lib.git
branch = main
[submodule "flexbe_behavior_engine"]
path = dependencies/FlexBE/flexbe_behavior_engine
url = https://github.com/FlexBE/flexbe_behavior_engine.git
branch = ros2-devel
[submodule "flexbe_webui"]
path = dependencies/FlexBE/flexbe_webui
url = https://github.com/FlexBE/flexbe_webui.git
branch = main
[submodule "BehaviorTree.ROS2"]
path = dependencies/BehaviorTree.ROS2
url = https://github.com/BehaviorTree/BehaviorTree.ROS2.git
branch = humble
[submodule "dependencies/convince/AS2FM"]
path = dependencies/convince/AS2FM
url = https://github.com/convince-project/AS2FM.git
[submodule "dependencies/convince/bt_tools"]
path = dependencies/convince/bt_tools
url = https://github.com/boschresearch/bt_tools.git
15 changes: 13 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ repos:

# Autoformats Python code.
- repo: https://github.com/psf/black.git
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
exclude: ^technologies/FlexBE

# Finds spelling issues in code.
- repo: https://github.com/codespell-project/codespell
Expand All @@ -49,7 +50,7 @@ repos:
[
"--no-warnings",
"--config-data",
"{extends: default, rules: {line-length: disable, braces: {max-spaces-inside: 1}}}",
"{extends: default, rules: {line-length: disable, braces: {max-spaces-inside: 1}, indentation: disable}}",
]
types: [text]
files: \.(yml|yaml)$
Expand All @@ -59,3 +60,13 @@ repos:
rev: v3.12.2
hooks:
- id: markdown-link-check

# CPP formatting
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
hooks:
- id: clang-format
types_or: [c++, c]
args: ['-fallback-style=none', '-i']

exclude: '(dependencies|.colcon)/.*'
File renamed without changes.
Loading
Loading