Skip to content

Commit

Permalink
Move the frames in order that the axis pass through their origin
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicogene committed Jul 22, 2024
1 parent a4b61ed commit 44685fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include(GNUInstallDirs)
include(FeatureSummary)

find_package(Eigen3 REQUIRED)
find_package(iDynTree 12.3.1 REQUIRED)
find_package(iDynTree 12.4.0 REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(LibXml2 REQUIRED)

Expand Down
1 change: 1 addition & 0 deletions src/creo2urdf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ add_compile_definitions(creo2urdf PUBLIC PRO_MACHINE=36
# Link dependencies
target_link_libraries(creo2urdf PRIVATE iDynTree::idyntree-modelio
iDynTree::idyntree-high-level
iDynTree::idyntree-model
yaml-cpp::yaml-cpp
LibXml2::LibXml2
Eigen3::Eigen
Expand Down
8 changes: 7 additions & 1 deletion src/creo2urdf/src/Creo2Urdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <iDynTree/PrismaticJoint.h>
#include <iDynTree/EigenHelpers.h>
#include <iDynTree/ModelTransformers.h>

#include <Eigen/Core>

Expand Down Expand Up @@ -440,7 +441,12 @@ void Creo2Urdf::OnCommand() {
bool Creo2Urdf::exportModelToUrdf(iDynTree::Model mdl, iDynTree::ModelExporterOptions options) {
iDynTree::ModelExporter mdl_exporter;

mdl_exporter.init(mdl);
// Convert modelToExport in a URDF-compatible model (using the default base link)
iDynTree::Model modelToExportURDFCompatible;

bool ok = iDynTree::moveLinkFramesToBeCompatibleWithURDFWithGivenBaseLink(mdl, modelToExportURDFCompatible);

mdl_exporter.init(modelToExportURDFCompatible);
mdl_exporter.setExportingOptions(options);

if (!mdl_exporter.isValid())
Expand Down

0 comments on commit 44685fd

Please sign in to comment.