Build and Install
Releases and distributions
PlanSys2 4.0.0 is the same version for Humble, Jazzy, Kilted and Lyrical: the same features and the same code in every distribution. It brings Kairos as the default planner, the execution of everything Kairos plans (conditional effects, timed literals, PDDL+, constraints…) and the execution trace. The earlier releases are documented in version 3.1.0 of this site (version selector, bottom left).
Install the binaries
Install ROS 2 as described in the official documentation.
Install PlanSys2:
sudo apt install 'ros-<distro>-plansys2-*'
Note
4.0.0 reaches the binaries of each distribution with its next sync: until then, apt
installs the previous release. To use 4.0.0 now, build it from source as the next
section explains, with the <distro>-devel branch of PlanSys2 and the <distro> branch
of the examples.
Build from source
PlanSys2 needs some packages that every distribution has as binaries, and that a source build of
rolling builds with it:
Kairos, the default planner.
cascade_lifecycle and popf (one version for every distribution, as PlanSys2).
Each repository lists them in dependency_repos.repos; vcs clones them:
sudo apt install python3-vcstool
mkdir -p ~/plansys2_ws/src
cd ~/plansys2_ws/src
git clone -b rolling https://github.com/PlanSys2/ros2_planning_system.git
vcs import < ros2_planning_system/dependency_repos.repos
# The examples, optional
git clone -b rolling https://github.com/PlanSys2/ros2_planning_system_examples.git
vcs import --skip-existing < ros2_planning_system_examples/dependency_repos.repos
cd ~/plansys2_ws
rosdep install -y -r -q --from-paths src --ignore-src
colcon build --symlink-install
For a released distribution, use
<distro>-develinstead ofrollingfor PlanSys2 (for instancejazzy-devel) and<distro>for the examples (for instancejazzy).The examples’
dependency_repos.reposalso lists PlanSys2 itself:--skip-existingkeeps the one cloned above.
Choosing the middleware
PlanSys2 works with any ROS 2 middleware (RMW), but we recommend Zenoh, the one we develop and
test PlanSys2 with; Cyclone DDS works as well. Our stress tests start PlanSys2, its performers and the
controller of each example in every order (all at once, the controller first, PlanSys2 minutes
later…), three times each. With Zenoh and Cyclone DDS they never failed. With Fast DDS, the
default RMW of ROS 2, some runs lost messages while everything was starting: the server side
gives up a response it cannot deliver (failed to send response ... client will not receive
response). PlanSys2 sends such requests again, but the processes of an application (a navigation
performer and its navigation stack, for instance) may not.
RMW |
Runs that ended well |
|---|---|
Zenoh |
57 of 57 |
Cyclone DDS |
57 of 57 |
Fast DDS |
45 of 57 |
To use Zenoh, which also needs its router running (once per machine):
sudo apt install ros-<distro>-rmw-zenoh-cpp
export RMW_IMPLEMENTATION=rmw_zenoh_cpp
ros2 run rmw_zenoh_cpp rmw_zenohd
To use Cyclone DDS:
sudo apt install ros-<distro>-rmw-cyclonedds-cpp
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
All the processes (PlanSys2, the performers, the controller) must use the same RMW.
If you stay with Fast DDS: processes killed with kill -9 or crashed leave shared memory
segments behind in /dev/shm, and later processes may send to them and lose messages.
fastdds shm clean removes them.
Optional planners
TFD is another plan solver plugin.
Install TFD first, as its repository explains, then clone the plugin into the workspace (it
has the branches rolling, lyrical and humble):
cd ~/plansys2_ws/src
git clone -b rolling https://github.com/PlanSys2/plansys2_tfd_plan_solver.git
See Plugins to choose the planners PlanSys2 uses.