rclUE
Public Member Functions | Public Attributes | Private Member Functions | List of all members
UROS2ActionServer Class Reference

Class implementing ROS2 action servers. Wrapper class of rclc action server. Callbacks are set through the SetDelegates. More...

#include <ROS2ActionServer.h>

Inheritance diagram for UROS2ActionServer:
Inheritance graph
[legend]
Collaboration diagram for UROS2ActionServer:
Collaboration graph
[legend]

Public Member Functions

virtual void Destroy () override
 Destroy action server from rclc. More...
 
virtual void ProcessReady (rcl_wait_set_t *wait_set) override
 Determine the relevant action server functions to call. More...
 
void ProcessAndSendCancelResponse (const int InReturnCode)
 Process and send cancel response with rcl_action_process_cancel_request. More...
 
void SendGoalResponse ()
 Send action goal response with rcl_action_send_goal_response. More...
 
void SendFeedback ()
 Update and send feedback with rcl_action_publish_feedback. More...
 
void SendResultResponse ()
 Update and send feedback with rcl_action_send_result_response. More...
 
void SetDelegates (const FActionCallback &InGoalDelegate, const FSimpleCallback &InCancelDelegate, const FSimpleCallback &InResultDelegate)
 Set the Delegates. More...
 
- Public Member Functions inherited from UROS2Action
virtual bool InitializeWithROS2 (UROS2NodeComponent *InROS2Node)
 Initialize action. More...
 
virtual bool Init ()
 Initialize action and action component. More...
 
virtual bool InitializeAction ()
 Create and Initize action. More...
 

Public Attributes

rcl_action_server_t server
 ROS2 action server from rclc.
 
- Public Attributes inherited from UROS2Action
FString ActionName
 
TSubclassOf< UROS2GenericActionActionClass
 type of action More...
 
UROS2GenericActionAction
 ROS2 Action Instance. More...
 
UROS2NodeComponentOwnerNode
 ROS2Node which own this action. More...
 
TEnumAsByte< UROS2StateState = UROS2State::Created
 Action state. More...
 
UROS2QoS CancelQoS = UROS2QoS::Services
 Quality of Cancel. More...
 
UROS2QoS GoalQoS = UROS2QoS::Services
 Quality of Goal. More...
 
UROS2QoS ResultQoS = UROS2QoS::Services
 Quality of Result. More...
 
UROS2QoS FeedbackQoS = UROS2QoS::Default
 Quality of Feedback. More...
 

Private Member Functions

virtual void InitializeActionComponent () override
 Initialize ROS2 action server with rcl_action_server_init. More...
 

Additional Inherited Members

Detailed Description

Class implementing ROS2 action servers. Wrapper class of rclc action server. Callbacks are set through the SetDelegates.

method

See also
rclc action client
[Unreal Engine

Delegates](https://docs.unrealengine.com/5.1/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Delegates/)

UCLASS(ClassGroup = (Custom), Blueprintable, BlueprintType, meta = (BlueprintSpawnableComponent))

Member Function Documentation

◆ Destroy()

virtual void UROS2ActionServer::Destroy ( )
overridevirtual

Destroy action server from rclc.

Reimplemented from UROS2Action.

◆ InitializeActionComponent()

virtual void UROS2ActionServer::InitializeActionComponent ( )
overrideprivatevirtual

Initialize ROS2 action server with rcl_action_server_init.

Set QOS for all goal, result, cancel, feedback and status

Reimplemented from UROS2Action.

◆ ProcessAndSendCancelResponse()

void UROS2ActionServer::ProcessAndSendCancelResponse ( const int  InReturnCode)

Process and send cancel response with rcl_action_process_cancel_request.

Parameters
InReturnCodereturn code
See also
CancelGoal

UFUNCTION(BlueprintCallable)

◆ ProcessReady()

virtual void UROS2ActionServer::ProcessReady ( rcl_wait_set_t *  wait_set)
overridevirtual

Determine the relevant action server functions to call.

Parameters
wait_set

Reimplemented from UROS2Action.

◆ SendFeedback()

void UROS2ActionServer::SendFeedback ( )

Update and send feedback with rcl_action_publish_feedback.

UFUNCTION(BlueprintCallable)

◆ SendGoalResponse()

void UROS2ActionServer::SendGoalResponse ( )

Send action goal response with rcl_action_send_goal_response.

UFUNCTION(BlueprintCallable)

◆ SendResultResponse()

void UROS2ActionServer::SendResultResponse ( )

Update and send feedback with rcl_action_send_result_response.

UFUNCTION(BlueprintCallable)

◆ SetDelegates()

void UROS2ActionServer::SetDelegates ( const FActionCallback &  InGoalDelegate,
const FSimpleCallback &  InCancelDelegate,
const FSimpleCallback &  InResultDelegate 
)

Set the Delegates.

Parameters
HandleGoal
HandleCancel
HandleAccepted

UFUNCTION(BlueprintCallable)


The documentation for this class was generated from the following file: