Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

cmake_minimum_required(VERSION 3.16)

project(iDynTree VERSION 14.0.1
project(iDynTree VERSION 14.0.2
LANGUAGES C CXX)

# Disable in source build, unless Eclipse is used
Expand Down
6 changes: 4 additions & 2 deletions doc/model_loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ Furthermore, we also use some extension to the URDF specs, as defined in the fol

### Spherical joints

The `URDF` specification do not support Spherical Joints, that instead iDynTree support. To allow to easily load and export URDF models that contain spherical joints, by default iDynTree URDF parser detect if the model contains three consecutive `revolute` or `continuous` joints with this conditions:
The `URDF` specification do not support Spherical Joints, that instead iDynTree support. To allow to easily load and export URDF models that contain spherical joints, iDynTree URDF parser exposes an option `ModelParserOptions::convertThreeRevoluteJointsToSphericalJoint` that is off by default, but if enable can detect if the model contains three consecutive `revolute` or `continuous` joints with this conditions:
* The three joint axis intersect at a single point
* The three joint axis are each one orthogonal to each other
* The two internal links have zero mass

If all these conditions are respected, the three revolute joints in the URDF model are substituted with a single iDynTree's SphericalJoint. Similarly, when a `iDynTree::Model` is exported, any `iDynTree::SphericalJoint` contained in it is exported as a three revolute joints that respect the aforementioned conditions.

To disable this behaviour that by default is enabled you can set the `ModelParserOptions::convertThreeRevoluteJointsToSphericalJoint` and `ModelExporterOptions::exportSphericalJointsAsThreeRevoluteJoints` options to `false`.
To enable this behaviour that by default is disable you can set the `ModelParserOptions::convertThreeRevoluteJointsToSphericalJoint` to true.

The equivalent option for the URDF export, i.e. `ModelExporterOptions::exportSphericalJointsAsThreeRevoluteJoints` is by default `true`, and can be set to `false` to ensure that trying to export a `SphericalJoint` to a URDF results in a clear error.

Note that this way of supporting spherical joints in URDF is compatible with the [`onshape-to-robot`'s `ball_to_euler` processor](https://onshape-to-robot.readthedocs.io/en/latest/processor_ball_to_euler.html).

Expand Down
2 changes: 1 addition & 1 deletion src/model_io/codecs/src/ModelLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace iDynTree
ModelParserOptions::ModelParserOptions()
: addSensorFramesAsAdditionalFrames(true)
, originalFilename("")
, convertThreeRevoluteJointsToSphericalJoint(true)
, convertThreeRevoluteJointsToSphericalJoint(false)
, sphericalJointZeroMassTolerance(1e-6)
, sphericalJointOrthogonalityTolerance(1e-6)
, sphericalJointIntersectionTolerance(1e-6) {}
Expand Down
Loading