From c8572be917d7a31d29590a971913b074d35e5adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Gonz=C3=A1lez=20Santamarta?= Date: Sun, 30 Jun 2024 00:17:00 +0200 Subject: [PATCH] README fixed --- README.md | 11 +++++++++-- yasmin_demo/src/action_client_demo.cpp | 9 ++++++++- yasmin_demo/yasmin_demo/action_client_demo.py | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4ca671e..63a6e11 100644 --- a/README.md +++ b/README.md @@ -297,7 +297,7 @@ class FibonacciState(ActionState): self.create_goal_handler, # cb to create the goal None, # outcomes. Includes (SUCCEED, ABORT, CANCEL) self.response_handler, # cb to process the response - self.print_feedback + self.print_feedback # cb to process the feedback ) def create_goal_handler(self, blackboard: Blackboard) -> Fibonacci.Goal: @@ -888,9 +888,16 @@ class FibonacciState : public yasmin_ros::ActionState { public: FibonacciState() : yasmin_ros::ActionState( - "/fibonacci", + + "/fibonacci", // action name + + // # cb to create the goal std::bind(&FibonacciState::create_goal_handler, this, _1), + // # cb to process the response + std::bind(&FibonacciState::response_handler, this, _1, _2), + + // cb to process the feedback std::bind(&FibonacciState::print_feedback, this, _1, _2)){}; Fibonacci::Goal create_goal_handler( diff --git a/yasmin_demo/src/action_client_demo.cpp b/yasmin_demo/src/action_client_demo.cpp index 286f165..37e5c08 100644 --- a/yasmin_demo/src/action_client_demo.cpp +++ b/yasmin_demo/src/action_client_demo.cpp @@ -51,9 +51,16 @@ class FibonacciState : public yasmin_ros::ActionState { public: FibonacciState() : yasmin_ros::ActionState( - "/fibonacci", + + "/fibonacci", // action name + + // # cb to create the goal std::bind(&FibonacciState::create_goal_handler, this, _1), + // # cb to process the response + std::bind(&FibonacciState::response_handler, this, _1, _2), + + // cb to process the feedback std::bind(&FibonacciState::print_feedback, this, _1, _2)){}; Fibonacci::Goal create_goal_handler( diff --git a/yasmin_demo/yasmin_demo/action_client_demo.py b/yasmin_demo/yasmin_demo/action_client_demo.py index 8b7fb63..9e3c870 100755 --- a/yasmin_demo/yasmin_demo/action_client_demo.py +++ b/yasmin_demo/yasmin_demo/action_client_demo.py @@ -34,7 +34,7 @@ def __init__(self) -> None: self.create_goal_handler, # cb to create the goal None, # outcomes. Includes (SUCCEED, ABORT, CANCEL) self.response_handler, # cb to process the response - self.print_feedback + self.print_feedback # cb to process the feedback ) def create_goal_handler(self, blackboard: Blackboard) -> Fibonacci.Goal: