[geometry_msgs] Workaround for #430#431
Conversation
all fromMsg/toMsg overloads have to be defined before <tf2/convert.h> is included. So only the forward declarations are included.
|
C++ includes should be independent of the include order. |
|
TL;DR Please a look at my branch. I converted all template<class A, class B> B& toMsg(const A&, B&);For converting two non-Message types (lets say template<>
struct commonMsgType<tf2::Vector3, Eigen::Vector3> {
using type = geometry_msgs::Point;
};This struct is then read by Please note that this branch is more or less a proof of concept, so documentation and tests are missing. I'm happy to contine, but please let me know whether this solution fits your needs. |
|
replaced by #491 |
…_pose_with_covariance_stamped (ros#453) * -Fixed the issue of covariance not being transformed in do_transform_pose_with_covariance_stamped, corresponding to ros2/geometry2#431 and made the same changes as the C++ API Co-authored-by: Abrar Rahman Protyasha <aprotyas@u.rochester.edu>
Workaround for #430. Snippet now compiles (with convert.h included last)
Note that it still depends on the include order, if convert.h is included first it does not work (compiler picks forward declaration of templated
fromMsgwhich is not resolved later on).