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

TransformBroadcaster in tf2 is missing dependency on tf2_msgs #482

Open
christianrauch opened this issue Sep 7, 2020 · 0 comments
Open

Comments

@christianrauch
Copy link

There is no documentation at all on how to create a tf2_ros::TransformBroadcaster inside a ROS2 node.

My best guess is to depend on tf2 and:

#include <tf2_ros/transform_broadcaster.h>
[...]
auto tf_broadcaster = std::make_shared<tf2_ros::TransformBroadcaster>(this->shared_from_this());

which causes a compiler error:

/usr/bin/ld: libMultiWiiNode.so: undefined reference to `rosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<tf2_msgs::msg::TFMessage_<std::allocator<void> > >()'

It turns out that including tf2 is not sufficient and that one also has to include the tf2_msgs dependency manually. The tf2 packages should automatically include all its dependencies, such as tf2_msgs.

@christianrauch christianrauch changed the title TransformBroadcaster in tf2 is missing transient dependency on tf2_msgs TransformBroadcaster in tf2 is missing dependency on tf2_msgs Sep 7, 2020
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

No branches or pull requests

1 participant