-
Notifications
You must be signed in to change notification settings - Fork 4
Set iDynTree::ModelExporterOptions::exportFirstBaseLinkAdditionalFrameAsFakeURDFBase to false by default and expose it as a parameter #142
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
Conversation
…eAsFakeURDFBase to false by default and expose it as a parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @traversaro, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request refines the URDF export process by modifying the default behavior of a specific iDynTree option and making it user-configurable. The primary goal is to enhance clarity and provide more control over how the base link is handled during URDF generation, resolving previously reported issues related to unexpected base link assignments.
Highlights
- Default Behavior Change: I've changed the default value of
iDynTree::ModelExporterOptions::exportFirstBaseLinkAdditionalFrameAsFakeURDFBasefromtruetofalse. This addresses user feedback regarding confusing behavior where the first additional frame attached to the base link was automatically exported as the URDF model's base link. - New Configuration Parameter: I've exposed
exportFirstBaseLinkAdditionalFrameAsFakeURDFBaseas a configurable parameter in thecreo2urdfconfiguration. Users can now explicitly set this option totrueif they wish to revert to the previous behavior (pre-v0.5.11) orfalseto use the new default. - Documentation Update: I've updated the
README.mdto document the newexportFirstBaseLinkAdditionalFrameAsFakeURDFBaseparameter, including its default value and a brief explanation of its purpose and historical context.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
|
fyi @xela-95 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a breaking change by altering the default behavior of how the base link is determined during URDF export. The iDynTree::ModelExporterOptions::exportFirstBaseLinkAdditionalFrameAsFakeURDFBase option now defaults to false within creo2urdf, aiming to reduce user confusion. The PR also exposes this option as a YAML parameter, allowing users to revert to the previous behavior if necessary. The changes include updating the Creo2Urdf class to handle this new parameter, modifying the OnCommand logic to read it from the configuration, and updating README.md to document the new parameter and its default value.
The implementation of the core logic appears correct and aligns with the stated goals. My primary feedback concerns the clarity of the documentation for this new parameter in README.md, given its nature as a breaking change.
No specific style guide was provided for this review. The submitted code changes are consistent with the established style observed in the surrounding codebase (e.g., naming conventions like camelCase for variables, PascalCase for classes, and brace styling for control flow statements).
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
If you do not know how to compile locally the extension I can show you how to do it, it is relatively straightforward (see https://github.com/icub-tech-iit/creo2urdf?tab=readme-ov-file#installation-from-sources), but if you never used vcpkg it may not be super-intuitive.
|
Nevermind for the fail, it is failing the dispatch to the private runner CI, we can merge as soon as we have confirmation by @pillai-s and/or @FabioBergonti |
|
I am going to merge it and tag it in this way @FabioBergonti and @pillai-s have a binary that is easier to install it, because next week I will be on vacation |
Fix #140 .
Fix robotology/idyntree#1201 .
This PR has as a breaking change, but I think it is a useful one based on user feedback. Historically, iDynTree URDF exporter has the
iDynTree::ModelExporterOptions::exportFirstBaseLinkAdditionalFrameAsFakeURDFBaseoptions that automatically exports the first additional frame attached to the link base as the actual base link of the URDF model, as a workaround for a long standing issue ROS issue ( ros/robot_model#6 ). However, this behaviour seems confusing, so this PR:iDynTree::ModelExporterOptions::exportFirstBaseLinkAdditionalFrameAsFakeURDFBasefromtruetofalseexportFirstBaseLinkAdditionalFrameAsFakeURDFBaseargument as a parameter, to permit users that want to set it (or continue to use the default behavior of creo2urdf<=0.5.11 .@FabioBergonti @pillai-s do you know how to compile this extension from source? It would be great to be able to quickly test this PR before merging and/or doing a release.