Skip to content

Commit

Permalink
more logs for planning
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Jul 13, 2024
1 parent 91f505e commit 57ac8d1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
""" Merlin2 Executor Node """


import time
import rclpy

from kant_dao import ParameterLoader
Expand Down Expand Up @@ -89,6 +90,7 @@ def __execute_server(self, goal_handle):

blackboard = Blackboard()
blackboard["result"] = result
blackboard["init_time"] = time.time()

outcome = self(blackboard)

Expand All @@ -110,11 +112,8 @@ def __execute_server(self, goal_handle):

def main():
rclpy.init()

node = Merlin2ExecutorNode()

node.join_spin()

rclpy.shutdown()


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

""" Generate PDDL State """

import time
from simple_node import Node
from yasmin.blackboard import Blackboard
from yasmin_ros import ServiceState
Expand All @@ -39,10 +40,14 @@ def create_request_handler(self, blackboard: Blackboard) -> GeneratePddl.Request
def response_handler(self, blackboard: Blackboard, response: GeneratePddl.Response) -> str:
blackboard["domain"] = response.domain
blackboard["problem"] = response.problem
blackboard["result"].generate_pddl = True

elapsed_time = time.time() - blackboard["init_time"]

self._node.get_logger().info(response.domain)
self._node.get_logger().info(response.problem)

blackboard["result"].generate_pddl = True
self._node.get_logger().info(
f"Time from receiving goals to planning: {elapsed_time} seconds")

return SUCCEED
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,8 @@ def __generate_pddl_srv(self,

def main():
rclpy.init()

node = Merlin2PddlGeneratorNode()

node.join_spin()

rclpy.shutdown()


Expand Down

0 comments on commit 57ac8d1

Please sign in to comment.