RapyutaSimulationPlugins
RRPoseSensorManager.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 
16 
17 // UE
18 
19 #include "CoreMinimal.h"
20 
21 
22 
23 // RapyutaSimulationPlugins
24 
25 #include "Core/RRActorCommon.h"
26 
28 
29 #include "Tools/SimulationState.h"
30 
31 
32 
33 #include "RRPoseSensorManager.generated.h"
34 
35 
36 
48 enum class ERRRefActorSelectMode : uint8
49 
50 {
51 
52  MANUAL ,
53 
54  AUTO ,
55 
56 };
57 
58 
59 
79 class RAPYUTASIMULATIONPLUGINS_API URRPoseSensorManager : public URRROS2EntityStateSensorComponent
80 
81 {
82 
83 
84 
85 public:
86 
94 
95 
96 
98 
99 
104  ASimulationState* ServerSimState = nullptr;
105 
106 
107 
120  virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
121 
122 
123 
148  virtual void InitalizeWithROS2(UROS2NodeComponent* InROS2Node,
149 
150  const FString& InPublisherName = EMPTY_STR,
151 
152  const FString& InTopicName = EMPTY_STR,
153 
154  const UROS2QoS InQoS = UROS2QoS::SensorData) override;
155 
156 
157 
166  virtual void SensorUpdate() override;
167 
168 
169 
181  virtual void UpdateReferenceActorWithTag();
182 
183 
184 
186 
187 
192  FString ReferenceTag = URRActorCommon::MAP_ORIGIN_TAG;
193 
194 
195 
197 
198 
204 
205 
206 
208 
209 
214  FString MapFrameId = URRActorCommon::MAP_ROS_FRAME_ID;
215 
216 
217 
219 
220 
225  URRROS2EntityStateSensorComponent* MapOriginPoseSensor = nullptr;
226 
227 
228 
229 protected:
230 
237  virtual void OnComponentCreated() override;
238 
239 };
240 
EMPTY_STR
#define EMPTY_STR
Definition: RRGeneralUtils.h:43
URRPoseSensorManager
Robot pose sensor manager which has two URRROS2EntityStateSensorComponent which publishes.
Definition: RRPoseSensorManager.h:79
ASimulationState
Provide ROS 2 interface implementations to interact with UE4.
Definition: SimulationState.h:173
URRActorCommon::MAP_ORIGIN_TAG
static constexpr const TCHAR * MAP_ORIGIN_TAG
Definition: RRActorCommon.h:1217
SimulationState.h
SimulationState class provides ROS 2 interface implementation to interact with UE4.
RRROS2EntityStateSensorComponent.h
EntityState sensor components which publish entitystate relative to a specific actor.
ERRAIRobotMode::MANUAL
@ MANUAL
UMETA(DisplayName = "Manual"),.
URRROS2BaseSensorComponent::InitalizeWithROS2
virtual void InitalizeWithROS2(UROS2NodeComponent *InROS2Node, const FString &InPublisherName=TEXT(""), const FString &InTopicName=TEXT(""), const UROS2QoS InQoS=UROS2QoS::SensorData)
Create and initialize publisher and start sensor update by calling.
URRROS2EntityStateSensorComponent
EntityState sensor components which publish entitystate relative to a specific actor.
Definition: RRROS2EntityStateSensorComponent.h:62
RRActorCommon.h
Asset utils.
ERRRefActorSelectMode::AUTO
@ AUTO
UMETA(DisplayName = "Auto")
URRActorCommon::MAP_ROS_FRAME_ID
static constexpr const TCHAR * MAP_ROS_FRAME_ID
Definition: RRActorCommon.h:1219
ERRRefActorSelectMode
ERRRefActorSelectMode
Reference actor selection mode. AUTO means it is automatically updated to the nearlest actor along Z ...
Definition: RRPoseSensorManager.h:48
URRROS2EntityStateSensorComponent::SensorUpdate
virtual void SensorUpdate() override
Calculate relative pose with URRGeneralUtils and update Data.