-
Notifications
You must be signed in to change notification settings - Fork 8
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
Document with mathematical notation the geometric model used by Blender #3
Comments
Recap URDF FormalismThis is based on http://wiki.ros.org/urdf/XML/model and some well established URDF implementation such as https://github.com/ros/kdl_parser or https://github.com/ignitionrobotics/sdformat/blob/sdformat11_11.2.2/src/parser_urdf.cc . LinksIn URDF, each link is associated with a frame rigidly connected to it. Each link is defined with a Fixed JointsThe relative interconnection between two links, and the relative position between two interconnected links is defined by the joint element. The most simple case of joint is the fixed joint, for example:
Relation between Origin Element and Homogeneous TransformIn this case, the relative position between the frame rigidly connected to the links where Unfortunatly this information is not documented in the URDF format specification, but an accurate documentation can be found in SDF Revolute JointsWhen representing robots, the most commont type of joint is the revolute joint, that constrains the relative rotation between two links to be a rotation around a given axis. This is tipically represented by an element such:
Other elements are required (tipically limits and friction information) but for the sake of this discussion we can disregard them. For the fixed joints, we saw earlier that the homogenous transform
In particular, the formula that relates this info is: The transform can be decomposed in two transform that combined give the complete
Where the rotation part is obtained via the https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula . Note that the translation part of this transform is always Forward KinematicsTo compute the forward kinematics between the base link Obvioustly, for computing each joint transform it is necessary to have all the necessary information, in particular for revolute joints the joint position, that tipically can change at runtime, differently from the rest of the parameters. This is usually called forward kinematics, and is the algorithm executed by tools such as ROS's |
cc @xEnVrE |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@traversaro just stumbled upon this while chatting with @xEnVrE. I cannot render your math the way you have formatted it in this issue. E.g. does not work in my Chrome+xdoc setup, while does. Maybe you also happen to have MathJax installed, and that's actually doing the math rendering for you instead of xdoc? |
Indeed I am rendering with MathJax, but in my previous test the two where quite compatible, let me check with Chrome. |
I noticed because I am not using MathJax anymore, and your examples were not rendering. 👀 |
Not sure if any xdoc user has any input on this? @pattacini |
That's normal as Nevertheless, I can see everything rendered correctly as I've installed both |
Ack, I think I misunderstood the xdoc features then. I updated the links to avoid mentioning xdoc . |
@diegoferigo even |
@fbottarel feel free to let me know if using green-pi/purple-pi or mathjax is working fine for you or if you still have problems. |
In today's meeting, we sorted out most of the doubts, and I will provide a recap soon. The only doubt was the semantics of the roll w.r.t. to how the X and Z direction of the bone are oriented, but w.r.t. to that the |
Related SO questions: |
Recap Blender Bone FormalismThis is based on https://docs.blender.org/manual/en/latest/animation/armatures/introduction.html and the meeting that we had with @Nicogene and @xEnVrE . In Blender, the basic unit of the kinematic structure is the bone, that is a rough equivalent of a link in URDF. Each bone rest position is defined by three parameters:
To each bone it correspond a frame, whose origin is centered in the head, whose Y direction is specified by the vector Something that is work stressing is that the position of the tail does not play any role in defining the position of any child of the bone. The rest position of any bone is always expessed with head, tail and roll w.r.t. to the world frame of simulation, and the tail position of its parent is not related at all to it. So, let's say that that we have two bones, The rotational motions that can be constrainted for a child bone w.r.t. to its parent bone are the main one of the axis aligned with the child bone: so if we want to permit a rotational motion around an arbitrary axis, we need to make sure that one direction of the bone frame is aligned with the axis. The converter in blender-robotics-utils ensures that by always choosing the head and tail of the bone to be aligned with the axis specified in the URDF. So assuming that you have a model that only allows a rotation around the Y direction (as the one generated by the converter), the relative transformation between P and C is given by: where $ {}^{P_0} H_{C_0}$ is computed as: |
I personally understood much more after our discussion. It would be nice to introduce some of this formalism in the docs, but if we want to do this we just need to get it from here, so I think we can close the issue now. |
I completely agree with that, we should find a way to publish it without requiring addons to be installed in the browser if possible |
In https://github.com/robotology/blender-robotics-utils/blob/master/script/urdfToBlender.py we have a URDF --> Blender rig converter that is working fine on some URDF model, but creating problems on some other models. However, debugging the problem is tricky as we do not have a clear mathematical definition and/or understanding of how the Blender Armature system ( https://docs.blender.org/manual/en/latest/animation/armatures/structure.html#chains-of-bones ) works. In this issue we will document this with mathematical notation, so it will simplify future mantainance of the software.
Unless noted otherwise, the notation used for expressing homegenous transforms is the one defined in https://research.tue.nl/en/publications/multibody-dynamics-notation-version-2, and as LaTeX formulas will be used in the issue, please install an appropriate plugin such as https://chrome.google.com/webstore/detail/mathjax-plugin-for-github/ioemnmodlmafdkllaclgeombjnmnbima?hl=en for Chrome or https://addons.mozilla.org/en-US/firefox/addon/green-pi/ for Firefox to visualize them in the browser.
cc @Nicogene
The text was updated successfully, but these errors were encountered: