-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance processing and URDF export of //frame
elements
#34
Conversation
New sdformat versions automatically convert them back to SDF frames
In addition, when the convention is either Sdf or Urdf, compute the pose of the frame wrt the attached_to link
0e25013
to
dc401f5
Compare
Ok I guess it's now time to remove support for the |
That kinds of mean enforcing the installation of gz sim via openrobotics's apt repo in apt and gz-sim with conda-forge on conda-forge, right? Fortunatly both at the moment are side-by-side installable with gazebo classic thanks to: |
149b6d7
to
59bdcbb
Compare
Yep! I don't want to install the whole Gazebo Sim suite just for having the Btw, the working versions are the first ones after the transition from Ignition Gazebo to Gazebo Sim. Edit: on Fortress it's actually possible to have a minimum installation with only |
Can you add a few lines on this runtime dependency on sdformat + gz-tools ? As long as the dependency was just any |
I plan to update the main README with the new dependencies in another PR. I will also bump Python to 3.10. Furthermore, I'd also like to add these dependencies to the conda-forge recipe of
You can see the test failing here. The sdformat of Gazebo Classic 1) does not convert chains of dummy links to frames and 2) links with zero mass are silently removed. |
Ok. |
So it does not fail on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you Diego! I just left a comment on a minor thing
Co-authored-by: Filippo Luca Ferretti <102977828+flferretti@users.noreply.github.com>
I gave it a thought. Initially I was thinking how to check the installed Then, I realized that the sdformat version is not really relevant. What really matters is the SDF specification. This can be checked more easily by processing a SDF string
|
f38281c
to
1d009f9
Compare
@traversaro last check? Apparently on Windows files need to properly closed before being opened by another process, therefore I had to pass through a temporary directory when a model description string has to be processed by sdformat. |
if output_sdf_version < packaging.version.Version(specification_version): | ||
msg = "The found sdformat installation only supports the '{}' specification, " | ||
msg += "while ROD requires at least the '{}' specification." | ||
raise RuntimeError(msg.format(output_sdf_version, specification_version)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
This PR:
//frame/pose
element when not explicitly defined in the model description following the documented semantics (pay attention how the pose is defined when there is no explicit//frame/pose
, and what's the default when also//frame/attached_to
is not defined).//frame
elements to compatible chains in URDF.In the last two year,
sdformat
received different updates on how URDF models are converted to SDF. In particular, few of them altered how kinematic chains involving massless links (or with tiny masses) are processed. Here below some references for those that want to dig deeper:TL;DR
This PR bumps the minimum version of
sdformat
to 12.x such that the processing of such cases is handled in a unique way. Then, in order to prevent the need to install a full Gazebo suite, the minimumsdformat
version is raised to 13.x. This version allows to have thegz sdf
command line just by installing a small subset of the Gazebo libraries.Some further details on the logic introduced by this PR:
attach_frames_to_links
option to update the//frame/attached_to
element to be a link, following recursively the hierarchy. In this way, downstream projects can post-process easily frames attached to other frames knowing their real parent link.