CARLA
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
AAutowareGnssSensor Class Reference

Autoware GNSS sensor ("sensor.other.autoware_gnss"): streams GeoLocation to the client like the regular GNSS sensor, but on the ROS2 side publishes the sensor pose in the map frame (world transform + MGRS offset) as <base>/pose and <base>/pose_with_covariance. More...

#include <AutowareGnssSensor.h>

+ Inheritance diagram for AAutowareGnssSensor:

Public Member Functions

 AAutowareGnssSensor (const FObjectInitializer &ObjectInitializer)
 
float GetAltitudeBias () const
 
float GetAltitudeDeviation () const
 
double GetAltitudeValue () const
 
float GetLatitudeBias () const
 
float GetLatitudeDeviation () const
 
double GetLatitudeValue () const
 
float GetLongitudeBias () const
 
float GetLongitudeDeviation () const
 
double GetLongitudeValue () const
 
void GetMirrorState (carla::multigpu::SensorState &State) const override
 Multi-GPU: the runtime state this sensor starts its next tick from (noise generator, sweep angle, history).
 
bool IsNoiseErrorEnabled () const
 
void LoadMgrsData ()
 
void Set (const FActorDescription &ActorDescription)
 
void SetAltitudeBias (float Value)
 
void SetAltitudeDeviation (float Value)
 
void SetLatitudeBias (float Value)
 
void SetLatitudeDeviation (float Value)
 
void SetLongitudeBias (float Value)
 
void SetLongitudeDeviation (float Value)
 
void SetMirrorState (const carla::multigpu::SensorState &State) override
 
- Public Member Functions inherited from ASensor
bool AreClientsListening ()
 
 ASensor (const FObjectInitializer &ObjectInitializer)
 
void ClearReadyToTick ()
 
std::optional< FActorAttribute > GetAttribute (const FString Name)
 
const UCarlaEpisode & GetEpisode () const
 
URandomEngine * GetRandomEngine ()
 
float GetReadyToTickDeltaSeconds () const
 
int32 GetSeed () const
 
auto GetToken () const
 Return the token that allows subscribing to this sensor's stream.
 
bool IsReadyToTick () const
 
bool IsStreamReady ()
 
FDataStream MoveDataStream ()
 
virtual void OnFirstClientConnected ()
 
virtual void OnLastClientDisconnected ()
 
void PostPhysTickInternal (UWorld *World, ELevelTick TickType, float DeltaSeconds)
 
virtual void PrePhysTick (float DeltaSeconds)
 
void SetDataStream (FDataStream InStream)
 Replace the FDataStream associated with this sensor.
 
void SetEpisode (const UCarlaEpisode &InEpisode)
 
void SetPrimaryTick (float DeltaSeconds)
 Multi-GPU secondary: tick in this engine frame, with the primary's delta.
 
void SetSavingDataToDisk (bool bSavingData)
 
void SetSeed (int32 InSeed)
 
void Tick (const float DeltaTime) final
 

Static Public Member Functions

static FActorDefinition GetSensorDefinition ()
 
- Static Public Member Functions inherited from ASensor
static FSensorCaptureContext MakeCaptureContext (const ASensor &Sensor)
 Call on the game thread right after CaptureScene().
 

Protected Member Functions

virtual void BeginPlay () override
 
virtual void PostPhysTick (UWorld *World, ELevelTick TickType, float DeltaSeconds) override
 
void SetNoiseErrorActive (const bool bEnabled)
 
- Protected Member Functions inherited from ASensor
void EndPlay (EEndPlayReason::Type EndPlayReason) override
 
template<typename SensorType >
FAsyncDataStream GetDataStream (SensorType &&Self)
 Return the FDataStream associated with this sensor.
 
void PostActorCreated () override
 

Private Attributes

float AltitudeBias
 
float AltitudeDeviation
 
double AltitudeValue
 
bool bApplyNoiseError = false
 
carla::geom::GeoProjection CurrentGeoProjection
 
float LatitudeBias
 
float LatitudeDeviation
 
double LatitudeValue
 
float LongitudeBias
 
float LongitudeDeviation
 
double LongitudeValue
 
TObjectPtr< UMgrsDataAsset > MgrsDataAsset = nullptr
 

Additional Inherited Members

- Static Protected Member Functions inherited from ASensor
template<typename SensorType , typename ElementType >
static void SendDataToClient (SensorType &&Sensor, TArrayView< ElementType > SensorData, const FSensorCaptureContext &CaptureContext)
 
- Protected Attributes inherited from ASensor
bool bIsActive = false
 
bool bSavingDataToDisk = false
 
