Skip to content

tf2::fromMsg / tf2::toMsg can compile with undefined symbols #791

@dvdmc

Description

@dvdmc

Operating System:

Ubuntu 22.04

ROS version or commit hash:

Jazzy

Steps to reproduce issue

  1. Use tf2::toMsg with a geometry_msgs::msg::PoseStamped as first parameter and tf2::Transform or the oposite (Pose and tf2::Stampedtf2::Transform), which are not defined templates in tf2_geometry_msgs/tf2_geometry_msgs.hpp

Expected behavior

The compiler should complain but doesn't, probably due to the declaration of a template for tf2::fromMsg but I am missing background on this library to be sure :)

Actual behavior

The compiler doesn't complain.
Got:

undefined symbol: _ZN3tf27fromMsgIN13geometry_msgs3msg10Transform_ISaIvEEEKNS_9TransformEEEvRKT_RT0_ 
[ros2run]: Process exited with failure 127 

Additional information

Maybe this is a problem with my specific compiler or system but, in case that another user experiences this issue, make sure you are using a specialized template inside tf2_geometry_msgs/tf2_geometry_msgs.hpp

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions