Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
log
build
install
**/__pycache__
49 changes: 49 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# eplansys on ROS 2 Humble, with the two-site survey as its default command.
#
# docker build -t eplansys .
# docker run --rm eplansys
# docker run --rm eplansys ros2 launch eplansys_demo survey_sites_launch.py north:=clean parallel:=true
#
# The planner (del-planner) and the grounder (plank) are built from the commits
# dependency_repos.repos pins, so the image plans exactly as the release does.

FROM ros:humble

SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive

# libfl-dev is popf's and libboost-filesystem-dev is plank's; neither project
# has a rosdep key that would bring them in.
RUN apt-get update && apt-get install -y --no-install-recommends \
libfl-dev libboost-filesystem-dev python3-vcstool ros-humble-behaviortree-cpp \
&& rm -rf /var/lib/apt/lists/*

# behaviortree_cpp 4.9.1 installs its library under lib/x86_64-linux-gnu while
# its exported CMake check looks in lib/ alone; see epistemic-humble.yaml.
RUN if [ -f /opt/ros/humble/lib/x86_64-linux-gnu/libbehaviortree_cpp.so ] && \
[ ! -e /opt/ros/humble/lib/libbehaviortree_cpp.so ]; then \
ln -s x86_64-linux-gnu/libbehaviortree_cpp.so /opt/ros/humble/lib/libbehaviortree_cpp.so; \
fi

WORKDIR /eplansys_ws

# Dependencies first, so that a change to eplansys does not fetch them again.
COPY dependency_repos.repos /tmp/dependency_repos.repos
RUN mkdir -p src && vcs import src < /tmp/dependency_repos.repos

COPY . src/eplansys

RUN apt-get update && rosdep update --rosdistro humble \
&& rosdep install --from-paths src --ignore-src -y --rosdistro humble --skip-keys plank \
&& rm -rf /var/lib/apt/lists/*

# plank is named because nothing declares a build dependency on it: the
# grounder runs it as a subprocess and finds it on PATH.
RUN source /opt/ros/humble/setup.bash \
&& colcon build --packages-up-to eplansys_demo plank \
--cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF \
&& rm -rf build log

COPY docker/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["ros2", "launch", "eplansys_demo", "survey_sites_launch.py"]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ into the Kripke model the planner searches over is done by
Alessandro Burigana and Francesco Fabiano, which `plansys2_epddl_grounder`
builds and runs for you.

## Trying it

The image builds the workspace on ROS 2 Humble, with the planner and the
grounder at the commits this release pins, and runs the two-site survey: two
scouts, two sites, and a policy that branches on what each one finds.

```bash
docker build -t eplansys .
docker run --rm eplansys
docker run --rm eplansys ros2 launch eplansys_demo survey_sites_launch.py north:=clean parallel:=true
```

The mission prints its elapsed time and exits when the goal holds.

We want to invite you to contribute to this Open Source project!

**Documentation: [eplansys.github.io/eplansys](https://eplansys.github.io/eplansys)**
Expand Down
6 changes: 6 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
# Source the distribution and the workspace, then run what was asked.
set -e
source /opt/ros/humble/setup.bash
source /eplansys_ws/install/setup.bash
exec "$@"
Loading