-
Notifications
You must be signed in to change notification settings - Fork 13
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
Refactor model generation for readability #152
Conversation
Signed-off-by: Louise Poubel <louise@openrobotics.org>
CI is broken because of Garden debs, there are fixes in the works |
Thanks for these suggestions.
Ideally, the next version of this script should be more generic than the current version. In an ideal world I'd like to give this a bit of thought before rushing in to change things. |
Gotcha, now I know what you were going for and I agree that it would be nice to make the script easily extensible. I'm not sure what the correct heuristics would be though. Looking at each case: base_linkInstead of battery and drop_weightThe logic for these 2 is hacky on both the original script and on this PR. Instead of going through proper transform calculation, we're relying on the fact that the battery's only offset is So if I don't use the name for now, what do you suggest? Not sure if it's worth it doing the proper transform math at this point. Maybe this is a bit better?
|
Yep both of these proposals sound awesome. Thanks! I think keeping |
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Great! Done in d013573 |
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.
Have a minor knit but otherwise this LTGM. Thanks for refactoring the script.
Signed-off-by: Louise Poubel <louise@openrobotics.org>
While working on #48, I went over the model generation code and refactored it a bit to make it easier for a new user to understand what it's doing. Some of the changes:
sdf
andmodel
tags, because there's only one of each_tag
suffix for variables that hold XML tagsmain_body
tobase_link
to be consistent with SDFtotal_mass
global variable as an argument@arjo129 , these are just suggestions based on my understanding. Let me know if you disagree with anything.