ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The error message explains the problem, although it takes a bit of experience to understand what it means.

The error message says that you have declared odom_broadcaster as a tf::TransformBroadcaster pointer. If so, then you need to call the sendTransform method using pointer-syntax:

odom_broadcaster->sendTransform(odom_trans)

Note that the tutorial you referenced declares odom_broadcaster as an object, not a pointer, so won't have the issue you're seeing. Check to make sure you've followed the tutorial correctly.

The error message explains the problem, although it takes a bit of experience to understand what it means.

The error message says that you have declared odom_broadcaster as a tf::TransformBroadcaster pointer. If so, then you need to call the sendTransform method using pointer-syntax:

odom_broadcaster->sendTransform(odom_trans)

Note that the tutorial you referenced declares odom_broadcaster as an object, not a pointer, so won't have the issue you're seeing. Check to make sure you've followed the tutorial correctly.

Edit:
The new error message you're reporting (undefined reference...) is a linker error. Make sure that you have a reference to the tf package in your manifest.xml/package.xml and CMakeLists.txt. The appropriate syntax depends on whether you're using catkin_make or rosmake. Have you tried following the initial tf tutorials here? The create_pkg command in Step 1 should have created the appropriate dependencies in your package.xml file. Check to make sure there's a tf dependency listed. If using catkin, make sure you have added the line:

target_link_libraries(turtle_tf_broadcaster ${catkin_LIBRARIES})

Also, it's not specified in the tutorial, but you probably also need an additional line in CMakeLists.txt to add the tf package as a catkin component, as explained here:

find_package(catkin REQUIRED COMPONENTS tf)