URandomEngine * RandomEngine = nullptr
 Random Engine used to provide noise for sensor output.
 
int32 Seed = 123456789
 Seed of the pseudo-random engine.
 

Detailed Description

Autoware GNSS sensor ("sensor.other.autoware_gnss"): streams GeoLocation to the client like the regular GNSS sensor, but on the ROS2 side publishes the sensor pose in the map frame (world transform + MGRS offset) as <base>/pose and <base>/pose_with_covariance.

Ported from tier4/autoware-support.

Definition at line 27 of file AutowareGnssSensor.h.

Constructor & Destructor Documentation

◆ AAutowareGnssSensor()

AAutowareGnssSensor::AAutowareGnssSensor ( const FObjectInitializer &  ObjectInitializer)

Definition at line 21 of file AutowareGnssSensor.cpp.

References ASensor::RandomEngine.

Member Function Documentation

◆ BeginPlay()

void AAutowareGnssSensor::BeginPlay ( )
overrideprotectedvirtual

◆ GetAltitudeBias()

float AAutowareGnssSensor::GetAltitudeBias ( ) const

Definition at line 193 of file AutowareGnssSensor.cpp.

References AltitudeBias.

◆ GetAltitudeDeviation()

float AAutowareGnssSensor::GetAltitudeDeviation ( ) const

Definition at line 180 of file AutowareGnssSensor.cpp.

References AltitudeDeviation.

◆ GetAltitudeValue()

double AAutowareGnssSensor::GetAltitudeValue ( ) const

Definition at line 208 of file AutowareGnssSensor.cpp.

References AltitudeValue.

◆ GetLatitudeBias()

float AAutowareGnssSensor::GetLatitudeBias ( ) const

Definition at line 185 of file AutowareGnssSensor.cpp.

References LatitudeBias.

◆ GetLatitudeDeviation()

float AAutowareGnssSensor::GetLatitudeDeviation ( ) const

Definition at line 172 of file AutowareGnssSensor.cpp.

References LatitudeDeviation.

◆ GetLatitudeValue()

double AAutowareGnssSensor::GetLatitudeValue ( ) const

Definition at line 198 of file AutowareGnssSensor.cpp.

References LatitudeValue.

◆ GetLongitudeBias()

float AAutowareGnssSensor::GetLongitudeBias ( ) const

Definition at line 189 of file AutowareGnssSensor.cpp.

References LongitudeBias.

◆ GetLongitudeDeviation()

float AAutowareGnssSensor::GetLongitudeDeviation ( ) const

Definition at line 176 of file AutowareGnssSensor.cpp.

References LongitudeDeviation.

◆ GetLongitudeValue()

double AAutowareGnssSensor::GetLongitudeValue ( ) const

Definition at line 203 of file AutowareGnssSensor.cpp.

References LongitudeValue.

◆ GetMirrorState()

void AAutowareGnssSensor::GetMirrorState ( carla::multigpu::SensorState &  State) const
overridevirtual

Multi-GPU: the runtime state this sensor starts its next tick from (noise generator, sweep angle, history).

Override only for sensors whose PostPhysTick runs whether or not anyone listens: the primary's sensor owns the state of a sensor computed by a secondary.

Reimplemented from ASensor.

Definition at line 223 of file AutowareGnssSensor.cpp.

References URandomEngine::GetState(), ASensor::RandomEngine, and State.

◆ GetSensorDefinition()

FActorDefinition AAutowareGnssSensor::GetSensorDefinition ( )
static

◆ IsNoiseErrorEnabled()

bool AAutowareGnssSensor::IsNoiseErrorEnabled ( ) const

Definition at line 213 of file AutowareGnssSensor.cpp.

References bApplyNoiseError.

◆ LoadMgrsData()

void AAutowareGnssSensor::LoadMgrsData ( )

Definition at line 111 of file AutowareGnssSensor.cpp.

References IsValid(), and MgrsDataAsset.

Referenced by BeginPlay().

◆ PostPhysTick()

void AAutowareGnssSensor::PostPhysTick ( UWorld *  World,
ELevelTick  TickType,
float  DeltaSeconds 
)
overrideprotectedvirtual

◆ Set()

void AAutowareGnssSensor::Set ( const FActorDescription &  ActorDescription)
virtual

Reimplemented from ASensor.

Definition at line 136 of file AutowareGnssSensor.cpp.

References UActorBlueprintFunctionLibrary::SetAutowareGnss().

◆ SetAltitudeBias()

void AAutowareGnssSensor::SetAltitudeBias ( float  Value)

Definition at line 167 of file AutowareGnssSensor.cpp.

