11#include "ROSIntegration/Classes/ROSIntegrationGameInstance.h"
12#include "ROSIntegration/Classes/RI/Topic.h"
14#include "Engine/GameViewportClient.h"
15#include "Engine/Engine.h"
16#include "Engine/World.h"
46 if (GEngine && GEngine->GameViewport)
48 UWorld* World = GEngine->GameViewport->GetWorld();
86 UE_LOG(LogTemp, Warning, TEXT(
"InfoTopic.cpp: Destroyed ROS Info Topic"));
98 if (GEngine && GEngine->GameViewport)
100 UWorld* World = GEngine->GameViewport->GetWorld();
106 ROSMessage = MakeShared<ROSMessages::std_msgs::String>();
112 InfoTopic = NewObject<UTopic>(UTopic::StaticClass());
113 InfoTopic->Init(RosInstance->ROSIntegrationCore, TEXT(
"/agrarsense/out/info"), TEXT(
"std_msgs/String"));
117 UE_LOG(LogTemp, Warning, TEXT(
"InfoTopic.cpp: Created ROS Info Topic"));
static UROSIntegrationGameInstance * GetROSGameInstance(const UObject *WorldContextObject)
static UROSHandler * GetROSHandle(const UObject *WorldContextObject)
static TWeakObjectPtr< UTopic > InfoTopic
static bool AllowInfoTopic
static TSharedPtr< ROSMessages::std_msgs::String > ROSMessage
static void SendMessage(const FString &Message)
void ROSBridgeStateChanged(EROSState state)
static UInfoTopic * Instance
static void SetAllowSendInfo(bool Allow)
FROSDelegate_ROState OnROSStateChanged