diff --git a/rosbridge_library/src/rosbridge_library/capabilities/advertise_action.py b/rosbridge_library/src/rosbridge_library/capabilities/advertise_action.py index 87b733a57..4075be1fd 100644 --- a/rosbridge_library/src/rosbridge_library/capabilities/advertise_action.py +++ b/rosbridge_library/src/rosbridge_library/capabilities/advertise_action.py @@ -94,7 +94,6 @@ def execute_callback(self, goal): del self.goal_handles[goal_id] return result - def handle_feedback(self, goal_id, feedback): """ Called by the ActionFeedback capability to handle action feedback from the external client. @@ -104,7 +103,6 @@ def handle_feedback(self, goal_id, feedback): else: self.protocol.log("warning", f"Received action feedback for unrecognized id: {goal_id}") - def handle_result(self, goal_id, res): """ Called by the ActionResult capability to handle an action result from the external client. diff --git a/rosbridge_library/src/rosbridge_library/rosbridge_protocol.py b/rosbridge_library/src/rosbridge_library/rosbridge_protocol.py index f8dca1b8b..fef28cefc 100644 --- a/rosbridge_library/src/rosbridge_library/rosbridge_protocol.py +++ b/rosbridge_library/src/rosbridge_library/rosbridge_protocol.py @@ -30,15 +30,15 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. +from rosbridge_library.capabilities.action_feedback import ActionFeedback +from rosbridge_library.capabilities.action_result import ActionResult from rosbridge_library.capabilities.advertise import Advertise - -# imports for external service_server +from rosbridge_library.capabilities.advertise_action import AdvertiseAction from rosbridge_library.capabilities.advertise_service import AdvertiseService from rosbridge_library.capabilities.call_service import CallService - -# imports for defragmentation from rosbridge_library.capabilities.defragmentation import Defragment from rosbridge_library.capabilities.publish import Publish +from rosbridge_library.capabilities.send_action_goal import SendActionGoal from rosbridge_library.capabilities.service_response import ServiceResponse from rosbridge_library.capabilities.subscribe import Subscribe from rosbridge_library.capabilities.unadvertise_service import UnadvertiseService @@ -49,14 +49,18 @@ class RosbridgeProtocol(Protocol): """Adds the handlers for the rosbridge opcodes""" rosbridge_capabilities = [ - CallService, Advertise, Publish, Subscribe, Defragment, AdvertiseService, + CallService, ServiceResponse, UnadvertiseService, + AdvertiseAction, + ActionFeedback, + ActionResult, + SendActionGoal, ] print("registered capabilities (classes):") diff --git a/rosbridge_library/test/capabilities/test_action_capabilities.py b/rosbridge_library/test/capabilities/test_action_capabilities.py index b7bed24bf..75d640ceb 100755 --- a/rosbridge_library/test/capabilities/test_action_capabilities.py +++ b/rosbridge_library/test/capabilities/test_action_capabilities.py @@ -4,12 +4,11 @@ from json import dumps, loads from threading import Thread -from example_interfaces.action._fibonacci import Fibonacci_FeedbackMessage - import rclpy +from example_interfaces.action._fibonacci import Fibonacci_FeedbackMessage from rclpy.executors import MultiThreadedExecutor from rclpy.node import Node -from rclpy.qos import DurabilityPolicy, ReliabilityPolicy, QoSProfile +from rclpy.qos import DurabilityPolicy, QoSProfile, ReliabilityPolicy from rosbridge_library.capabilities.action_feedback import ActionFeedback from rosbridge_library.capabilities.action_result import ActionResult from rosbridge_library.capabilities.advertise_action import AdvertiseAction @@ -148,7 +147,8 @@ def test_execute_advertised_action(self): Fibonacci_FeedbackMessage, f"{action_path}/_action/feedback", self.feedback_subscriber_cb, - sub_qos_profile) + sub_qos_profile, + ) time.sleep(0.1) feedback_msg = loads(