CARLA
Loading...
Searching...
No Matches
AutowareGnssSensor.h
Go to the documentation of this file.
1// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
10
14
18
19#include "AutowareGnssSensor.generated.h"
20
21/// Autoware GNSS sensor ("sensor.other.autoware_gnss"): streams GeoLocation
22/// to the client like the regular GNSS sensor, but on the ROS2 side publishes
23/// the sensor pose in the map frame (world transform + MGRS offset) as
24/// <base>/pose and <base>/pose_with_covariance. Ported from
25/// tier4/autoware-support.
26UCLASS()
27class CARLA_API AAutowareGnssSensor : public ASensor
28{
29 GENERATED_BODY()
30
31public:
32
33 AAutowareGnssSensor(const FObjectInitializer &ObjectInitializer);
34
35 static FActorDefinition GetSensorDefinition();
36
37 void Set(const FActorDescription &ActorDescription);
38
39 void GetMirrorState(carla::multigpu::SensorState &State) const override;
40
41 void SetMirrorState(const carla::multigpu::SensorState &State) override;
42
43 void SetLatitudeDeviation(float Value);
44 void SetLongitudeDeviation(float Value);
45 void SetAltitudeDeviation(float Value);
46
47 void SetLatitudeBias(float Value);
48 void SetLongitudeBias(float Value);
49 void SetAltitudeBias(float Value);
50
51 float GetLatitudeDeviation() const;
52 float GetLongitudeDeviation() const;
53 float GetAltitudeDeviation() const;
54
55 float GetLatitudeBias() const;
56 float GetLongitudeBias() const;
57 float GetAltitudeBias() const;
58
59 double GetLatitudeValue() const;
60 double GetLongitudeValue() const;
61 double GetAltitudeValue() const;
62
63 UFUNCTION(BlueprintCallable)
64 bool IsNoiseErrorEnabled() const;
65
66 UFUNCTION(BlueprintCallable)
67 void LoadMgrsData();
68
69protected:
70
71 virtual void BeginPlay() override;
72
73 virtual void PostPhysTick(UWorld *World, ELevelTick TickType, float DeltaSeconds) override;
74
75 UFUNCTION(BlueprintCallable)
76 void SetNoiseErrorActive(const bool bEnabled);
77
78private:
79
80 UPROPERTY()
81 TObjectPtr<UMgrsDataAsset> MgrsDataAsset = nullptr;
82
83 carla::geom::GeoProjection CurrentGeoProjection;
84
85 bool bApplyNoiseError = false;
86
87 float LatitudeDeviation;
88 float LongitudeDeviation;
89 float AltitudeDeviation;
90
91 float LatitudeBias;
92 float LongitudeBias;
93 float AltitudeBias;
94
95 double LatitudeValue;
96 double LongitudeValue;
97 double AltitudeValue;
98};
Autoware GNSS sensor ("sensor.other.autoware_gnss"): streams GeoLocation to the client like the regul...
Data Asset containing MGRS-related configuration for Autoware maps.
This file contains definitions of common data structures used in traffic manager.
A definition of a Carla Actor with all the variation and attributes.
A description of a Carla Actor with all its variation.
One record of frame data packet 27: the runtime state a sensor of the primary starts this frame's tic...
Definition sensorSync.h:87