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");
virtual void BeginPlay() override
auto GetToken() const
Return the token that allows subscribing to this sensor's stream.
static FActorDefinition GetSensorDefinition()
void SetLatitudeBias(float Value)
float GetLongitudeBias() const
virtual void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds) override
float GetLatitudeBias() const
A definition of a Carla Actor with all the variation and attributes.
carla::geom::GeoLocation CurrentGeoReference
void SetAltitudeDeviation(float Value)
float GetAltitudeDeviation() const
GeoLocation Transform(const Location &location) const
Transform the given location to a GeoLocation using this as geo-reference.
void SetLongitudeBias(float Value)
void SetAltitudeBias(float Value)
float GetLongitudeDeviation() const
static void SetGnss(const FActorDescription &Description, AGnssSensor *Gnss)
A description of a Carla Actor with all its variation.
float GetAltitudeBias() const
const auto & get_stream_id() const
void SetLongitudeDeviation(float Value)
FAsyncDataStream GetDataStream(const SensorT &Self)
Return the FDataStream associated with this sensor.
AGnssSensor(const FObjectInitializer &ObjectInitializer)
static UCarlaEpisode * GetCurrentEpisode(const UObject *WorldContextObject)
static ALargeMapManager * GetLargeMapManager(const UObject *WorldContextObject)
void SetLatitudeDeviation(float Value)
const carla::geom::GeoLocation & GetGeoReference() const
Return the GeoLocation point of the map loaded.
void Set(const FActorDescription &ActorDescription)
static std::shared_ptr< ROS2 > GetInstance()
float GetNormalDistribution(float Mean, float StandardDeviation)
carla::streaming::detail::token_type token_type
FVector LocalToGlobalLocation(const FVector &InLocation) const
static FActorDefinition MakeGnssDefinition()
float GetLatitudeDeviation() const
URandomEngine * RandomEngine
Random Engine used to provide noise for sensor output.