Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to allow improved template logic when creating publishers and subscribers #33

Merged

Conversation

gonzodepedro
Copy link
Contributor

This PR adds the functionality to allow the creation of publishers and subscribers using the Protobufe type, instead of a TypeAdapter type, which makes the code more readable.

The user would be able to use this:

publisher_ = this->create_publisher<std_msgs::msg::pb::String>();
subscription = this->create_subscription<std_msgs::msg::pb::String>()

Instead of the old way:

publisher_ = this->create_publisher<std_msgs::msg::typesupport_protobuf_cpp::StringTypeAdapter>()
subscription = this->create_subscription<std_msgs::msg::typesupport_protobuf_cpp::StringTypeAdapter>(

In order to allow for this, a call to the RCLCPP_USING_CUSTOM_TYPE_AS_ROS_MESSAGE_TYPE macro is generated for each of the generated protobuf types along with the required TypeAdapter.

@FlorianReimold FlorianReimold merged commit 7d9ee0b into eclipse-ecal:master Jan 22, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants