AGX Dynamics  2.38.0.2
var/agx-dependencies/agx_dependencies_240131_ubuntu_20.04_64/include/agx-nt-ros2/Publisher.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2023. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
19 // AGX Networking Toolbox includes.
22 #include "agx-nt-ros2/Qos.h"
23 
24 // Standard library includes.
25 #include <memory>
26 #include <string>
27 
28 
29 namespace agxROS2
30 {
31  struct DdsPublisherTypes;
32 }
33 
34 #ifdef _MSC_VER
35 # pragma warning(push)
36 # pragma warning(disable: 4251) // Disable warnings about members needing dll interface.
37 #endif
38 
39 namespace agxROS2
40 {
44  template <typename TMsg>
46  {
47  public:
54  Publisher(const std::string& topic, const QOS& qos = QOS(), int8_t inDomainId = 0);
55  ~Publisher();
56 
61  void sendMessage(const TMsg& msg);
62 
63  private:
64  void init(const std::string& topic, const QOS& qos);
65 
66  std::unique_ptr<DdsPublisherTypes> ddsTypes;
67  std::string typeName;
68  int8_t domainId{ 0 };
69  };
70 }
71 
72 
73 //
74 // Predefined publisher types.
75 //
76 
77 namespace agxROS2
78 {
79  namespace agxMsgs
80  {
83  }
84 
85  namespace builtinInterfaces
86  {
89  }
90 
91  namespace rosgraphMsgs
92  {
94  }
95 
96  namespace stdMsgs
97  {
126  }
127 
128  namespace geometryMsgs
129  {
159  }
160 
161  namespace sensorMsgs
162  {
190  }
191 }
192 
193 #ifdef _MSC_VER
194 # pragma warning(pop)
195 #endif
AGXNTROS2_EXPORT
#define AGXNTROS2_EXPORT
Definition: agx-nt-ros2_export.h:34
Qos.h
agx-nt-ros2_export.h
MessageTypes.h
agxROS2::QOS
Struct containing Quality of Service (QOS) settings.
Definition: var/agx-dependencies/agx_dependencies_240131_ubuntu_20.04_64/include/agx-nt-ros2/Qos.h:56
agx::init
void AGXPHYSICS_EXPORT init()
Initialize AGX Dynamics API including thread resources and must be executed before using the AGX API.
agxROS2
Definition: agxROS2/export.h:46
agxROS2::Publisher
Publisher class that enables sending ROS2 messages.
Definition: var/agx-dependencies/agx_dependencies_240131_ubuntu_20.04_64/include/agx-nt-ros2/Publisher.h:45