CARLA
Loading...
Searching...
No Matches
CarlaGNSSPublisher.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
11#include <cstdint>
12#include <memory>
13
14namespace carla {
15namespace ros2 {
16
17template <typename Traits> class PublisherImpl;
18struct CarlaGnssMsgTraits;
19
20// Publishes sensor_msgs::msg::NavSatFix. Callers pass raw lat/lon/alt as
21// doubles so the publisher header stays clear of carla/geom/*, which pulls
22// MsgPack + Boost via carla/MsgPack.h — neither is on the include path of
23// the carla-ros2-native ExternalProject that compiles these sources.
25public:
26 CarlaGNSSPublisher(std::string base_topic_name, std::string frame_id);
28
31 CarlaGNSSPublisher(CarlaGNSSPublisher &&) noexcept = default;
32 CarlaGNSSPublisher &operator=(CarlaGNSSPublisher &&) noexcept = default;
33
34 bool Publish() override;
35 bool Write(
36 std::int32_t seconds,
37 std::uint32_t nanoseconds,
38 double latitude,
39 double longitude,
40 double altitude);
41
42private:
44};
45
46} // namespace ros2
47} // namespace carla
std::shared_ptr< PublisherImpl< CarlaGnssMsgTraits > > _impl
CarlaGNSSPublisher(const CarlaGNSSPublisher &)=delete
CarlaGNSSPublisher(CarlaGNSSPublisher &&) noexcept=default
CarlaGNSSPublisher & operator=(const CarlaGNSSPublisher &)=delete
bool Write(std::int32_t seconds, std::uint32_t nanoseconds, double latitude, double longitude, double altitude)
This file contains definitions of common data structures used in traffic manager.