Replying from Allow for more complex joints in URDF :
Sorry for going a bit technically, but ABI stability/compatibility is a bit tricky. Even if a structure is defined in an header-only library, it can still influence the ABI of another downstream library. In the specific case, in PR Extend JointLimits class to include acceleration, deceleration and jerk limits by saikishor · Pull Request #83 · ros/urdfdom_headers · GitHub you are changing the ABI of the urdf::JointLimit
class, that indirectly changes the ABI of the urdf::ModelInterface
class, that is used in the non-header-only public method exportURDF
of liburdfdom_model.so
:
(urdfdom) traversaro@IITBMP014LW012:~/pixiws/urdfdom/.pixi/envs/default/lib$ nm -s -C liburdfdom_model.so | grep " T " | grep "exportURDF"
000000000000ae70 T urdf::exportURDF(urdf::ModelInterface const&)
000000000000ae80 T urdf::exportURDF(std::shared_ptr<urdf::ModelInterface>&)
So by changing the ABI of the header-only urdfdom_headers
’s urdf::JointLimits
, you are effectively changing the ABI of the non-header-only urdfdom
’s urdf::exportURDF
.
In a nutshell, it may be just easier to ensure that ROS 2 installation does not install two different version of urdfdom
to be safe. Based on rosdep System Dependency: liburdfdom-dev, rosdep System Dependency: liburdfdom-tools and rosdep System Dependency: liburdfdom-headers-dev , I guess the ROS 2 packages that should be migrated from using the system urdfdom to use the ROS urdfdom:
pinocchio
gz_dartsim_vendor
sick_safetyscanners2
ur_description
ur_simulation_gz
sdformat_urdf
Once that is done, it may still be possible for users to mix system urdfdom and ros package urdfdom if they manually install a system apt package that depends on urdfdom (as it happens with other packages that are both provided by the system packages and ROS 2 packages, see for example Conflict between DART library and Gazebo · Issue #724 · gazebosim/gz-physics · GitHub), but at least this will not happen if one just installs ROS packages
I know that the current URDF spec is a bit in transition https://github.com/ros/urdfdom/pull/183 (mostly due to me that I need to wrap up the PR, my bad :] ). Anyhow, could it make sense to try to formalize/document a bit what these new URDF values represent, just with a short description of what they should represent, if they are supported for all joint types and the units used to represent that? You can take an example the existing spec for limits available at urdf/XML/joint - ROS Wiki .
In the past I experience problems in teams as these limits had different interpretation among the team members. For example, for position one some considered them as “hardware” hard limits (i.e. where the joint physical stop is present, if any) while other considers them as “software” limits (i.e. the value at which the software clips or limits desired position values), so it would be a good idea to try to be less ambigous, at least for new attributes.
In the past the concept of urdf (file format) version was added in Add in support for a version tag. by clalancette · Pull Request #133 · ros/urdfdom · GitHub, this is not strictly related to this proposal, but I guess that once a new release of the urdf (format) is done, it could make sense to mark it as 1.1 given that this is a back-compatible new feature?
Instead, given that there are two officially supported URDF parsers in ROS, one is urdfdom
, while another is urdf_parser_py
, do you plan to open a PR to update this also in GitHub - ros/urdf_parser_py: Standalone URDF parser for Python. ?