Repo symbol

merlin2 repository

robotics ros2 cognitive-architecture
Repo symbol

merlin2 repository

robotics ros2 cognitive-architecture
Repo symbol

merlin2 repository

robotics ros2 cognitive-architecture
Repo symbol

merlin2 repository

robotics ros2 cognitive-architecture

Repository Summary

Description MERLIN 2 (MachinEd Ros 2 pLanINg) for ROS 2
Checkout URI https://github.com/merlin2-arch/merlin2.git
VCS Type git
VCS Version main
Last Updated 2025-05-02
Dev Status UNKNOWN
Released UNRELEASED
Tags robotics ros2 cognitive-architecture
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

README

MERLIN 2 (MachinEd Ros pLanINg)

Table of Contents

Diagram

PDDL Planners

Installation

# clone these repos
cd ~/ros2_ws/src
git clone --recurse-submodules https://github.com/MERLIN2-ARCH/merlin2.git
cd merlin2

# SMTPlan+ dependencies
sudo apt install libz3-dev -y

# unified-planning
pip3 install --pre unified-planning[pyperplan,tamer]

# MongoDB
sudo ./scrips/install_mongo.sh
sudo ./scrips/install_mongocxx.sh

# sst
sudo apt-get install -y python3-dev libportaudio2 libportaudiocpp0 portaudio19-dev libasound-dev swig

# tts
sudo apt install espeak -y
sudo apt install speech-dispatcher -y
sudo apt install festival festival-doc festvox-kdlpc16k festvox-ellpc11k festvox-italp16k festvox-itapc16k -y
sudo apt install mpg321 -y

# pip3
pip3 install -r requirements.txt
python3 merlin2_arch/merlin2_reactive_layer/speech_to_text/nltk_download.py

# colcon
cd ~/ros2_ws
colcon build

Creating new actions

The creation of a new action is presented in this section. This way, navigation action is presented in PDDL, MERLIN2 and MERLIN2 state machine.

PDDL Example

This PDDL example shows a durative action that moves a robot from an origin (o) to a destination (d). It has two parameters o and d of type wp (waypoint), one condition, which is that the robot has to be at the origin, and two effects, which are that the robot is not at the origin but is at the destination.

(:durative-action navigation
  :parameters (?o ?d - wp)
  :duration (= ?duration 10)
  :condition (and
    (at start (robot_at ?o))
  )
  :effect (and
    (at start (not (robot_at ?o)))
    (at end (robot_at ?d))
  )
)

MERLIN2 Example

This example presents the same PDDL durative action as the previous PDDL version but using MERLIN2. There are 5 methods to override:

  • run_action: this callback is used to execute the code of the action.
  • cancel_action: this callback is used to cancel the action execution.

File truncated at 100 lines see the full file

Repo symbol

merlin2 repository

robotics ros2 cognitive-architecture
Repo symbol

merlin2 repository

robotics ros2 cognitive-architecture
Repo symbol

merlin2 repository

robotics ros2 cognitive-architecture
Repo symbol

merlin2 repository

robotics ros2 cognitive-architecture