-
Notifications
You must be signed in to change notification settings - Fork 28
Add geometry-based robot class generator #642
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
Changes from all commits
853be37
83580ab
7ba09f5
409bcef
9b00b03
6f8753a
70a3eb4
3809bd7
279f829
2d74413
79c5b7b
41e6721
dff80b3
aac02ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,80 @@ | ||||||
| #!/usr/bin/env python | ||||||
|
|
||||||
| """Generate robot class from URDF geometry. | ||||||
| This tool generates Python robot class code with kinematic chain properties | ||||||
| (arm, right_arm, left_arm, etc.) from any URDF robot model. | ||||||
| No LLM or API keys required - uses only URDF structure and geometry. | ||||||
| """ | ||||||
|
|
||||||
| import argparse | ||||||
|
|
||||||
|
|
||||||
| def main(): | ||||||
| parser = argparse.ArgumentParser( | ||||||
| description='Generate robot class from URDF geometry') | ||||||
| parser.add_argument( | ||||||
| 'input_urdfpath', | ||||||
| type=str, | ||||||
| help='Input URDF path') | ||||||
|
||||||
| help='Input URDF path') | |
| help='Path to input URDF file (supports package:// URLs)') |
Copilot
AI
Jan 6, 2026
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.
The CLI application doesn't include any error handling for cases where the URDF file cannot be loaded or when robot class generation fails. Consider wrapping the robot loading (line 41) and code generation (lines 64-69) in try-except blocks to provide user-friendly error messages instead of raw Python tracebacks.
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.
The documentation examples show basic usage but don't mention the PatternConfig customization feature or the package:// URL support, which are key features of this implementation. Consider adding examples showing these advanced features.