21 #include "Components/ActorComponent.h"
23 #include "CoreMinimal.h"
29 #include "ROS2NodeComponent.h"
31 #include "Srvs/ROS2Attach.h"
33 #include "Srvs/ROS2DeleteEntity.h"
35 #include "Srvs/ROS2GetEntityState.h"
37 #include "Srvs/ROS2SetEntityState.h"
39 #include "Srvs/ROS2SpawnEntities.h"
41 #include "Srvs/ROS2SpawnEntity.h"
53 #include "RRROS2SimulationStateClient.generated.h"
57 class UROS2GenericSrv;
93 UROS2NodeComponent* ROS2Node =
nullptr;
125 virtual void Init(UROS2NodeComponent* InROS2Node);
151 virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps)
const override;
174 void GetEntityStateSrv(UROS2GenericSrv* InService);
195 void SetEntityStateSrv(UROS2GenericSrv* InService);
212 void ServerSetEntityState(
const FROSSetEntityStateReq& InRequest);
233 void AttachSrv(UROS2GenericSrv* InService);
250 void ServerAttach(
const FROSAttachReq& InRequest);
269 virtual void SpawnEntitySrv(UROS2GenericSrv* InService);
288 virtual void SpawnEntitiesSrv(UROS2GenericSrv* InService);
305 void ServerSpawnEntity(
const FROSSpawnEntityReq& InRequest);
324 void DeleteEntitySrv(UROS2GenericSrv* InService);
341 void ServerDeleteEntity(
const FROSDeleteEntityReq& InRequest);
358 void ServerAddEntity(AActor* InEntity);
379 NetworkPlayerId = InNetworkPlayerId;
402 return NetworkPlayerId;
410 virtual void OnComponentCreated()
override;
427 bool CheckEntity(TMap<FString, T>& InEntities,
const FString& InEntityName,
const bool bAllowEmpty =
false);
429 bool CheckEntity(
const FString& InEntityName,
const bool bAllowEmpty =
false);
431 bool CheckSpawnableEntity(
const FString& InEntityName,
const bool bAllowEmpty =
false);
433 virtual FROSSpawnEntityRes SpawnEntityImpl(FROSSpawnEntityReq& InRequest);