|
CARLA
|
#include <InertialMeasurementUnit.h>
Inheritance diagram for AInertialMeasurementUnit:Public Member Functions | |
| AInertialMeasurementUnit (const FObjectInitializer &ObjectInitializer) | |
| carla::geom::Vector3D | ComputeAccelerometer (const float DeltaTime) |
| Accelerometer: measures linear acceleration in m/s^2. | |
| const carla::geom::Vector3D | ComputeAccelerometerNoise (const FVector &Accelerometer) |
| float | ComputeCompass () |
| Magnetometer: orientation with respect to the North in rad. | |
| carla::geom::Vector3D | ComputeGyroscope () |
| Gyroscope: measures angular velocity in rad/sec. | |
| const carla::geom::Vector3D | ComputeGyroscopeNoise (const FVector &Gyroscope) |
| const FVector & | GetAccelerationStandardDeviation () const |
| const carla::geom::Vector3D & | GetAccelerometerValue () const |
| float | GetCompassValue () const |
| const FVector & | GetGyroscopeBias () const |
| const FVector & | GetGyroscopeStandardDeviation () const |
| const carla::geom::Vector3D & | GetGyroscopeValue () 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). | |
| virtual void | PostPhysTick (UWorld *World, ELevelTick TickType, float DeltaTime) override |
| void | Set (const FActorDescription &ActorDescription) override |
| void | SetAccelerationStandardDeviation (const FVector &Vec) |
| void | SetGyroscopeBias (const FVector &Vec) |
| void | SetGyroscopeStandardDeviation (const FVector &Vec) |
| void | SetMirrorState (const carla::multigpu::SensorState &State) override |
| void | SetOwner (AActor *Owner) 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(). | |
Static Public Attributes | |
| static const FVector | CarlaNorthVector |
| Based on OpenDRIVE's lon and lat, North is in (0.0f, -1.0f, 0.0f) | |
Private Member Functions | |
| void | BeginPlay () override |
Private Attributes | |
| carla::geom::Vector3D | AccelerometerValue |
| Accelerometer value calculated after each PostPhysTick. | |
| FVector | BiasGyro |
| Bias for gyroscope settings. | |
| float | CompassValue |
| Magnetometer value calculated after each PostPhysTick. | |
| carla::geom::Vector3D | GyroscopeValue |
| Gyroscope value calculated after each PostPhysTick. | |
| TOptional< FQuat > | MirroredLocalRotation |
| Multi-GPU secondary: the primary IMU's rotation relative to its parent. | |
| float | PrevDeltaTime |
| Used to compute the acceleration. | |
| std::array< FVector, 2 > | PrevLocation |
| Used to compute the acceleration. | |
| FVector | StdDevAccel |
| Standard deviation for acceleration settings. | |
| FVector | StdDevGyro |
| Standard deviation for gyroscope settings. | |
Additional Inherited Members | |
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 |
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. | |
Definition at line 23 of file InertialMeasurementUnit.h.
| AInertialMeasurementUnit::AInertialMeasurementUnit | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 27 of file InertialMeasurementUnit.cpp.
References PrevDeltaTime, PrevLocation, and ASensor::RandomEngine.
|
overrideprivatevirtual |
Reimplemented from ASensor.
Definition at line 283 of file InertialMeasurementUnit.cpp.
| carla::geom::Vector3D AInertialMeasurementUnit::ComputeAccelerometer | ( | const float | DeltaTime | ) |
Accelerometer: measures linear acceleration in m/s^2.
Definition at line 107 of file InertialMeasurementUnit.cpp.
References ComputeAccelerometerNoise(), UCarlaStatics::GetGameMode(), ACarlaGameModeBase::IMUSensorGravity, PrevDeltaTime, and PrevLocation.
Referenced by PostPhysTick().
| const carla::geom::Vector3D AInertialMeasurementUnit::ComputeAccelerometerNoise | ( | const FVector & | Accelerometer | ) |
Definition at line 76 of file InertialMeasurementUnit.cpp.
References URandomEngine::GetNormalDistribution(), ASensor::RandomEngine, and StdDevAccel.
Referenced by ComputeAccelerometer().
| float AInertialMeasurementUnit::ComputeCompass | ( | ) |
Magnetometer: orientation with respect to the North in rad.
Definition at line 177 of file InertialMeasurementUnit.cpp.
References CarlaNorthVector.
Referenced by PostPhysTick().
| carla::geom::Vector3D AInertialMeasurementUnit::ComputeGyroscope | ( | ) |
Gyroscope: measures angular velocity in rad/sec.
Definition at line 154 of file InertialMeasurementUnit.cpp.
References ComputeGyroscopeNoise(), FIMU_GetActorAngularVelocityInRadians(), and MirroredLocalRotation.
Referenced by PostPhysTick().
| const carla::geom::Vector3D AInertialMeasurementUnit::ComputeGyroscopeNoise | ( | const FVector & | Gyroscope | ) |
Definition at line 91 of file InertialMeasurementUnit.cpp.
References BiasGyro, URandomEngine::GetNormalDistribution(), ASensor::RandomEngine, and StdDevGyro.
Referenced by ComputeGyroscope().
| const FVector & AInertialMeasurementUnit::GetAccelerationStandardDeviation | ( | ) | const |
Definition at line 253 of file InertialMeasurementUnit.cpp.
References StdDevAccel.
| const carla::geom::Vector3D & AInertialMeasurementUnit::GetAccelerometerValue | ( | ) | const |
Definition at line 268 of file InertialMeasurementUnit.cpp.
References AccelerometerValue.
| float AInertialMeasurementUnit::GetCompassValue | ( | ) | const |
Definition at line 278 of file InertialMeasurementUnit.cpp.
References CompassValue.
| const FVector & AInertialMeasurementUnit::GetGyroscopeBias | ( | ) | const |
Definition at line 263 of file InertialMeasurementUnit.cpp.
References BiasGyro.
| const FVector & AInertialMeasurementUnit::GetGyroscopeStandardDeviation | ( | ) | const |
Definition at line 258 of file InertialMeasurementUnit.cpp.
References StdDevGyro.
| const carla::geom::Vector3D & AInertialMeasurementUnit::GetGyroscopeValue | ( | ) | const |
Definition at line 273 of file InertialMeasurementUnit.cpp.
References GyroscopeValue.
|
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 304 of file InertialMeasurementUnit.cpp.
References FIMU_ToWorld(), URandomEngine::GetState(), carla::multigpu::ImuHistory::last_delta_seconds, carla::multigpu::ImuHistory::last_location, carla::multigpu::ImuHistory::older_location, PrevDeltaTime, PrevLocation, ASensor::RandomEngine, and State.
|
static |
Definition at line 40 of file InertialMeasurementUnit.cpp.
References UActorBlueprintFunctionLibrary::MakeIMUDefinition().
|
overridevirtual |
Reimplemented from ASensor.
Definition at line 195 of file InertialMeasurementUnit.cpp.
References AccelerometerValue, CompassValue, ComputeAccelerometer(), ComputeCompass(), ComputeGyroscope(), carla::streaming::detail::token_type::get_stream_id(), ASensor::GetDataStream(), carla::ros2::ROS2::GetInstance(), ASensor::GetToken(), GyroscopeValue, and PostPhysTick().
Referenced by PostPhysTick().
|
overridevirtual |
Reimplemented from ASensor.
Definition at line 45 of file InertialMeasurementUnit.cpp.
References UActorBlueprintFunctionLibrary::SetIMU().
| void AInertialMeasurementUnit::SetAccelerationStandardDeviation | ( | const FVector & | Vec | ) |
Definition at line 238 of file InertialMeasurementUnit.cpp.
References StdDevAccel.
Referenced by UActorBlueprintFunctionLibrary::SetIMU().
| void AInertialMeasurementUnit::SetGyroscopeBias | ( | const FVector & | Vec | ) |
Definition at line 248 of file InertialMeasurementUnit.cpp.
References BiasGyro.
Referenced by UActorBlueprintFunctionLibrary::SetIMU().
| void AInertialMeasurementUnit::SetGyroscopeStandardDeviation | ( | const FVector & | Vec | ) |
Definition at line 243 of file InertialMeasurementUnit.cpp.
References StdDevGyro.
Referenced by UActorBlueprintFunctionLibrary::SetIMU().
|
overridevirtual |
Reimplemented from ASensor.
Definition at line 319 of file InertialMeasurementUnit.cpp.
References FIMU_ToLocal(), MirroredLocalRotation, PrevDeltaTime, PrevLocation, ASensor::RandomEngine, URandomEngine::SetState(), and State.
|
override |
Definition at line 51 of file InertialMeasurementUnit.cpp.
|
private |
Accelerometer value calculated after each PostPhysTick.
Definition at line 102 of file InertialMeasurementUnit.h.
Referenced by GetAccelerometerValue(), and PostPhysTick().
|
private |
Bias for gyroscope settings.
Definition at line 90 of file InertialMeasurementUnit.h.
Referenced by ComputeGyroscopeNoise(), GetGyroscopeBias(), and SetGyroscopeBias().
|
static |
Based on OpenDRIVE's lon and lat, North is in (0.0f, -1.0f, 0.0f)
Definition at line 77 of file InertialMeasurementUnit.h.
Referenced by ComputeCompass().
|
private |
Magnetometer value calculated after each PostPhysTick.
Definition at line 108 of file InertialMeasurementUnit.h.
Referenced by GetCompassValue(), and PostPhysTick().
|
private |
Gyroscope value calculated after each PostPhysTick.
Definition at line 105 of file InertialMeasurementUnit.h.
Referenced by GetGyroscopeValue(), and PostPhysTick().
|
private |
Multi-GPU secondary: the primary IMU's rotation relative to its parent.
Definition at line 99 of file InertialMeasurementUnit.h.
Referenced by ComputeGyroscope(), and SetMirrorState().
|
private |
Used to compute the acceleration.
Definition at line 96 of file InertialMeasurementUnit.h.
Referenced by AInertialMeasurementUnit(), ComputeAccelerometer(), GetMirrorState(), and SetMirrorState().
|
private |
Used to compute the acceleration.
Definition at line 93 of file InertialMeasurementUnit.h.
Referenced by AInertialMeasurementUnit(), ComputeAccelerometer(), GetMirrorState(), and SetMirrorState().
|
private |
Standard deviation for acceleration settings.
Definition at line 84 of file InertialMeasurementUnit.h.
Referenced by ComputeAccelerometerNoise(), GetAccelerationStandardDeviation(), and SetAccelerationStandardDeviation().
|
private |
Standard deviation for gyroscope settings.
Definition at line 87 of file InertialMeasurementUnit.h.
Referenced by ComputeGyroscopeNoise(), GetGyroscopeStandardDeviation(), and SetGyroscopeStandardDeviation().