Class DomainExpertNode

Inheritance Relationships

Base Type

  • public rclcpp_lifecycle::LifecycleNode

Class Documentation

class DomainExpertNode : public rclcpp_lifecycle::LifecycleNode

ROS2 Lifecycle Node that manages the domain model and handles requests from DomainExpertClient.

This node provides services to query and manipulate the planning domain, including actions, predicates, functions, and derived predicates.

Public Types

using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn

Public Functions

explicit DomainExpertNode(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())

Construct a new DomainExpertNode object.

Parameters:

options[in] Node options for configuring the node.

CallbackReturnT on_configure(const rclcpp_lifecycle::State &state)

Configures the node.

Parameters:

state[in] The current lifecycle state.

Returns:

SUCCESS if configuration is successful, FAILURE otherwise.

CallbackReturnT on_activate(const rclcpp_lifecycle::State &state)

Activates the node.

Parameters:

state[in] The current lifecycle state.

Returns:

SUCCESS if activation is successful, FAILURE otherwise.

CallbackReturnT on_deactivate(const rclcpp_lifecycle::State &state)

Deactivates the node.

Parameters:

state[in] The current lifecycle state.

Returns:

SUCCESS if deactivation is successful, FAILURE otherwise.

CallbackReturnT on_cleanup(const rclcpp_lifecycle::State &state)

Cleans up the node.

Parameters:

state[in] The current lifecycle state.

Returns:

SUCCESS if cleanup is successful, FAILURE otherwise.

CallbackReturnT on_shutdown(const rclcpp_lifecycle::State &state)

Shuts down the node.

Parameters:

state[in] The current lifecycle state.

Returns:

SUCCESS if shutdown is successful, FAILURE otherwise.

CallbackReturnT on_error(const rclcpp_lifecycle::State &state)

Handles errors in the node.

Parameters:

state[in] The current lifecycle state.

Returns:

SUCCESS if error handling is successful, FAILURE otherwise.

void get_domain_name_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetDomainName::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetDomainName::Response> response)

Service callback to retrieve the PDDL domain name.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Empty service request.

  • response[out] Service response containing the domain name and success status.

void get_domain_types_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetDomainTypes::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetDomainTypes::Response> response)

Service callback to retrieve all types defined in the domain.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Empty service request.

  • response[out] Service response containing the list of types and success status.

void get_domain_actions_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetDomainActions::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetDomainActions::Response> response)

Service callback to retrieve all non-durative actions in the domain.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Empty service request.

  • response[out] Service response containing the list of actions and success status.

void get_domain_action_details_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetDomainActionDetails::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetDomainActionDetails::Response> response)

Service callback to retrieve details of a specific action.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Service request containing the action name and parameters.

  • response[out] Service response containing the action details and success status.

void get_domain_durative_actions_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetDomainActions::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetDomainActions::Response> response)

Service callback to retrieve all durative actions in the domain.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Empty service request.

  • response[out] Service response containing the list of durative actions and success status.

void get_domain_durative_action_details_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetDomainDurativeActionDetails::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetDomainDurativeActionDetails::Response> response)

Service callback to retrieve details of a specific durative action.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Service request containing the durative action name and parameters.

  • response[out] Service response containing the durative action details and success status.

void get_domain_predicates_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetStates::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetStates::Response> response)

Service callback to retrieve all predicates defined in the domain.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Empty service request.

  • response[out] Service response containing the list of predicates and success status.

void get_domain_predicate_details_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetNodeDetails::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetNodeDetails::Response> response)

Service callback to retrieve details of a specific predicate.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Service request containing the predicate expression.

  • response[out] Service response containing the predicate details and success status.

void get_domain_functions_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetStates::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetStates::Response> response)

Service callback to retrieve all functions defined in the domain.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Empty service request.

  • response[out] Service response containing the list of functions and success status.

void get_domain_function_details_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetNodeDetails::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetNodeDetails::Response> response)

Service callback to retrieve details of a specific function.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Service request containing the function expression.

  • response[out] Service response containing the function details and success status.

void get_domain_derived_predicates_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetDomainDerivedPredicateDetails::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetDomainDerivedPredicateDetails::Response> response)

Service callback to retrieve all derived predicates in the domain.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Empty service request.

  • response[out] Service response containing the list of derived predicates and success status.

void get_domain_derived_predicate_details_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetDomainDerivedPredicateDetails::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetDomainDerivedPredicateDetails::Response> response)

Service callback to retrieve details of a specific derived predicate.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Service request containing the derived predicate name.

  • response[out] Service response containing the predicate rules and success status.

void get_domain_service_callback(const std::shared_ptr<rmw_request_id_t> request_header, const std::shared_ptr<plansys2_msgs::srv::GetDomain::Request> request, const std::shared_ptr<plansys2_msgs::srv::GetDomain::Response> response)

Service callback to retrieve the complete PDDL domain.

Parameters:
  • request_header[in] ROS service request header.

  • request[in] Empty service request.

  • response[out] Service response containing the PDDL domain string and success status.