You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 31, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on May 31, 2025. It is now read-only.
missing symbol on convert(tf2::Quaternion, Eigen::Quaternion) #430
I build moveit and geometry2 from source, importing moveit_commander python module throws an ImportError due to missing symbol. See moveit/moveit1#1785. Reverting #367 fixes the issue.
With HEAD pointed to cd55e45, following snippet (extracted from here) builds fine:
Well, this whole template stuff isn't that easy. I tried adding template<> on each fromMsg() and toMsg() overload (in general the bug also applies to toMsg), but that does not work because one template parameter is the return value toMsg (return values are not taken into account for template parameter deduction). GCC complains:
out.orientation = toMsg(in.getRotation());
^
In file included from /ws_moveit/install/include/tf2/convert.h:35:0,
from /ws_moveit/install/include/tf2_geometry_msgs/tf2_geometry_msgs.h:35,
from test.cpp:3:
/ws_moveit/install/include/tf2/transform_functions.h:90:5: note: candidate: template<class A, class B> B tf2::toMsg(const A&)
B toMsg(const A& a);
^~~~~
/ws_moveit/install/include/tf2/transform_functions.h:90:5: note: template argument deduction/substitution failed:
In file included from test.cpp:3:0:
/ws_moveit/install/include/tf2_geometry_msgs/tf2_geometry_msgs.h:427:43: note: couldn't deduce template parameter ‘B’
out.orientation = toMsg(in.getRotation());
^
possible solutions:
rearrange header includes in tf2_geometry_msgs.h
add forward declarations before includes in tf2_geometry_msgs.h
1 and 2 still rely on the correct order of header includes (tf2_geometry_msgs.h before tf2/convert.h), so these options aren't bullet proof.
Number 3 clutters up the headers but keeps backward compatibility and does not rely on the include order.
Number 4 breaks everything, as toMsg has to be specified manually on each call. Maybe in the next release, the signature could be changed so that every parameter could be deducted.
#433 is ready for a review, downstream projects have to update their A tf2::toMsg(const B&) calls to either A& tf2::toMsg(const B&, A&) or tf2::convert(const B&, A&). The latter one is backwards compatible (except for three-way conversions). @rhaschke moveit melodic-devel compiles with these changes (with moveit_visual_tools updated as well). Should I open a PR for it to make a review easier?
Activity
rhaschke commentedon Nov 28, 2019
Hint: If you can provide a PR (and I believe you can based on your analysis of the issue), the issue has higher chances to be fixed soon.
gleichdick commentedon Nov 28, 2019
Well, this whole template stuff isn't that easy. I tried adding
template<>on eachfromMsg()andtoMsg()overload (in general the bug also applies totoMsg), but that does not work because one template parameter is the return valuetoMsg(return values are not taken into account for template parameter deduction). GCC complains:possible solutions:
geometry2/tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.h
Lines 384 to 395 in 1cbda1e
template<>everything1 and 2 still rely on the correct order of header includes (tf2_geometry_msgs.h before tf2/convert.h), so these options aren't bullet proof.
Number 3 clutters up the headers but keeps backward compatibility and does not rely on the include order.
Number 4 breaks everything, as
toMsghas to be specified manually on each call. Maybe in the next release, the signature could be changed so that every parameter could be deducted.gleichdick commentedon Feb 10, 2020
#433 is ready for a review, downstream projects have to update their
A tf2::toMsg(const B&)calls to eitherA& tf2::toMsg(const B&, A&)ortf2::convert(const B&, A&). The latter one is backwards compatible (except for three-way conversions).@rhaschke moveit melodic-devel compiles with these changes (with moveit_visual_tools updated as well). Should I open a PR for it to make a review easier?
`tf2_geometry_msgs`: Fixing covariance transformation in `doTransform…
sloretz commentedon May 31, 2025
ROS 1 is end-of-life (EOL) as of today, May 31st 2025. I am archiving this repository because:
If you still rely on ROS 1, read this page to learn about your options.