forked from PlotJuggler/plotjuggler-ros-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypesupport_wrapper.cpp
More file actions
34 lines (29 loc) · 1.15 KB
/
typesupport_wrapper.cpp
File metadata and controls
34 lines (29 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "typesupport_wrapper.h"
#include "rosidl_runtime_cpp/message_type_support_decl.hpp"
#ifdef ROS_HUMBLE
#include "rosbag2_cpp/typesupport_helpers.hpp"
#else
#include "rclcpp/typesupport_helpers.hpp"
#endif
namespace wrapper
{
std::shared_ptr<rcpputils::SharedLibrary> get_typesupport_library(const std::string& type,
const std::string& typesupport_identifier)
{
#ifdef ROS_HUMBLE
return rosbag2_cpp::get_typesupport_library(type, typesupport_identifier);
#else
return rclcpp::get_typesupport_library(type, typesupport_identifier);
#endif
}
const rosidl_message_type_support_t* get_message_typesupport_handle(const std::string& type,
const std::string& typesupport_identifier,
std::shared_ptr<rcpputils::SharedLibrary> library)
{
#ifdef ROS_HUMBLE
return rosbag2_cpp::get_typesupport_handle(type, typesupport_identifier, library);
#else
return rclcpp::get_message_typesupport_handle(type, typesupport_identifier, *library);
#endif
}
} // namespace wrapper