plansys2_support_py.PlannerClient module

PlanSys2 Planner Client.

This module provides specific classes for interacting with PlanSys2 services.

class plansys2_support_py.PlannerClient.PlannerClient(*args: Any, **kwargs: Any)

Bases: Node

Planner client for PlanSys2.

This class provides convenient methods to interact with all Planner services in PlanSys2, wrapping the ROS2 service calls with proper error handling.

get_plan(domain: str, problem: str) plansys2_msgs.msg.Plan | None

Get a plan that will satisfy the provided domain and problem.

Parameters

domainstr

The PDDL domain string.

problemstr

The PDDL problem string.

Returns

Optional[Plan]

The plan response or None if failed.

get_plan_array(domain: str, problem: str) plansys2_msgs.srv.GetPlanArray | None

Get a plan array that will satisfy the provided domain and problem.

Parameters

domainstr

The PDDL domain string.

problemstr

The PDDL problem string.

Returns

Optional[GetPlanArray]

The plan array response or None if failed.

validate_domain(domain: str) bool

Validate the provided domain.

Parameters

domainstr

The PDDL domain string.

Returns

bool

True if the domain is valid, False otherwise.