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

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

#include <ROS2ActionClient.h>

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

Public Member Functions

virtual void Destroy () override
 Destroy action client from rclc. More...
 
virtual void ProcessReady (rcl_wait_set_t *wait_set) override
 Determine the relevant action client functions to call. More...
 
bool SendGoal ()
 Send action goal with rcl_action_send_goal_request. More...
 
template<typename TAction , typename TUEStruct >
void SendGoal (const TUEStruct &InGoalData)
 Send a goal. More...
 
void SendResultRequest ()
 Send result request to get result with rcl_action_send_result_request. More...
 
void SendCancelRequest ()
 Send cancel request with rcl_action_send_cancel_request. More...
 
void SetDelegates (const FActionCallback &InFeedbackDelegate, const FActionCallback &InResultResponseDelegate, const FActionCallback &InGoalResponseDelegate, const FSimpleCallback &InCancelResponseDelegate)
 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...
 

Static Public Member Functions

static UROS2ActionClientCreateActionClient (UObject *InOwner, const FString &InActionName, const TSubclassOf< UROS2GenericAction > &InActionClass, const FActionCallback &InGoalResponseDelegate, const FActionCallback &InResultResponseDelegate, const FActionCallback &InFeedbackDelegate, const FSimpleCallback &InCancelResponseDelegate, const UROS2QoS InGoalQoS=UROS2QoS::Services, const UROS2QoS InResultQoS=UROS2QoS::Services, const UROS2QoS InFeedbackQoS=UROS2QoS::Default, const UROS2QoS InCancelQoS=UROS2QoS::Services)
 Create Action Client. More...
 

Public Attributes

rcl_action_client_t client
 ROS2 action client 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 client with rcl_action_client_init. More...
 

Additional Inherited Members

Detailed Description

Class implementing ROS2 action clients. Wrapper class of rclc action client. Callbacks are set through the SetDelegates.

method

See also
rclc action client
Unreal Engine Delegates

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

Member Function Documentation

◆ CreateActionClient()

static UROS2ActionClient* UROS2ActionClient::CreateActionClient ( UObject *  InOwner,
const FString &  InActionName,
const TSubclassOf< UROS2GenericAction > &  InActionClass,
const FActionCallback &  InGoalResponseDelegate,
const FActionCallback &  InResultResponseDelegate,
const FActionCallback &  InFeedbackDelegate,
const FSimpleCallback &  InCancelResponseDelegate,
const UROS2QoS  InGoalQoS = UROS2QoS::Services,
const UROS2QoS  InResultQoS = UROS2QoS::Services,
const UROS2QoS  InFeedbackQoS = UROS2QoS::Default,
const UROS2QoS  InCancelQoS = UROS2QoS::Services 
)
static

Create Action Client.

Parameters
InOwner
InActionName
InActionClass
InFeedbackDelegate
InResultResponseDelegate
InGoalResponseDelegate
InCancelResponseDelegate
Returns
UROS2ActionClient*

◆ Destroy()

virtual void UROS2ActionClient::Destroy ( )
overridevirtual

Destroy action client from rclc.

Reimplemented from UROS2Action.

◆ InitializeActionComponent()

virtual void UROS2ActionClient::InitializeActionComponent ( )
overrideprivatevirtual

Initialize ROS2 action client with rcl_action_client_init.

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

Reimplemented from UROS2Action.

◆ ProcessReady()

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

Determine the relevant action client functions to call.

Parameters
wait_set

Reimplemented from UROS2Action.

◆ SendCancelRequest()

void UROS2ActionClient::SendCancelRequest ( )

Send cancel request with rcl_action_send_cancel_request.

UFUNCTION(BlueprintCallable)

◆ SendGoal() [1/2]

bool UROS2ActionClient::SendGoal ( )

Send action goal with rcl_action_send_goal_request.

UFUNCTION(BlueprintCallable)

◆ SendGoal() [2/2]

template<typename TAction , typename TUEStruct >
void UROS2ActionClient::SendGoal ( const TUEStruct &  InGoalData)
inline

Send a goal.

Template Parameters
TUEStruct
Parameters
InGoalData

◆ SendResultRequest()

void UROS2ActionClient::SendResultRequest ( )

Send result request to get result with rcl_action_send_result_request.

UFUNCTION(BlueprintCallable)

◆ SetDelegates()

void UROS2ActionClient::SetDelegates ( const FActionCallback &  InFeedbackDelegate,
const FActionCallback &  InResultResponseDelegate,
const FActionCallback &  InGoalResponseDelegate,
const FSimpleCallback &  InCancelResponseDelegate 
)

Set the Delegates.

Parameters
SetGoal
Feedback
Result
GoalResponse
Cancel

UFUNCTION(BlueprintCallable)


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