diff --git a/LibCarla/source/carla/geom/GeoLocation.h b/LibCarla/source/carla/geom/GeoLocation.h index 3df6b2a96..f74eff986 100644 --- a/LibCarla/source/carla/geom/GeoLocation.h +++ b/LibCarla/source/carla/geom/GeoLocation.h @@ -58,26 +58,23 @@ namespace geom { } // ========================================================================= - /// @todo The following is copy-pasted from MSGPACK_DEFINE_ARRAY. - /// This is a workaround for an issue in msgpack library. The - /// MSGPACK_DEFINE_ARRAY macro is shadowing our `z` variable. - /// https://github.com/msgpack/msgpack-c/issues/709 + // -- Pack / Unpack GeoLocation -------------------------------------------- // ========================================================================= template void msgpack_pack(Packer& pk) const { - clmdep_msgpack::type::make_define_array(latitude, longitude, altitude).msgpack_pack(pk); + clmdep_msgpack::type::make_define_array( + latitude, + longitude, + altitude).msgpack_pack(pk); } void msgpack_unpack(clmdep_msgpack::object const& o) { - clmdep_msgpack::type::make_define_array(latitude, longitude, altitude).msgpack_unpack(o); + clmdep_msgpack::type::make_define_array( + latitude, + longitude, + altitude).msgpack_unpack(o); } - template - void msgpack_object(MSGPACK_OBJECT* o, clmdep_msgpack::zone& sneaky_variable_that_shadows_z) const - { - clmdep_msgpack::type::make_define_array(latitude, longitude, altitude).msgpack_object(o, sneaky_variable_that_shadows_z); - } - // ========================================================================= }; diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/GnssSensor.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/GnssSensor.cpp index 3387c9582..1610c517f 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/GnssSensor.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/GnssSensor.cpp @@ -27,8 +27,6 @@ FActorDefinition AGnssSensor::GetSensorDefinition() void AGnssSensor::Set(const FActorDescription &ActorDescription) { Super::Set(ActorDescription); - // Fill the parameters that the user requested - // Not currently needed in this sensor UActorBlueprintFunctionLibrary::SetGnss(ActorDescription, this); } @@ -38,7 +36,7 @@ void AGnssSensor::Tick(float DeltaSeconds) carla::geom::Location location = GetActorLocation(); - carla::geom::GeoLocation current_location = CurrentGeoLocation.Transform(location); + carla::geom::GeoLocation current_location = CurrentGeoReference.Transform(location); auto Stream = GetDataStream(*this); float lat_error = RandomEngine->GetNormalDistribution(0.0f, LatitudeDeviation); @@ -117,5 +115,5 @@ void AGnssSensor::BeginPlay() Super::BeginPlay(); const UCarlaEpisode* episode = UCarlaStatics::GetCurrentEpisode(GetWorld()); - CurrentGeoLocation = episode->GetGeoReference(); + CurrentGeoReference = episode->GetGeoReference(); } diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/GnssSensor.h b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/GnssSensor.h index 090f96e62..5a3ad9a6f 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/GnssSensor.h +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/GnssSensor.h @@ -58,7 +58,7 @@ protected: private: - carla::geom::GeoLocation CurrentGeoLocation; + carla::geom::GeoLocation CurrentGeoReference; float LatitudeDeviation; float LongitudeDeviation;