Description
System info: ROS2 Humble / Ubuntu 22.04; Mamba env using Python 3.10
I was getting some odd errors in C++ when referencing the urdf/model.h
library. This was in ros-agnostic libraries that stored URDF's using this library, and had worked fine when I had written the code in ROS1 and when I had used apt-installed ROS2 instead of the RoboStack equivalent.
Long story short, it looks like the urdf/model.h
version downloaded via the the install guide is the slightly outdated Galactic version and not the Humble version. They're pretty much identical, but the Humble version of the library contains a few extra functions:
URDF_EXPORT Model(const Model & other);
URDF_EXPORT Model & operator=(const Model & other);
URDF_EXPORT Model(Model && other) noexcept;
URDF_EXPORT Model & operator=(Model && other)noexcept;
... that my code (and, presumably, other C++ code that referenced the library) needed in a few areas. Adding these few functions to the urdf/model.h
file allowed my code to build, though I have yet to finish setting it up to run to see if that quick fix did what I needed it to. I've never installed Galactic or any non-Humble version of ROS on this PC in Mamba or via apt.
I doubt it's an issue for most folks, but just wanted to throw this up here in case it became relevant to someone else!