- Overview
- What is PDDL?
- What is Plansys2?
- Behavior-trees
- Map
- Objects-Organized
- Grandma Priorities
- Domain
- Problem
- What-is-necessary-to-launch
- Videos
- License
We have executed one of the plans generated in the task handled before. In this ocassion we have created a problem similar to the ones of the task handled before. Moreover, he have obtained Tigao navigating through our custom map.
Planning Domain Definition Language (PDDL) is a family of languages which allow us to define a planning problem. As planning has evolved, so to has the language used to describe it and as such there are now many versions of PDDL available.
In our case, we define a set of objects which have predicate properties (properties which are either true or false). Therefore, we define a set of actions which condition on, and then change these properties. We use logic expressions such as: and, or, not and we have introduced two key elements. Besides, we use time and numbers. We have learnt up to PDDL 2.1 version.
ROS2 Planning System (plansys2 in short) is a project whose objective is to provide Robotics developers with a reliable, simple, and efficient PDDL-based planning system. It is implemented in ROS2, applying the latest concepts developed in this currently de-facto standard in Robotics.
PlanSys2 has a modular design. It is basically composed of 4 nodes:
- Domain Expert: Contains the PDDL model information (types, predicates, functions, and actions).
- Problem Expert: Contains the current instances, predicates, functions, and goals that compose the model.
- Planner: Generates plans (sequence of actions) using the information contained in the Domain and Problem Experts.
- Executor: Takes a plan and executes it by activating the action performers (the ROS2 nodes that implement each action).
Each of these nodes exposes its functionality using ROS2 services. Even so, in PlanSys2 are created a client library that can be used in any application and hides the complexity of using ROS2 services.
For more information visit the Resource Information.
Behaviour tree is a mathematical model of plan execution. They have probed more flexible and suitable that state machines for defining robots' simple behaviours. This task uses Behavior Trees to execute all plans.
Here you can see the map we have used for handling this exercise:
For this task is a requirement to make the robot move using navigation and so, we have created a custom map which is similar to the image above. This is how it looks like:
You should follow these steps:
Signpost Map
These are the objects that must be organized:
- Towels: bathroom
- Cutlery: kitchen
- Tools: garage
- Clothes: grandma bedroom
- Plants: yard
- Magazines: living room
Anything that grandma asks for, must have a higher priority than the other tasks. These are the high-priority tasks:
- Close/Open main door.
- Bring her a cup of milk from the kitchen.
- Bring her pills from the living room.
- Make bed from the guest's room.
(robot_at ?r - robot ?l - location) - states where the robot is
(robot_free ?r - robot) - states that the robot isn't carrying anything.
(robot_carrying ?r - robot ?o - item) - states that the robot is carrying an item.
(grandma_at ?g - grandma ?l - location) - states where grandma is
(grandma_wants ?i - item) - states that grandma wants the robot to bring her an item.
(grandma_has_item) - states that grandma has all the desired items.
(grandma_req_open_door ?g - grandma ?d - door) - states that grandma wants the robot to open a door for her.
(grandma_get_open_door) - states that grandma requires no more doors to be opened.
(no_grandma_chores) - states that grandma has no more requests.
(item_at ?o - item ?l - location) - states where an item is.
(item_should_be ?i - item ?l - location) - states where an item should be in order to be considered organized.
(item_organized ?i - item) - states that an item is considered organized.
(item_disorganized ?i - item) - states that an item is considered disorganized.
(connected_door ?l1 ?l2 - location ?d - door) - states that two locations are connected by a door
(connected ?l1 ?l2 - location) - states that two locations are connected (without door).
(open ?d - door) - states that a door is opened.
(close ?d - door) - states that a door is closed.
All actions are durative-actions. The main actions are:
If no_grandma_chroes is true, move a disorganized item to where it should be and mark it as organized. By setting no_grandma_chores as a condition, we can assure that the robot will only organize an item when grandma has no more requests for it. organize-item is a "low-priority" action.
Brings the requested item to grandma. Sets grandma_has_item as true and grandma_wants as false.
Opens the requested door for grandma. Sets grandma_req_open_door as false and grandma_get_open_door as true.
If both grandma_get_open_door and grandma_has_item are true, sets no_grandma_chores as true. Stating that grandma has no more requests for the robot and it can start working on the low-priority requests.
Set problem defined
Heare we have the simulated navigation, to launch this we need:
ros2 run plansys2_bt_lp nav2_sim_node
ros2 launch plansys2_bt_lp plansys2_bt_grandma_launch
ros2 run plansys2_bt_lp grandma_controller_node
Screencast.from.04-26-2023.12_48_22.AM.webm
For this result we need to launch:
ros2 launch ir_robtots simulation.launch.py
ros2 launch br2_navigation tiago_navigation.launch.py
ros2 launch plansys2_bt_lp plansys2_bt_grandma_launch
ros2 run plansys2_bt_lp grandma_controller_node
Grabacion.de.pantalla.desde.04-26-2023.02_24_23.AM.webm
The code and documentation in this project are released under the Apache 2 license.