RapyutaSimulationPlugins
RR3DLidarComponent.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 
16 
17 // UE
18 
19 #include "CoreMinimal.h"
20 
21 #include "GameFramework/Actor.h"
22 
23 
24 
25 // rclUE
26 
27 #include "Msgs/ROS2PointCloud2.h"
28 
29 
30 
31 // RapyutaSimulationPlugins
32 
34 
35 
36 
37 #include "RR3DLidarComponent.generated.h"
38 
39 
40 
62 class RAPYUTASIMULATIONPLUGINS_API URR3DLidarComponent : public URRBaseLidarComponent
63 
64 {
65 
66 
67 
68 public:
69 
79 
80 
81 
98  virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
99 
100 
101 
112  void Run() override;
113 
114 
115 
132  void SensorUpdate() override;
133 
134 
135 
148  bool Visible(AActor* TargetActor) override;
149 
150 
151 
167  FROSPointCloud2 GetROS2Data();
168 
169 
170 
181  virtual void SetROS2Msg(UROS2GenericMsg* InMessage) override;
182 
183 
184 
185  // vertical samples
186 
187 
192  int32 NChannelsPerScan = 32;
193 
194 
195 
206  uint64 GetTotalScan() const
207 
208  {
209 
210  return NSamplesPerScan * NChannelsPerScan;
211 
212  }
213 
214 
215 
217 
218 
223  float StartVerticalAngle = -45.f;
224 
225 
226 
228 
229 
234  float FOVVertical = 90.f;
235 
236 
237 
239 
241 
243 
244 
249  bool bOrganizedCloud = false;
250 
251 
252 
254 
255 
260  float DVAngle = 0.f;
261 
262 };
263 
URR3DLidarComponent::GetTotalScan
uint64 GetTotalScan() const
Get the Total Scan object.
Definition: RR3DLidarComponent.h:206
URRROS2BaseSensorComponent::SetROS2Msg
virtual void SetROS2Msg(UROS2GenericMsg *InMessage)
Set sensor data to ROS 2 msg. This method should be overwritten by child class.
Definition: RRROS2BaseSensorComponent.h:367
RRBaseLidarComponent.h
Base ROS 2 LIDAR Component class. Other lidar class should inherit from this class.
URRROS2BaseSensorComponent::SensorUpdate
virtual void SensorUpdate()
Update Sensor data. This method should be overwritten by child class.
Definition: RRROS2BaseSensorComponent.h:348
URR3DLidarComponent
ROS 2 3D lidar components.
Definition: RR3DLidarComponent.h:62
URRBaseLidarComponent::Visible
virtual bool Visible(AActor *TargetActor)
Return true if laser hits the target actor. This method should be overwritten by child class.
Definition: RRBaseLidarComponent.h:103
URRBaseLidarComponent
Base ROS 2 LIDAR Component class. Other lidar class should inherit from this class.
Definition: RRBaseLidarComponent.h:66
URRROS2BaseSensorComponent::Run
virtual void Run()
Start timer to update and publish sensor data by using SetTimer.