CARLA
CarlaCollisionPublisher.h
Go to the documentation of this file.
1 // Copyright (c) 2022 Computer Vision Center (CVC) at the Universitat Autonoma de Barcelona (UAB).
2 // This work is licensed under the terms of the MIT license.
3 // For a copy, see <https://opensource.org/licenses/MIT>.
4 
5 #pragma once
6 #define _GLIBCXX_USE_CXX11_ABI 0
7 
8 #include <memory>
9 #include <vector>
10 
11 #include "CarlaPublisher.h"
12 
13 namespace carla {
14 namespace ros2 {
15 
16  struct CarlaCollisionPublisherImpl;
17 
19  public:
20  CarlaCollisionPublisher(const char* ros_name = "", const char* parent = "");
26 
27  bool Init();
28  bool Publish();
29  void SetData(int32_t seconds, uint32_t nanoseconds, uint32_t actor_id, float x, float y, float z);
30  const char* type() const override { return "collision"; }
31 
32  private:
33  void SetData(int32_t seconds, uint32_t nanoseconds, uint32_t actor_id, std::vector<float>&& data);
34 
35  private:
36  std::shared_ptr<CarlaCollisionPublisherImpl> _impl;
37  };
38 }
39 }
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
CarlaCollisionPublisher & operator=(const CarlaCollisionPublisher &)
const std::string & parent() const
std::shared_ptr< CarlaCollisionPublisherImpl > _impl
void SetData(int32_t seconds, uint32_t nanoseconds, uint32_t actor_id, float x, float y, float z)
CarlaCollisionPublisher(const char *ros_name="", const char *parent="")