Go to the documentation of this file.
19 #include "CoreMinimal.h"
21 #include "EngineUtils.h"
31 #include <Msgs/ROS2HitEvent.h>
41 #include "RRROS2HitSensorComponent.generated.h"
80 TopicName = TEXT(
"collisions");
82 MsgClass = UROS2HitEventMsg::StaticClass();
84 PublicationFrequencyHz = 0;
90 void BeginPlay()
override;
114 virtual void BindCallback(UObject* InTargetObject);
127 virtual void OnHit(AActor* SelfActor,
131 FVector NormalImpulse,
133 const FHitResult& Hit,
135 const FString& Name = TEXT(
""));
144 virtual void OnTargetComponentHit(UPrimitiveComponent* HitComp,
148 UPrimitiveComponent* OtherComp,
150 FVector NormalImpulse,
152 const FHitResult& Hit);
161 virtual void OnTargetActorHit(AActor* SelfActor, AActor* OtherActor, FVector NormalImpulse,
const FHitResult& Hit);
177 virtual void SetROS2Msg(UROS2GenericMsg* InMessage)
override;
197 bool bIgnoreSelf =
true;
212 bool IsIgnore(AActor* SelfActor, AActor* OtherActor, UPrimitiveComponent* OtherComp);
virtual void SetROS2Msg(UROS2GenericMsg *InMessage)
Set sensor data to ROS 2 msg. This method should be overwritten by child class.
Definition: RRROS2BaseSensorComponent.h:367
TArray< UObject * > TargetObjects
List of UObject which is whether child class of PrimitiveComponent or Actor.
Definition: RRROS2HitSensorComponent.h:103
Base ROS 2 Sensor Component class. Other sensors class should inherit from this class.
FROSHitEvent Data
Definition: RRROS2HitSensorComponent.h:186
URRROS2HitSensorComponent()
Construct a new URRROS2HitSensorComponent object.
Definition: RRROS2HitSensorComponent.h:74
Publish Hit status with OnActorHit and OnComponentHit.
Definition: RRROS2HitSensorComponent.h:58
Base ROS 2 Sensor Component class. Other sensors class should inherit from this class.
Definition: RRROS2BaseSensorComponent.h:175
TArray< UObject * > IgnoreList
List of object which collide with are ignored.
Definition: RRROS2HitSensorComponent.h:208