RapyutaSimulationPlugins
RR2DLidarComponent.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 
16 
17 // UE
18 
19 #include "Components/LineBatchComponent.h"
20 
21 #include "CoreMinimal.h"
22 
23 #include "GameFramework/Actor.h"
24 
25 #include "Kismet/KismetMathLibrary.h"
26 
27 #include "PhysicalMaterials/PhysicalMaterial.h"
28 
29 
30 
31 // rclUE
32 
33 #include "Msgs/ROS2LaserScan.h"
34 
35 
36 
37 // RapyutaSimulationPlugins
38 
40 
41 
42 
43 // Others
44 
45 #include <limits>
46 
47 
48 
49 #include "RR2DLidarComponent.generated.h"
50 
51 
52 
74 class RAPYUTASIMULATIONPLUGINS_API URR2DLidarComponent : public URRBaseLidarComponent
75 
76 {
77 
78 
79 
80 public:
81 
91 
92 
93 
110  virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
111 
112 
113 
124  void Run() override;
125 
126 
127 
144  void SensorUpdate() override;
145 
146 
147 
160  bool Visible(AActor* TargetActor) override;
161 
162 
163 
164 
181  FROSLaserScan GetROS2Data();
182 
183 
184 
195  virtual void SetROS2Msg(UROS2GenericMsg* InMessage) override;
196 
197 
198 
199 
204  float GetMinAngleRadians() const;
205 
206 
207 
208 
213  float GetMaxAngleRadians() const;
214 
215 };
216 
URR2DLidarComponent
ROS 2 2D lidar components.
Definition: RR2DLidarComponent.h:74
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
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.