feat: Extend Bubblify to support multiple geometry types with interactive 3D editing#3
Open
Nnboy wants to merge 20 commits intobheijden:masterfrom
Open
feat: Extend Bubblify to support multiple geometry types with interactive 3D editing#3Nnboy wants to merge 20 commits intobheijden:masterfrom
Nnboy wants to merge 20 commits intobheijden:masterfrom
Conversation
- Add support for box and cylinder collision geometries in addition to spheres - Introduce Geometry class to generalize collision geometry representation - Update GeometryStore to handle multiple geometry types - Modify URDF XML injection to support new geometry types - Add rotation (RPY and quaternion) support for non-spherical geometries
- Introduce box and cylinder shapes in addition to sphere - Implement rotation functionality for box and cylinder geometries - Update GUI to allow selection and manipulation of different geometry types - Modify export functionality to handle multiple geometry types and rotations - Maintain backward compatibility with existing sphere-based configurations
- Implement box resize gizmos for intuitive 3D size adjustment - Add 6 resizing axes for each box geometry (±X, ±Y, ±Z) - Update GEOMETRY_SUPPORT.md with new interactive resizing instructions - Enhance user experience by syncing UI sliders and visualizing changes in real-time
- Remove complex rotations and use simple axis-aligned rotations - Adjust gizmo positions and rotations for better visual representation - Optimize gizmo creation and update logic - Improve code readability and maintainability
- Implement quaternion-based rotation for box resizing - Update gizmo positions and rotations to account for box orientation - Fix issues with previous resizing implementation that didn't consider rotation - Improve error handling and use of transformation libraries
- Add translation limits to restrict movement of gizmos - Implement constraints for each axis to prevent crossing center point - Improve error handling and default values for rotation and position - Enhance code readability and robustness
- Update radius gizmo to work with both sphere and cylinder geometries - Add conditional logic to handle different geometry types - Adjust UI updates for both sphere and cylinder radius sliders - Improve code comments for clarity and maintainability
- Introduce max_inward variables to calculate the maximum inward movement for each axis - Update translation limits to prevent gizmos from crossing the center point - Optimize movement restrictions for each axis, allowing inward movement but not through the center
- Implement cylinder height gizmo for adjusting cylinder height in the GUI - Add new methods for creating, updating, and removing cylinder height gizmos - Integrate cylinder height gizmo updates into existing GUI update functions - Implement callback for handling cylinder height changes via the gizmo
- Update gizmo positioning and rotation for sphere and cylinder geometries - Add translation limits to prevent gizmo from going through the center - Use SO3 transformations for more accurate rotations - Handle exceptions when getting cylinder rotation
- Add checkbox to toggle capsule display for cylinders - Implement capsule creation using Trimesh library - Update cylinder mesh generation with more sections for smoother appearance - Adjust mesh coloring and naming based on display option
- Rename and restructure UI elements to support multiple geometry types - Update backend to handle various collision geometries - Improve opacity management for visual focus system - Remove backward compatibility aliases
… mesh rendering - Add 'display_as_capsule' parameter to Geometry and GeometryStore - Implement efficient capsule mesh creation using Trimesh's built-in method - Refactor cylinder mesh creation for smoother appearance - Update mesh rendering to support direct opacity setting for all geometry types - Remove redundant mesh color setting and use add_mesh_simple for better performance
- Create copies of gizmo dictionaries to avoid modification during iteration - Set fixed inward movement limits for gizmos instead of using max_inward_movement variable
- Rename spherization YAML loading method to geometry configuration for clarity - Set default values for new geometries to prevent inheriting properties from previously selected geometries - Enhance error handling during gizmo removal to ignore exceptions if already removed - Update print statements for improved clarity regarding geometry loading
- Add LICENSE file with full Apache License 2.0 text - Add NOTICE file with copyright and license information - Include standard boilerplate for Apache 2.0 licensing
- Rename `--spherization_yml` option to `--geometry_config` in documentation - Update usage examples to reflect the new option name - Maintain consistency between command line options and example usages
- Renamed `--spherization_yml` argument to `--geometry_config` - Updated CLI descriptions and help messages to reflect "geometry configuration" - Updated error messages and print statements for clarity - Changed default export name from `spherized` to `geometries` This change aligns the CLI with the broader scope of geometry manipulation, not just spherization, and improves consistency across the codebase.
- Deleted the GEOMETRY_SUPPORT.md file as its content has been integrated into the README.md. - Updated copyright information in the NOTICE file to reflect the new ownership by "bubblify".
The inject_spheres_into_urdf_xml function was a backward compatibility wrapper that has now been removed. All calls should use inject_geometries_into_urdf_xml directly instead.
Owner
|
I completely missed this PR. Going to review it soon! Looks cool :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for Project
Enhanced Collision Detection Performance
Thank you for your excellent contribution. This is a very useful tool that I have recommended to many colleagues. However, during our usage, we discovered some limitations that motivated us to enhance and extend the project. The primary motivation for our enhancements was:
Technical Extensions
We built upon your solid foundation by:
🚀 Major Feature Enhancements
1. Multi-Geometry Type Support
YAML Import Support: Now supports importing box and cylinder configurations from YAML files
yaml_import_bubblify.mp4
Architecture Refactor: Transformed
Sphereclass into a genericGeometryclass with type-specific parametersParameter Configuration: Complete parameter sets for each geometry type (radius, dimensions, height, rotation, etc.)
2. Interactive 3D Editing System
Gizmo System: Implemented comprehensive 3D manipulation handles
Spheres: Radius adjustment gizmo
Cylinders: Radius and height adjustment gizmos with capsule display mode
cylinder_bubblify.mp4
Boxes: Three-axis dimension adjustment gizmos with quaternion rotation support
box_bubblify.mp4
Movement Constraints: Improved gizmo movement limits and interaction experience
Real-time Preview: Live adjustment and visualization capabilities
3. Complete UI Overhaul
--spherization_ymlto--geometry_config🔧 Technical Improvements
Core Module Updates
bubblify/core.py: Added geometry type definitions and parameter handling (+312 lines)bubblify/gui.py: Complete refactor of interactive editing functionality (+1646 lines)bubblify/cli.py: Updated command-line interface and parameter namesCode Quality Enhancements
inject_spheres_into_urdf_xmlfunction📊 Development Statistics
🧪 Testing & Documentation
🎯 Key Features
This update transforms Bubblify from a simple URDF spherization tool into a comprehensive robot geometry configuration and visualization platform, significantly enhancing its utility and flexibility.