Class ProblemExpertNode
Defined in File ProblemExpertNode.hpp
Inheritance Relationships
Base Type
public rclcpp_lifecycle::LifecycleNode
Class Documentation
-
class ProblemExpertNode : public rclcpp_lifecycle::LifecycleNode
ROS 2 Lifecycle node that manages the PDDL problem representation and operations.
This node provides services to add, remove, and query PDDL problem elements such as instances, predicates, functions, and goals. It also publishes the problem state and change notifications.
Public Types
-
using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn
Public Functions
-
explicit ProblemExpertNode(const rclcpp::NodeOptions &options = rclcpp::NodeOptions())
Constructor for the ProblemExpertNode.
Initializes the node, declares parameters, and creates service servers and publishers.
-
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.
-
plansys2_msgs::msg::Knowledge::SharedPtr get_knowledge_as_msg() const
Converts the current problem knowledge to a message.
- Returns:
plansys2_msgs::msg::Knowledge::SharedPtr The knowledge message containing the current problem state, including instances, predicates, functions, and goal.
Service callback to add a PDDL problem.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the PDDL problem string.
response – [out] Service response with success status and error information.
Service callback to add a problem goal.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the goal as a Tree.
response – [out] Service response with success status and error information.
Service callback to add a problem instance.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the instance parameter.
response – [out] Service response with success status and error information.
Service callback to add a problem predicate.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the predicate node.
response – [out] Service response with success status and error information.
Service callback to add a problem function.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the function node.
response – [out] Service response with success status and error information.
Service callback to get the problem goal.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Empty service request.
response – [out] Service response containing the goal tree and success status.
Service callback to get details about a specific problem instance.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the instance name.
response – [out] Service response with instance details and success status.
Service callback to get all problem instances.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Empty service request.
response – [out] Service response containing the list of instances and success status.
Service callback to get details about a specific problem predicate.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the predicate expression.
response – [out] Service response with predicate details and success status.
Service callback to get all problem predicates.
- 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.
Service callback to get details about a specific problem function.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the function expression.
response – [out] Service response with function details and success status.
Service callback to get all problem functions.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Empty service request.
response – [out] Service response containing the list of states.
Service callback to get the full PDDL problem.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Empty service request.
response – [out] Service response containing the problem.
Service callback to check if a problem goal is satisfied.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the goal tree to check.
response – [out] Service response with satisfaction status.
Service callback to remove the problem goal.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Empty service request.
response – [out] Service response with success status and error information.
Service callback to clear all problem knowledge.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Empty service request.
response – [out] Service response with success status and error information.
Service callback to remove a problem instance.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the instance parameter to remove.
response – [out] Service response with success status and error information.
Service callback to remove a problem predicate.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the predicate node to remove.
response – [out] Service response with success status and error information.
Service callback to remove a problem function.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the function node to remove.
response – [out] Service response with success status and error information.
Service callback to check if a predicate exists in the problem.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the predicate node to check.
response – [out] Service response with existence status.
Service callback to check if a function exists in the problem.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the function node to check.
response – [out] Service response with existence status.
Service callback to update a problem function’s value.
- Parameters:
request_header – [in] ROS service request header.
request – [in] Service request containing the function node with updated value.
response – [out] Service response with success status and error information.
-
using CallbackReturnT = rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn