Ask Your Question
0

no matching function for call to 'fromMsg(geometry_msgs::TransformStamped_<std::allocator<void> >::_transform_type, tf2::Transform&)' tf2::fromMsg(buffer.lookupTransform(targetFrame, sourceFrame, time).transform, targetFrameTrans);

asked 2015-06-17 04:01:51 -0600

Dben gravatar image

updated 2015-06-17 09:11:39 -0600

Tom Moore gravatar image

Hello,

I am currently trying to cross compile the robot-localization package for a custom made OS with yocto. I managed to cross compile the other dependencies but I got a problem with this one.

I did 2 modifications in the CMakelists.txt from origin, you can see mine here http://pastebin.com/XYy53Cfs.

During compilation, it stops at 70%. I think there is a problem with the tf2-geometry-msgs library. It is included but the issue is in the fromMsg method.

[ 70%] Building CXX object CMakeFiles/ros_filter_utilities.dir/src/ros_filter_utilities.cpp.o

/home/david/Documents/NEOCORTEX-OS/build/tmp/work/armv6-vfp-poky-linux-gnueabi/robot-localization/2.2.1-r0/robot_localization-2.2.1/src/ros_filter_utilities.cpp: In function 'bool RobotLocalization::RosFilterUtilities::lookupTransformSafe(const tf2_ros::Buffer&, const string&, const string&, const ros::Time&, tf2::Transform&)':

/home/david/Documents/NEOCORTEX-OS/build/tmp/work/armv6-vfp-poky-linux-gnueabi/robot-localization/2.2.1-r0/robot_localization-2.2.1/src/ros_filter_utilities.cpp:80:104: error: no matching function for call to 'fromMsg(geometry_msgs::TransformStamped_<std::allocator<void> >::_transform_type, tf2::Transform&)'
     tf2::fromMsg(buffer.lookupTransform(targetFrame, sourceFrame, time).transform, targetFrameTrans);
                                                                                                    ^
/home/david/Documents/NEOCORTEX-OS/build/tmp/work/armv6-vfp-poky-linux-gnueabi/robot-localization/2.2.1-r0/robot_localization-2.2.1/src/ros_filter_utilities.cpp:80:104: note: candidates are:
In file included from /home/david/Documents/NEOCORTEX-OS/build/tmp/work/armv6-vfp-poky-linux-gnueabi/robot-localization/2.2.1-r0/robot_localization-2.2.1/src/ros_filter_utilities.cpp:36:0:

[...]

make: *** [all] Error 2
ERROR: oe_runmake failed
WARNING: exit code 1 from a shell command.

In the cpp file

try
{
 tf2::fromMsg(buffer.lookupTransform(targetFrame, sourceFrame, time).transform, targetFrameTrans);
}

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-06-17 09:21:46 -0600

Tom Moore gravatar image

updated 2015-06-17 09:23:43 -0600

Are you certain you're using the latest release of the tf2_geometry_msgs package (0.5.11)? The method that it's looking for is here. If you're building from source, look at the file tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.h and make sure you see that method.

EDIT: Also, you shouldn't need to modify the CMakeLists.txt file. I've compiled robot_localization on an ARM board (an ODROID U3) and it builds fine.

edit flag offensive delete link more
0

answered 2015-06-19 04:52:53 -0600

Dben gravatar image

Hello, you're completely right, I updated tf2_geometry_msgs to 0.5.11 and it compiling perfectly.

Nevertheless, I still have some concern about the CMakeLists.txt

CMake Error at /home/david/Documents/NEOCORTEX-OS/build/tmp/sysroots/raspberrypi/opt/ros/indigo/share/catkin/cmake/test/tests.cmake:17 (message):
catkin_add_gtest() is not available when tests are not enabled.  The CMake
code should only use it inside a conditional block which checks that testing is enabled:

 if(CATKIN_ENABLE_TESTING)
   catkin_add_gtest(...)
 endif()

And in your package, in all branches,

# Filter base unit tests
catkin_add_gtest(filter_base-test test/test_filter_base.cpp)
target_link_libraries(filter_base-test filter_base ${catkin_LIBRARIES})

if (CATKIN_ENABLE_TESTING)

Pushing the 2 firsts lines under the last one resolves the problem.

You made it on an ODROID, it should be similar for the Raspi then. If it can help, I use catkin 0.6.14 and Yocto 1.6 Dora.

edit flag offensive delete link more

Comments

Good find. I'll add an issue for it. Strangely, it doesn't cause any problems on my system(s).

Tom Moore gravatar imageTom Moore ( 2015-06-20 11:09:14 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-06-17 04:01:51 -0600

Seen: 690 times

Last updated: Jun 19 '15