1
$\begingroup$

I need some assistance regarding a challenge I'm facing while converting SDF (Simulation Description Format) files to URDF (Unified Robot Description Format) files in ROS2 Humble. Specifically, the issue lies in the misalignment of joint frames between the two formats.

In URDF, joint frames are aligned (equal) with the child joint frames, which simplifies the representation and manipulation of a robot's kinematic structure. However, this alignment is not always present in SDF files commonly used for simulation. As a result, when converting SDF files to URDF, discrepancies arise between the visual representation and actual kinematic behavior of the robot.

I would greatly appreciate your insights on potential solutions or workarounds for aligning the joint frames during the conversion process. Are there any existing tools or scripts available that can automate this alignment task? Additionally, it would be helpful to address the need for automatic adjustments of the link frames in the mesh file to ensure consistency between visual representation and kinematic behavior.

Since I am specifically working with ROS2 Humble, any guidance specific to this version would be highly beneficial.

Thank you for your support!

EDIT: As pointed out by Chuck, I apologize for the lack of clarity and will rephrase my issue: I would like to obtain an URDF file from an SDF file (I am unable to directly generate the URDF file and only have access to the SDF file and mesh files). I have indeed seen and used the sdformat_urdf library, and it works. However, for the sake of generality, I would like to ensure that this package adequately addresses the frame issue mentioned earlier. If not, I would like to inquire if there is an alternative solution available or if it would be worthwhile to develop a custom package to address this concern.

$\endgroup$
3
  • $\begingroup$ Welcome to Robotics, Constant Roux. I believe the sdformat_urdf library will do what you need; This repo enables using SDFormat XML as a robot description format instead of URDF XML. It does this by providing a urdf_parser_plugin for SDFormat that reads SDFormat and outputs URDF C++ DOM structures. $\endgroup$
    – Chuck
    Jun 5, 2023 at 9:35
  • $\begingroup$ The SDF format is for Gazebo, and URDF is the standard for ROS, so as stated in this answer The main question here is why you want to use the native Gazebo description format with ROS utilities. If you could please explain more about what you're trying to do we might be able to help you find alternatives. I'm concerned this is an XY problem where you're looking for help with an assumed solution instead of the root issue. $\endgroup$
    – Chuck
    Jun 5, 2023 at 9:36
  • $\begingroup$ I have indeed seen and used the sdformat_urdf library, and it works. If it works, then I don't understand what more there is to do? for the sake of generality, I would like to ensure that this package adequately addresses the frame issue mentioned earlier. Does it work or not work? If it works and you don't have any frame issues then it adequately addresses the frame issues, right? If it doesn't work, can you please provide the portion of the SDF file you're trying to convert and some supporting information to show what's not working correctly? $\endgroup$
    – Chuck
    Jun 7, 2023 at 10:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.