diff --git a/LibCarla/source/carla/road/Lane.cpp b/LibCarla/source/carla/road/Lane.cpp index f90095f19..98e202563 100644 --- a/LibCarla/source/carla/road/Lane.cpp +++ b/LibCarla/source/carla/road/Lane.cpp @@ -255,7 +255,7 @@ namespace road { // is the exact height that match with most of the RoadRunner sidewalks dp_r.location.z += 0.1524f; dp_l.location.z += 0.1524f; - /// TODO: use the OpenDRIVE 5.3.7.2.1.1.9 Lane Height Record + /// @TODO: use the OpenDRIVE 5.3.7.2.1.1.9 Lane Height Record } return std::make_pair(dp_r.location, dp_l.location); diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/InertialMeasurementUnit.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/InertialMeasurementUnit.cpp index c1d69aed1..f340a8915 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/InertialMeasurementUnit.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/InertialMeasurementUnit.cpp @@ -32,6 +32,7 @@ AInertialMeasurementUnit::AInertialMeasurementUnit( // Initialized to something hight to minimize the artifacts // when the initial values are unknown PrevDeltaTime = std::numeric_limits::max(); + OldTransform = GetActorTransform(); } FActorDefinition AInertialMeasurementUnit::GetSensorDefinition() @@ -39,6 +40,10 @@ FActorDefinition AInertialMeasurementUnit::GetSensorDefinition() return UActorBlueprintFunctionLibrary::MakeIMUDefinition(); } +const FTransform &AInertialMeasurementUnit::GetSyncActorTransform() const { + return OldTransform; +} + void AInertialMeasurementUnit::Set(const FActorDescription &ActorDescription) { Super::Set(ActorDescription); @@ -187,6 +192,9 @@ void AInertialMeasurementUnit::Tick(float DeltaTime) ComputeAccelerometer(DeltaTime), ComputeGyroscope(), ComputeCompass()); + + // TODO: delete once the new tick pipeline is done + OldTransform = GetActorTransform(); } void AInertialMeasurementUnit::SetAccelerationStandardDeviation(const FVector &Vec) @@ -222,6 +230,4 @@ const FVector &AInertialMeasurementUnit::GetGyroscopeBias() const void AInertialMeasurementUnit::BeginPlay() { Super::BeginPlay(); - - constexpr float TO_METERS = 1e-2; } diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/InertialMeasurementUnit.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/InertialMeasurementUnit.h index 1aa622d72..6861af4bc 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/InertialMeasurementUnit.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/InertialMeasurementUnit.h @@ -30,6 +30,9 @@ public: static FActorDefinition GetSensorDefinition(); + /// @TODO: delete once the new tick pipeline is done + const FTransform &GetSyncActorTransform() const override; + void Set(const FActorDescription &ActorDescription) override; void SetOwner(AActor *Owner) override; @@ -68,6 +71,9 @@ public: private: + /// @TODO: delete once the new tick pipeline is done + FTransform OldTransform; + void BeginPlay() override; /// Standard deviation for acceleration settings. diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.cpp index ea37673d8..48d2a2b0e 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.cpp @@ -511,6 +511,7 @@ void ASceneCaptureSensor::Tick(float DeltaTime) ReadyToCapture = true; + // TODO: delete once the new tick pipeline is done OldTransform = GetActorTransform(); } diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.h index 7415add01..a6625784d 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/SceneCaptureSensor.h @@ -34,14 +34,14 @@ class CARLA_API ASceneCaptureSensor : public ASensor private: - /// TODO: delete once the new tick pipeline is done + /// @TODO: delete once the new tick pipeline is done FTransform OldTransform; public: ASceneCaptureSensor(const FObjectInitializer &ObjectInitializer); - /// TODO: delete once the new tick pipeline is done + /// @TODO: delete once the new tick pipeline is done const FTransform &GetSyncActorTransform() const override; void Set(const FActorDescription &ActorDescription) override; diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/WorldObserver.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/WorldObserver.h index 2d81576bc..7bad14e3f 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/WorldObserver.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/WorldObserver.h @@ -39,7 +39,7 @@ public: bool PendingLightUpdate); /// Dummy. Required for compatibility with other sensors only. - /// TODO: raname to 'GetActorTransform' once the new tick pipeline is done + /// @TODO: raname to 'GetActorTransform' once the new tick pipeline is done FTransform GetSyncActorTransform() const { return {};