20 : Super(ObjectInitializer)
22 PrimaryActorTick.bCanEverTick =
true;
23 RandomEngine = CreateDefaultSubobject<URandomEngine>(TEXT(
"RandomEngine"));
33 Super::Set(ActorDescription);
41 FVector ActorLocation = GetActorLocation();
63 #if defined(WITH_ROS2)
65 if (ROS2->IsEnabled())
67 TRACE_CPUPROFILER_EVENT_SCOPE_STR(
"ROS2 Send");
69 AActor* ParentActor = GetAttachParentActor();
72 FTransform LocalTransformRelativeToParent = GetActorTransform().GetRelativeTransform(ParentActor->GetActorTransform());
82 TRACE_CPUPROFILER_EVENT_SCOPE_STR(
"AGnssSensor Stream Send");
float GetLongitudeDeviation() const
carla::geom::GeoLocation CurrentGeoReference
float GetAltitudeBias() const
void SetLatitudeDeviation(float Value)
float GetAltitudeDeviation() const
void SetLongitudeBias(float Value)
virtual void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds) override
void SetLongitudeDeviation(float Value)
void SetAltitudeDeviation(float Value)
float GetLatitudeDeviation() const
float GetLongitudeBias() const
void Set(const FActorDescription &ActorDescription)
float GetLatitudeBias() const
void SetAltitudeBias(float Value)
void SetLatitudeBias(float Value)
virtual void BeginPlay() override
static FActorDefinition GetSensorDefinition()
AGnssSensor(const FObjectInitializer &ObjectInitializer)
FVector LocalToGlobalLocation(const FVector &InLocation) const
auto GetToken() const
Return the token that allows subscribing to this sensor's stream.
FAsyncDataStream GetDataStream(const SensorT &Self)
Return the FDataStream associated with this sensor.
URandomEngine * RandomEngine
Random Engine used to provide noise for sensor output.
static void SetGnss(const FActorDescription &Description, AGnssSensor *Gnss)
static FActorDefinition MakeGnssDefinition()
const carla::geom::GeoLocation & GetGeoReference() const
Return the GeoLocation point of the map loaded
static ALargeMapManager * GetLargeMapManager(const UObject *WorldContextObject)
static UCarlaEpisode * GetCurrentEpisode(const UObject *WorldContextObject)
float GetNormalDistribution(float Mean, float StandardDeviation)
GeoLocation Transform(const Location &location) const
Transform the given location to a GeoLocation using this as geo-reference.
static std::shared_ptr< ROS2 > GetInstance()
Serializes a stream endpoint.
const auto & get_stream_id() const
A definition of a Carla Actor with all the variation and attributes.
A description of a Carla Actor with all its variation.