Go to the documentation of this file.
19 #include "CoreMinimal.h"
25 #include "ROS2NodeComponent.h"
27 #include "ROS2ServiceClient.h"
45 #include "RRBaseROS2Interface.generated.h"
86 #define RR_ROBOT_ROS2_SUBSCRIBE_TO_TOPIC(InTopicName, InMsgClass, InCallback) \
88 ROS2_CREATE_SUBSCRIBER(RobotROS2Node,
this, InTopicName, InMsgClass, InCallback)
116 void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps)
const override;
129 TObjectPtr<UROS2NodeComponent> RobotROS2Node =
nullptr;
140 TObjectPtr<UROS2Spawnable> ROSSpawnParameters =
nullptr;
153 FString DefautlROSNamespace = TEXT(
"");
172 virtual void Initialize(AActor* Owner);
184 virtual void InitInterfaces();
215 virtual void DeInitialize();
229 virtual void InitRobotROS2Node(AActor* Owner);
243 virtual void InitROS2NodeParam(AActor* Owner);
273 void BPSetupROSParams();
391 virtual bool InitPublishers();
408 virtual void StopPublishers();
425 virtual bool InitSubscriptions();
442 virtual bool InitServiceClients();
459 virtual bool InitServiceServers();
476 virtual bool InitActionClients();
493 virtual bool InitActionServers();
520 virtual void BeginPlay()
override;
529 TObjectPtr<URRBaseROS2Interface> ROS2Interface =
nullptr;
538 TSubclassOf<URRBaseROS2Interface> ROS2InterfaceClass = URRBaseROS2Interface::StaticClass();
551 void AddAllSubComponentToROSInterface();
TMap< FString, UROS2ActionClient * > ActionClients
You can add your publishers here to ask ROS2Interface to manage.
Definition: RRBaseROS2Interface.h:361
void SetupROSParamsAll()
Call SetupROSParams and BPSetupROSParams.
Definition: RRBaseROS2Interface.h:288
Wrapper class of URRBaseROS2Interfaceas component.
Definition: RRBaseROS2Interface.h:514
Base Robot ROS 2 interface class.
Definition: RRBaseROS2Interface.h:80
Odometry Topic and TF publisher of ARRBaseRobot.
BaseComponents which is used when spawning Actor from ROS 2 service in ASimulationState.
TMap< FString, UROS2ActionServer * > ActionServers
You can add your publishers here to ask ROS2Interface to manage.
Definition: RRBaseROS2Interface.h:374
TMap< FString, UROS2Publisher * > Publishers
You can add your publishers here to ask ROS2Interface to manage.
Definition: RRBaseROS2Interface.h:309
TMap< FString, UROS2ServiceServer * > ServiceServers
You can add your publishers here to ask ROS2Interface to manage.
Definition: RRBaseROS2Interface.h:348
Base Odom Component which provides actor pose changes.
TMap< FString, UROS2Subscriber * > Subscribers
You can add your subscribers here to ask ROS2Interface to manage.
Definition: RRBaseROS2Interface.h:322
TMap< FString, UROS2ServiceClient * > ServiceClients
You can add your publishers here to ask ROS2Interface to manage.
Definition: RRBaseROS2Interface.h:335
virtual void SetupROSParams()
Setup ROS Params, overridable by child classes to config custom ROS 2 Interface's params.
Definition: RRBaseROS2Interface.h:258
virtual bool IsSupportedForNetworking() const override
Definition: RRBaseROS2Interface.h:94
Base Robot class. Other robot class should inherit from this class.
Definition: RRBaseRobot.h:161