@@ -18,17 +18,12 @@ from enum import Enum, IntEnum
1818from types import TracebackType
1919from typing import Any , Generic , Literal , overload , Sequence , TypedDict
2020
21-
22- from action_msgs .msg import GoalInfo
23- from action_msgs .msg ._goal_status_array import GoalStatusArray
24- from action_msgs .srv ._cancel_goal import CancelGoal
2521from rclpy .clock import JumpHandle
2622from rclpy .clock_type import ClockType
2723from rclpy .duration import Duration
2824from rclpy .parameter import Parameter
2925from rclpy .subscription import MessageInfo
30- from type_support import (MsgT , Action , GoalT , ResultT , FeedbackT , SendGoalServiceResponse ,
31- GetResultServiceResponse , FeedbackMessage , SendGoalServiceRequest , GetResultServiceRequest )
26+ from rclpy .type_support import MsgT
3227
3328
3429def rclpy_remove_ros_args (pycli_args : Sequence [str ]) -> list [str ]:
@@ -448,191 +443,6 @@ class WaitSet(Destroyable):
448443 """Wait until timeout is reached or event happened."""
449444
450445
451- class ActionClient (Generic [GoalT , ResultT , FeedbackT ], Destroyable ):
452-
453- def __init__ (
454- self ,
455- node : Node ,
456- pyaction_type : type [Action [GoalT , ResultT , FeedbackT ]],
457- goal_service_qos : rmw_qos_profile_t ,
458- result_service_qos : rmw_qos_profile_t ,
459- cancel_service_qos : rmw_qos_profile_t ,
460- feedback_service_qos : rmw_qos_profile_t ,
461- status_topci_qos : rmw_qos_profile_t
462- ) -> None : ...
463-
464- @property
465- def pointer (self ) -> int :
466- """Get the address of the entity as an integer."""
467-
468- def take_goal_response (self , pymsg_type : type [SendGoalServiceResponse ]
469- ) -> tuple [int , SendGoalServiceResponse ] | tuple [None , None ]:
470- """Take an action goal response."""
471-
472- def send_result_request (self , pyrequest : GetResultServiceRequest ) -> int :
473- """Send an action result requst."""
474-
475- def take_cancel_response (self , pymsg_type : type [CancelGoal .Response ]
476- ) -> tuple [int , CancelGoal .Response ] | tuple [None , None ]:
477- """Take an action cancel response."""
478-
479- def take_feedback (self , pymsg_type : type [FeedbackMessage [FeedbackT ]]
480- ) -> FeedbackMessage [FeedbackT ] | None :
481- """Take a feedback message from a given action client."""
482-
483- def send_cancel_request (self : CancelGoal .Request ) -> int :
484- """Send an action cancel request."""
485-
486- def send_goal_request (self : SendGoalServiceRequest [GoalT ]) -> int :
487- """Send an action goal request."""
488-
489- def take_result_response (self , pymsg_type : type [GetResultServiceResponse [ResultT ]]
490- ) -> tuple [int , GetResultServiceResponse [ResultT ]] | tuple [None , None ]:
491- """Take an action result response."""
492-
493- def get_num_entities (self ) -> tuple [int , int , int , int , int ]:
494- """Get the number of wait set entities that make up an action entity."""
495-
496- def is_action_server_available (self ) -> bool :
497- """Check if an action server is available for the given action client."""
498-
499- def add_to_waitset (self , waitset : WaitSet ) -> None :
500- """Add an action entity to a wait set."""
501-
502- def is_ready (self ) -> bool :
503- """Check if an action entity has any ready wait set entities."""
504-
505- def take_status (self , pymsg_type : type [GoalStatusArray ]) -> GoalStatusArray | None :
506- """Take an action status response."""
507-
508-
509- class GoalEvent (Enum ):
510- _value_ : int
511- EXECUTE = ...
512- CANCEL_GOAL = ...
513- SUCCEED = ...
514- ABORT = ...
515- CANCELED = ...
516-
517-
518- class rmw_request_id_t :
519- writer_guid : list [int ]
520- sequence_number : int
521-
522-
523- class ActionServer (Generic [GoalT , ResultT , FeedbackT ], Destroyable ):
524-
525- def __init__ (
526- self ,
527- node : Node ,
528- rclpy_clock : Clock ,
529- pyaction_type : type [Action [GoalT , ResultT , FeedbackT ]],
530- action_name : str ,
531- goal_service_qos : rmw_qos_profile_t ,
532- result_service_qos : rmw_qos_profile_t ,
533- cancel_service_qos : rmw_qos_profile_t ,
534- feedback_topic_qos : rmw_qos_profile_t ,
535- status_topic_qos : rmw_qos_profile_t ,
536- result_timeout : float
537- ) -> None : ...
538-
539- @property
540- def pointer (self ) -> int :
541- """Get the address of the entity as an integer."""
542-
543- def take_goal_request (
544- self ,
545- pymsg_type : type [SendGoalServiceRequest [GoalT ]]
546- ) -> tuple [rmw_request_id_t , SendGoalServiceRequest [GoalT ]] | tuple [None , None ]:
547- """Take an action goal request."""
548-
549- def send_goal_response (
550- self ,
551- header : rmw_request_id_t ,
552- pyresponse : SendGoalServiceResponse
553- ) -> None :
554- """Send an action goal response."""
555-
556- def send_result_response (
557- self ,
558- header : rmw_request_id_t ,
559- pyresponse : GetResultServiceResponse [ResultT ]
560- ) -> None :
561- """Send an action result response."""
562-
563- def take_cancel_request (
564- self ,
565- pymsg_type : type [CancelGoal .Request ]
566- ) -> tuple [rmw_request_id_t , CancelGoal .Request ] | tuple [None , None ]:
567- """Take an action cancel request."""
568-
569- def take_result_request (
570- self ,
571- pymsg_type : type [GetResultServiceRequest ]
572- ) -> tuple [rmw_request_id_t , GetResultServiceRequest ] | tuple [None , None ]:
573- """Take an action result request."""
574-
575- def send_cancel_response (
576- self ,
577- header : rmw_request_id_t ,
578- pyresponse : int
579- ) -> None :
580- """Send an action cancel response."""
581-
582- def publish_feedback (
583- self ,
584- pymsg : FeedbackMessage [FeedbackT ]
585- ) -> None :
586- """Publish a feedback message from a given action server."""
587-
588- def publish_status (self ) -> None :
589- """Publish a status message from a given action server."""
590-
591- def notify_goal_done (self ) -> None :
592- """Notify goal is done."""
593-
594- def goal_exists (self , pygoal_info : GoalInfo ) -> bool :
595- """Check is a goal exists in the server."""
596-
597- def process_cancel_request (
598- self ,
599- pycancel_request : CancelGoal .Request ,
600- pycancel_response_tpye : type [CancelGoal .Response ]
601- ) -> CancelGoal .Response :
602- """Process a cancel request"""
603-
604- def expire_goals (self , max_num_goals : int ) -> tuple [GoalInfo , ...]:
605- """Expired goals."""
606-
607- def get_num_entities (self ) -> tuple [int , int , int , int , int ]:
608- """Get the number of wait set entities that make up an action entity."""
609-
610- def is_ready (self , wait_set : WaitSet ) -> tuple [bool , bool , bool , bool ]:
611- """Check if an action entity has any ready wait set entities."""
612-
613- def add_to_waitset (self , wait_set : WaitSet ) -> None :
614- """Add an action entity to a wait set."""
615-
616-
617- class ActionGoalHandle :
618-
619- def __init__ (self , action_server : ActionServer , pygoal_info_msg : GoalInfo ) -> None :
620- ...
621-
622- @property
623- def pointer (self ) -> int :
624- """Get the address of the entity as an integer."""
625-
626- def get_status (self ) -> GoalEvent :
627- """Get the status of a goal."""
628-
629- def update_goal_state (self , event : GoalEvent ) -> None :
630- """Update a goal state."""
631-
632- def is_active (self ) -> bool :
633- """Check if a goal is active."""
634-
635-
636446class RCLError (RuntimeError ):
637447 pass
638448
@@ -644,7 +454,7 @@ class NodeNameNonExistentError(RCLError):
644454class InvalidHandle (RuntimeError ):
645455 pass
646456
647-
457+
648458class SignalHandlerOptions (Enum ):
649459 _value_ : int
650460 NO = ...
0 commit comments