diff --git a/docs/reference/changelog-r2022.md b/docs/reference/changelog-r2022.md index 6130e17f0e9..f327cac60cd 100644 --- a/docs/reference/changelog-r2022.md +++ b/docs/reference/changelog-r2022.md @@ -1,5 +1,12 @@ # Webots R2022 Change Log + +## Webots R2022a Revision 1 +Released on XX XX, 2022. + + - Bug fixes + - Fixed the URDF exportation of [SolidReference](solidreference.md) nodes ([#4102](https://github.com/cyberbotics/webots/pull/4102)). + ## Webots R2022a Released on December 21th, 2022. diff --git a/src/webots/nodes/WbBallJoint.cpp b/src/webots/nodes/WbBallJoint.cpp index e23a8bd3ba7..0fb1fd14d64 100644 --- a/src/webots/nodes/WbBallJoint.cpp +++ b/src/webots/nodes/WbBallJoint.cpp @@ -811,7 +811,7 @@ void WbBallJoint::updateJointAxisRepresentation() { void WbBallJoint::writeExport(WbVrmlWriter &writer) const { if (writer.isUrdf() && solidEndPoint()) { - warn(tr("Exporting 'BallJoint' nodes to URDF is currently not supported")); + this->warn("Exporting 'BallJoint' nodes to URDF is currently not supported"); return; } WbBasicJoint::writeExport(writer); diff --git a/src/webots/nodes/WbJoint.cpp b/src/webots/nodes/WbJoint.cpp index 8d0c6396275..7555b5c0d27 100644 --- a/src/webots/nodes/WbJoint.cpp +++ b/src/webots/nodes/WbJoint.cpp @@ -20,6 +20,7 @@ #include "WbNodeUtilities.hpp" #include "WbPositionSensor.hpp" #include "WbRobot.hpp" +#include "WbSolidReference.hpp" #include "WbWrenRenderingContext.hpp" #include @@ -321,6 +322,11 @@ const QString WbJoint::urdfName() const { void WbJoint::writeExport(WbVrmlWriter &writer) const { if (writer.isUrdf() && solidEndPoint()) { + if (dynamic_cast(mEndPoint->value())) { + this->warn("Exporting a Joint node with a SolidRefernce endpoint to URDF is not supported."); + return; + } + const WbNode *const parentRoot = findUrdfLinkRoot(); const WbVector3 currentOffset = solidEndPoint()->translation() - anchor(); const WbVector3 translation = solidEndPoint()->translationFrom(parentRoot) - currentOffset + writer.jointOffset();