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

Wrapper Actor implementation of UROS2NodeComponent. More...

#include <ROS2Node.h>

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

Public Member Functions

 AROS2Node ()
 A constructor.
 
rcl_node_t * GetNode ()
 Initilize rosnode with rclc_node_init_default. More...
 
void AddSubscription (const FString &TopicName, TSubclassOf< UROS2GenericMsg > MsgClass, const FSubscriptionCallback &Callback)
 Methods to register subscribers. More...
 
void AddPublisher (UROS2Publisher *InPublisher)
 Set this node to UROS2Publisher::OwnerNode of InPublisher and add to #Publishers. More...
 
void AddServiceClient (UROS2ServiceClient *InClient)
 Set this node to UROS2ServiceClient::OwnerNode and add to #Clients. More...
 
void AddServiceServer (const FString &ServiceName, const TSubclassOf< UROS2GenericSrv > SrvClass, const FServiceCallback &Callback)
 Create ServiceServer with rcl_service_init and add to Services. More...
 
void AddActionClient (UROS2ActionClient *InActionClient)
 Set this node to UROS2ActionClient::OwnerNode and add to #ActionClients. More...
 
void AddActionServer (UROS2ActionServer *InActionServer)
 Set this node to UROS2ActionClient::OwnerNode and add to #ActionServers. More...
 

Public Attributes

FString Name = TEXT("node")
 
FString Namespace = TEXT("")
 

Detailed Description

Wrapper Actor implementation of UROS2NodeComponent.

Deprecated:
Use UROS2NodeComponent instead.

UCLASS(Blueprintable)

Member Function Documentation

◆ AddActionClient()

void AROS2Node::AddActionClient ( UROS2ActionClient InActionClient)

Set this node to UROS2ActionClient::OwnerNode and add to #ActionClients.

Parameters
InActionClient

UFUNCTION(BlueprintCallable)

◆ AddActionServer()

void AROS2Node::AddActionServer ( UROS2ActionServer InActionServer)

Set this node to UROS2ActionClient::OwnerNode and add to #ActionServers.

Parameters
InActionServer

UFUNCTION(BlueprintCallable)

◆ AddPublisher()

void AROS2Node::AddPublisher ( UROS2Publisher InPublisher)

Set this node to UROS2Publisher::OwnerNode of InPublisher and add to #Publishers.

Parameters
InPublisher

UFUNCTION(BlueprintCallable)

◆ AddServiceClient()

void AROS2Node::AddServiceClient ( UROS2ServiceClient InClient)

Set this node to UROS2ServiceClient::OwnerNode and add to #Clients.

Parameters
InClient

UFUNCTION(BlueprintCallable)

◆ AddServiceServer()

void AROS2Node::AddServiceServer ( const FString &  ServiceName,
const TSubclassOf< UROS2GenericSrv SrvClass,
const FServiceCallback &  Callback 
)

Create ServiceServer with rcl_service_init and add to Services.

Note
Keep original arguments, instead of take ServiceServer as arg in ROS2NodeComponent.
Parameters
ServiceName
SrvClass
Callback

UFUNCTION(BlueprintCallable)

◆ AddSubscription()

void AROS2Node::AddSubscription ( const FString &  TopicName,
TSubclassOf< UROS2GenericMsg MsgClass,
const FSubscriptionCallback &  Callback 
)

Methods to register subscribers.

It is up to the user to ensure that they are only added once

Parameters
TopicName
MsgClass
Callback

UFUNCTION(BlueprintCallable)

◆ GetNode()

rcl_node_t* AROS2Node::GetNode ( )

Initilize rosnode with rclc_node_init_default.

This can't be pre-placed in AROS2Node::BeginPlay() as the order of rcl(c) instructions could be different/relevant in

each of Child classes

UFUNCTION(BlueprintCallable) void Init();

Member Data Documentation

◆ Name

FString AROS2Node::Name = TEXT("node")

◆ Namespace

FString AROS2Node::Namespace = TEXT("")

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