References AltitudeBias.

Referenced by UActorBlueprintFunctionLibrary::SetAutowareGnss().

◆ SetAltitudeDeviation()

void AAutowareGnssSensor::SetAltitudeDeviation ( float  Value)

◆ SetLatitudeBias()

void AAutowareGnssSensor::SetLatitudeBias ( float  Value)

Definition at line 157 of file AutowareGnssSensor.cpp.

References LatitudeBias.

Referenced by UActorBlueprintFunctionLibrary::SetAutowareGnss().

◆ SetLatitudeDeviation()

void AAutowareGnssSensor::SetLatitudeDeviation ( float  Value)

◆ SetLongitudeBias()

void AAutowareGnssSensor::SetLongitudeBias ( float  Value)

Definition at line 162 of file AutowareGnssSensor.cpp.

References LongitudeBias.

Referenced by UActorBlueprintFunctionLibrary::SetAutowareGnss().

◆ SetLongitudeDeviation()

void AAutowareGnssSensor::SetLongitudeDeviation ( float  Value)

◆ SetMirrorState()

void AAutowareGnssSensor::SetMirrorState ( const carla::multigpu::SensorState &  State)
overridevirtual

Reimplemented from ASensor.

Definition at line 231 of file AutowareGnssSensor.cpp.

References ASensor::RandomEngine, URandomEngine::SetState(), and State.

◆ SetNoiseErrorActive()

void AAutowareGnssSensor::SetNoiseErrorActive ( const bool  bEnabled)
protected

Definition at line 218 of file AutowareGnssSensor.cpp.

References bApplyNoiseError.

Member Data Documentation

◆ AltitudeBias

float AAutowareGnssSensor::AltitudeBias
private

Definition at line 93 of file AutowareGnssSensor.h.

Referenced by GetAltitudeBias(), PostPhysTick(), and SetAltitudeBias().

◆ AltitudeDeviation

float AAutowareGnssSensor::AltitudeDeviation
private

Definition at line 89 of file AutowareGnssSensor.h.

Referenced by GetAltitudeDeviation(), PostPhysTick(), and SetAltitudeDeviation().

◆ AltitudeValue

double AAutowareGnssSensor::AltitudeValue
private

Definition at line 97 of file AutowareGnssSensor.h.

Referenced by GetAltitudeValue(), and PostPhysTick().

◆ bApplyNoiseError

bool AAutowareGnssSensor::bApplyNoiseError = false
private

Definition at line 85 of file AutowareGnssSensor.h.

Referenced by IsNoiseErrorEnabled(), PostPhysTick(), and SetNoiseErrorActive().

◆ CurrentGeoProjection

carla::geom::GeoProjection AAutowareGnssSensor::CurrentGeoProjection
private

Definition at line 83 of file AutowareGnssSensor.h.

Referenced by BeginPlay(), and PostPhysTick().

◆ LatitudeBias

float AAutowareGnssSensor::LatitudeBias
private

Definition at line 91 of file AutowareGnssSensor.h.

Referenced by GetLatitudeBias(), PostPhysTick(), and SetLatitudeBias().

◆ LatitudeDeviation

float AAutowareGnssSensor::LatitudeDeviation
private

Definition at line 87 of file AutowareGnssSensor.h.

Referenced by GetLatitudeDeviation(), PostPhysTick(), and SetLatitudeDeviation().

◆ LatitudeValue

double AAutowareGnssSensor::LatitudeValue
private

Definition at line 95 of file AutowareGnssSensor.h.

Referenced by GetLatitudeValue(), and PostPhysTick().

◆ LongitudeBias

float AAutowareGnssSensor::LongitudeBias
private

Definition at line 92 of file AutowareGnssSensor.h.

Referenced by GetLongitudeBias(), PostPhysTick(), and SetLongitudeBias().

◆ LongitudeDeviation

float AAutowareGnssSensor::LongitudeDeviation
private

Definition at line 88 of file AutowareGnssSensor.h.

Referenced by GetLongitudeDeviation(), PostPhysTick(), and SetLongitudeDeviation().

◆ LongitudeValue

double AAutowareGnssSensor::LongitudeValue
private

Definition at line 96 of file AutowareGnssSensor.h.

Referenced by GetLongitudeValue(), and PostPhysTick().

◆ MgrsDataAsset

TObjectPtr<UMgrsDataAsset> AAutowareGnssSensor::MgrsDataAsset = nullptr
private

Definition at line 81 of file AutowareGnssSensor.h.

Referenced by LoadMgrsData(), and PostPhysTick().


The documentation for this class was generated from the following files: