Skip to content

Commit

Permalink
Add option to print the model in idyntree-model-view (#1216)
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Dafarra authored Nov 5, 2024
1 parent f1cfa85 commit 13cf9e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tools/idyntree-model-view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ void addOptions(cmdline::parser &cmd)
cmd.add<std::string>("color-palette", 'c',
"Color palette.",
false);
cmd.add("print", 'p', "Print the model.");
}

int main(int argc, char** argv)
Expand All @@ -47,6 +48,11 @@ int main(int argc, char** argv)
return EXIT_FAILURE;
}

if (cmd.exist("print"))
{
std::cout << mdlLoader.model().toString() << std::endl;
}

// Visualize the model
iDynTree::Visualizer visualizer;
ok = visualizer.addModel(mdlLoader.model(),"model");
Expand Down

0 comments on commit 13cf9e9

Please sign in to comment.