Coder Social home page Coder Social logo

Add support for quaternion in URDF about urdfdom HOT 3 OPEN

doisyg avatar doisyg commented on August 19, 2024
Add support for quaternion in URDF

from urdfdom.

Comments (3)

traversaro avatar traversaro commented on August 19, 2024

Thanks for proposing this! Given what was discussed in #123 (comment), I think that it is useful to clarify what version number this is new URDF+quaternion will use (as requested in #123 (comment)).

It is going to be URDF spec 2.0 or 1.1? I am not an expert of versioning for file formats, and the usually used semantic versioning refers to software APIs (with corresponding ABIs), not file formats. The only example that I know of strictly defined versioning rules for a file format are FMI's versioning rules, defined in https://fmi-standard.org/docs/3.0/#VersioningLayered .

However, philosophy aside, the version support was added in #133, but unless I am missing something no explicit semantics was defined for it. However, there is an implicit semantic defined by the check in

if (!version.equal(1, 0))
: all existing urdfdom version will refuse to load any document that URDF that have a version different from "1.0" . From that point of view, this means that we can safely call the URDF with quaternion both 1.1 or any other number, as old urdfdom that do not read quaternions will always do the right thing: refuse to load the document.

Regardless of weather we use "1.1" or "2.0" as a version, I guess we need to modify the following point in the code:

from urdfdom.

traversaro avatar traversaro commented on August 19, 2024

https://github.com/ros/sdformat_urdf ?

I guess no modification is required in this? This code creates a urdf::ModelInterfaceSharedPtr from a SDF model, without passing via the textual representation of the URDF, that is modified by this proposal. In memory, the urdf::Rotation struct already uses quaternion.

Whatever gazebo is using when doing gz sdf -p robot.urdf > robot.sdf or when spawning robot from an urdf robot description ? @ahcorde

This code is the URDF parser in https://github.com/gazebosim/sdformat/blob/sdf14/src/parser_urdf.cc . However, I do not think it needs any modification as it already uses urdfdom and so it reads the urdf pose from urdfdom's structures, see https://github.com/gazebosim/sdformat/blob/sdf14/src/parser_urdf.cc#L2802 . However, I think the problem here is of deployment. If I recall correctly (but things may have changed, I do not have a Humble install to quickly check) sdformat and gazebo packages use the urdfdom that ships with official Debian/Ubuntu repos (apt package: liburdfdom-dev, see for example https://packages.ubuntu.com/jammy/liburdfdom-dev), while ROS2 installs its own version of urdfdom package (ros-humble-urdfdom or something similar, see http://repo.ros2.org/ubuntu/main/pool/main/r/ros-humble-urdfdom/). So, to ensure that any change is available and supported in Gazebo for ROS Jazzy, we would need to make sure that urdfdom with this modifications is available in Ubuntu 24.04 repos. I am not sure if we are still in time for that, probably @j-rivero knows more. A possible alternative is that ROS installs its own ABI compatible sdformat package, to avoid any relation with the system's urdfdom.

from urdfdom.

traversaro avatar traversaro commented on August 19, 2024

Another related question: unfortunatly we still do not have the spec in a github repo (mainly my fault, see ros/urdfdom_headers#62). However, could you propose here or somewhere how you would edit the spec in http://wiki.ros.org/urdf/XML to document quaternions?

from urdfdom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.