ROS2 odom transform publisher C++ no class no compile

asked 2023-01-13 01:24:09 -0500

billy gravatar image

updated 2023-01-13 01:55:16 -0500

I'm struggling to get a ROS2 transform publisher coded in a way that will at least complie.

I'm porting an old C++ ROS node of mine to ROS2 and it includes an odometry transform publisher. The old ROS node was done without using classes and the ROS2 documentation for tf2_rosshows only how to do it using a constructor: https://docs.ros.org/en/humble/Tutori.... I have found a few questions on this site and on interworld sites with similar issues but the only successful answers are shown with a class implementations. Example here: https://answers.ros.org/question/3605...

Does anyone know how to get a ROS2 odometry transform broadcaster running in C++ without a constructor/classes? Converting this node to class based would be a mountain of work. I'm clearly not a SW person.

Thanks in advance for any help.

edit retag flag offensive close merge delete

Comments

To anyone else with this question: I found no answer after spending a few days trying. I ended up with a node that is partly class based and partly not.

billy gravatar image billy  ( 2023-01-16 15:58:43 -0500 )edit