@@ -44,6 +44,9 @@ from rclpy.qos import qos_profile_parameters
4444from rosapi import glob_helper , objectutils , params , proxy
4545from rosapi_msgs .msg import TypeDef
4646from rosapi_msgs .srv import (
47+ ActionFeedbackDetails ,
48+ ActionGoalDetails ,
49+ ActionResultDetails ,
4750 DeleteParam ,
4851 GetActionServers ,
4952 GetParam ,
@@ -130,6 +133,21 @@ class Rosapi(Node):
130133 "~/service_response_details" ,
131134 self .get_service_response_details ,
132135 )
136+ self .create_service (
137+ ActionGoalDetails ,
138+ "~/action_goal_details" ,
139+ self .get_action_goal_details ,
140+ )
141+ self .create_service (
142+ ActionResultDetails ,
143+ "~/action_result_details" ,
144+ self .get_action_result_details ,
145+ )
146+ self .create_service (
147+ ActionFeedbackDetails ,
148+ "~/action_feedback_details" ,
149+ self .get_action_feedback_details ,
150+ )
133151 self .create_service (
134152 SetParam ,
135153 "~/set_param" ,
@@ -283,14 +301,40 @@ class Rosapi(Node):
283301 return response
284302
285303 def get_service_response_details (self , request , response ):
286- """Called by the rosapi/ServiceResponseDetails service. Given the name of a service type, returns the TypeDef
287- for the response message of that service type."""
304+ """Called by the rosapi/ServiceResponseDetails service. Given the name of a service type,
305+ returns the TypeDef for the response message of that service type."""
288306 response .typedefs = [
289307 dict_to_typedef (d )
290308 for d in objectutils .get_service_response_typedef_recursive (request .type )
291309 ]
292310 return response
293311
312+ def get_action_goal_details (self , request , response ):
313+ """Called by the rosapi/ActionGoalDetails service. Given the name of an action type,
314+ returns the TypeDef for the goal message of that action type."""
315+ response .typedefs = [
316+ dict_to_typedef (d ) for d in objectutils .get_action_goal_typedef_recursive (request .type )
317+ ]
318+ return response
319+
320+ def get_action_result_details (self , request , response ):
321+ """Called by the rosapi/ActionResultDetails service. Given the name of an action type,
322+ returns the TypeDef for the result message of that action type."""
323+ response .typedefs = [
324+ dict_to_typedef (d )
325+ for d in objectutils .get_action_result_typedef_recursive (request .type )
326+ ]
327+ return response
328+
329+ def get_action_feedback_details (self , request , response ):
330+ """Called by the rosapi/ActionFeedbackDetails service. Given the name of an action type,
331+ returns the TypeDef for the feedback message of that action type."""
332+ response .typedefs = [
333+ dict_to_typedef (d )
334+ for d in objectutils .get_action_feedback_typedef_recursive (request .type )
335+ ]
336+ return response
337+
294338 async def set_param (self , request , response ):
295339 try :
296340 node_name , param_name = self ._get_node_and_param_name (request .name )
0 commit comments