Skip to content

Commit d2f9e0d

Browse files
committed
use rclcpp::get_message_typesupport_handle instead of deprecated rclcpp::get_typesupport_handle
Signed-off-by: Dominik Authaler <dominik.authaler@uni-ulm.de>
1 parent 82b9d41 commit d2f9e0d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/TopicPublisherROS2/generic_publisher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class GenericPublisher : public rclcpp::PublisherBase
5050
{
5151

5252
auto library = std::move(rclcpp::get_typesupport_library(topic_type, "rosidl_typesupport_cpp"));
53-
auto type_support = rclcpp::get_typesupport_handle(topic_type, "rosidl_typesupport_cpp", *library);
53+
auto type_support = rclcpp::get_message_typesupport_handle(topic_type, "rosidl_typesupport_cpp", *library);
5454

5555
return std::make_shared<GenericPublisher>(node.get_node_base_interface().get(), topic_name, *type_support);
5656
}

src/ros_parsers/ros2_parser.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ std::string CreateSchema(const std::string& base_type)
4444
auto addTypeToSchema = [&](const std::string& type_name, bool add_header)
4545
{
4646
auto introspection_library = rclcpp::get_typesupport_library(type_name, "rosidl_typesupport_introspection_cpp");
47-
auto introspection_support = rclcpp::get_typesupport_handle(type_name, "rosidl_typesupport_introspection_cpp",
48-
*introspection_library);
47+
auto introspection_support = rclcpp::get_message_typesupport_handle(
48+
type_name, "rosidl_typesupport_introspection_cpp", *introspection_library);
4949

5050
if (add_header)
5151
{
@@ -148,12 +148,12 @@ TopicInfo CreateTopicInfo(const std::string& topic_name, const std::string& type
148148
info.type = type_name;
149149

150150
info.introspection_library = rclcpp::get_typesupport_library(type_name, "rosidl_typesupport_introspection_cpp");
151-
info.introspection_support = rclcpp::get_typesupport_handle(type_name, "rosidl_typesupport_introspection_cpp",
152-
*info.introspection_library);
151+
info.introspection_support = rclcpp::get_message_typesupport_handle(type_name, "rosidl_typesupport_introspection_cpp",
152+
*info.introspection_library);
153153

154154
auto identifier = rosidl_typesupport_cpp::typesupport_identifier;
155155
info.support_library = rclcpp::get_typesupport_library(type_name, identifier);
156-
info.type_support = rclcpp::get_typesupport_handle(type_name, identifier, *info.support_library);
156+
info.type_support = rclcpp::get_message_typesupport_handle(type_name, identifier, *info.support_library);
157157

158158
info.has_header_stamp = TypeHasHeader(info.introspection_support);
159159
return info;

0 commit comments

Comments
 (0)