Using tf2 in ROS2 with pure C?
This is from the context of a client library that relies on rcl
, but I guess it would apply to anyone trying to program only in C. My current version is foxy
.
I'm looking to provide a binding to tf2
, at least partially. I can successfully transform single points by means of copying the data to a Vector3Stamped
. This does not seem however very efficient or generalizable if one wants to transform larger/arbitrary messages. So my questions are:
1) Is there any provision or expectation for using tf2
without C++/Python?
2) My understanding is that the C and C++ typesupports aren't compatible, in the sense that I cannot cast a pointer to a C message into the equivalent C++ message, to transform it in a thin layer of C++ and back. Is this correct?
3) Finally, assuming there's no way around using C++ with C++ typesupports, what do you think would be the simplest/most efficient way of achieving transformations of large/new messages? Wrapping the C messages in a C++ type with toMsg
/fromMsg
functions? Would that inevitably involve copying the data?
Thanks for any guidance!