8#include "CoreMinimal.h"
14#include "ROSCommands.generated.h"
17class UROSIntegrationGameInstance;
58 UFUNCTION(BlueprintCallable)
59 void TryExecuteCommand(
const FString& Command);
76 UWorld* GetGameWorld();
85 void SetupROSCommandTopic();
87 void DestroyROSTopic();
89 void ParseIncomingMessage(
const FString Message);
92 void ROSBridgeStateChanged(
EROSState state);
100 bool TryParseBoolean(const FString& String,
bool& OutBool) const;
103 UTopic* CommandTopic =
nullptr;
106 UROSIntegrationGameInstance* RosInstance =
nullptr;
108 bool InMeters = false;
110 bool TeleportSpectatorHeight = false;
112 void HandlePrintAvailableCommands(const FString& Variable);
114 void HandleQuit(const FString& Variable);
116 void HandlePauseSimulator(const FString& Variable);
118 void HandleUnPauseSimulator(const FString& Variable);
120 void HandleAdvanceOneFrame(const FString& Variable);
122 void HandleAdvanceFrames(const FString& Variable);
124 void HandleAdvanceTime(const FString& Variable);
126 void HandleChangeMap(const FString& Variable);
128 void HandleUnrealCommand(const FString& Variable);
130 void HandleSetSpectatorOverlapRadius(const FString& Variable);
132 void HandleTeleportSpectatorHeight(const FString& Variable);
134 void HandleTeleportSpectator(const FString& Variable);
136 void HandleTeleportActorByID(const FString& Variable);
138 void HandleTeleportActorByIDHeight(const FString& Variable);
140 void HandleTeleportSpectatorByInstanceID(const FString& Variable);
142 void HandleTryDestroyObjectByID(const FString& Variable);
144 void HandleDestroyAllSensors(const FString& Variable);
146 void HandleDestroyAllWalkers(const FString& Variable);
148 void HandleDestroyAllVehicles(const FString& Variable);
150 void HandleDestroyObjectByInstanceID(const FString& Variable);
152 void HandlePrintMaps(const FString& Variable);
154 void HandlePrintAllSensors(const FString& Variable);
156 void HandlePrintAllVehicles(const FString& Variable);
158 void HandlePrintAllWalkers(const FString& Variable);
160 void PrintActorInformation(const FString& Variable, UClass* ActorClass, const FString& ActorTypeName);
162 void HandlePrintIds(const FString& Variable);
164 void HandleSetGlobalTargetFrameRate(const FString& Variable);
166 void HandleSetGlobalTimeDilation(const FString& Variable);
168 void HandleSetQualityLevel(const FString& Variable);
170 void HandleSetWorldRendering(const FString& Variable);
172 void HandleSetGrassVisibility(const FString& Variable);
174 void HandleSetSaveCombinedPointcloudToDisk(const FString& Variable);
176 void HandleSpawnObjects(const FString& Variable);
178 void HandleExportAll(const FString& Variable);
180 void HandleExportWeather(const FString& Variable);
182 void HandleExportWalkers(const FString& Variable);
184 void HandleExportVehicles(const FString& Variable);
186 void HandleExportSensors(const FString& Variable);
188 void HandleExportFoliage(const FString& Variable);
190 void HandleExportObjects(const FString& Variable);
192 void HandleExportProps(const FString& Variable);
194 void HandleVisualizeOverlapSensorsBounds(const FString& Variable);
196 void HandleChangeOverlapSensorBounds(const FString& Variable);
198 void HandleChangeOverlapSensorPosition(const FString& Variable);
200 void HandleMoveWalkerToAndDestroy(const FString& Variable);
202 void HandleMoveWalkerToAndStop(const FString& Variable);
204 void HandleMoveWalkerTo(const FString& Variable,
EWalkerEndAction EndAction);
206 void HandleStopWalker(const FString& Variable);
208 void HandleResumeWalker(const FString& Variable);
210 void HandleSetWalkerMovement(const FString& Variable,
bool IsPaused);
212 void HandleMoveDroneTo(const FString& Variable,
EDroneEndAction EndAction);
214 void HandleMoveDroneToAndStop(const FString& Variable);
216 void HandleSetAllSensorsEnabled(const FString& Variable);
218 void HandleEnableAllSensors(const FString& Variable);
220 void HandleDisableAllSensors(const FString& Variable);
222 void HandleSetSensorEnabled(const FString& Variable);
224 void HandleSetWPO(const FString& Variable);
226 void HandleSetNaniteMaxPixelsPerEdge(const FString& Variable);
228 void HandleDestroyTreesArea(const FString& Variable);
230 void HandleDestroyActorsArea(const FString& Variable);
232 void HandleDestroyActors(const FString& Variable,
bool OnlyTrees);
234 void HandleVehicleMeshVisibility(const FString& Variable);
void(UROSCommands::* CommandHandler)(const FString &)
static TMap< FString, FCommand > CommandHandlers
FCommand(CommandHandler InHandler, float InCooldownTime, const FString &InDefaultValue="")