Bubblify is an interactive tool for creating geometric approximations of robot geometries directly from Universal Robot Description Format (URDF) specifications. It provides an intuitive 3D interface for placing collision geometries (spheres, boxes, and cylinders) on robot links, enabling efficient collision checking for motion planning applications.
Geometric approximations can significantly reduce the computational load of collision detection, have better support across simulators, and maintain accurate approximations of the source robot model while fixing mesh defects.
Install Bubblify directly from PyPI:
pip install bubblifyLaunch Bubblify with a URDF file:
bubblify --urdf_path path/to/your/robot.urdf--urdf_path(required): Path to the URDF file to spherize--geometry_config(optional): Load an existing geometry configuration--port(optional): Port for the web interface (default: 8080)--show_collision(optional): Display collision meshes (default: False)
# Basic usage
bubblify --urdf_path ./assets/xarm6/xarm6_rs.urdf
# Load with existing geometry configuration
bubblify --urdf_path ./assets/xarm6/xarm6_rs.urdf --geometry_config ./config/xarm6_spheres.yml
# Custom port and show collision meshes
bubblify --urdf_path ./robot.urdf --port 8081 --show_collisionbubblify_demo.mp4
Bubblify supports multiple geometry types for precise robot collision approximation:
- Parameters: Radius
- Use Cases: Joints, circular components
- URDF Representation:
<sphere radius="0.05"/>
- Parameters: Length, width, height
- Use Cases: Rectangular components, links
- URDF Representation:
<box size="0.1 0.1 0.1"/>
- Parameters: Radius, height
- Use Cases: Circular links, shafts
- URDF Representation:
<cylinder radius="0.05" length="0.1"/>
- Choose geometry type from the "🔶 Geometry Editor" panel
- Select from the "Geometry Type" dropdown: sphere, box, or cylinder
Based on the selected geometry type, corresponding parameter panels are displayed:
- ⚪ Sphere Properties: Adjust sphere radius
- 📦 Box Properties: Adjust box length, width, height
- 🥫 Cylinder Properties: Adjust cylinder radius and height
Box geometries provide intuitive 3D size adjustment:
- 6 Resize Axes: Each box has resize axes in ±X, ±Y, ±Z directions
- Surface Positioning: Resize axes are positioned on box surfaces for easy identification
- Color Coding:
- 🔴 Red: X-axis direction (length)
- 🟢 Green: Y-axis direction (width)
- 🔵 Blue: Z-axis direction (height)
- Real-time Updates: Dragging resize axes updates box size and UI sliders simultaneously
- Minimum Size Limits: Prevents box dimensions smaller than 1cm for effective collision detection
- Smart Synchronization: When adjusting one axis, other axes automatically reposition to stay on box surfaces
- 3D Transform Controllers: Drag rotation rings in 3D view to rotate geometries (boxes and cylinders only)
- RPY Sliders: Precisely set Roll, Pitch, Yaw angles in GUI panel (-π to π radians)
- Real-time Synchronization: 3D controllers and RPY sliders synchronize to show current rotation state
- Sphere Optimization: Sphere rotation is disabled as spheres are completely center-symmetric
- RPY Angles: Roll-Pitch-Yaw Euler angles (radians)
- Quaternions: Internal quaternion representation for precise rotation calculations
- Automatic Conversion: Automatic conversion between RPY and quaternions for accuracy
Geometric approximations offer several key advantages for robotics applications:
- Fast Collision Detection: Primitive-primitive collision checks (sphere-sphere, box-box, cylinder-cylinder) are computationally simple
- Reduced Query Time: Orders of magnitude faster than mesh-based collision detection
- Real-time Planning: Enables real-time motion planning for complex robots
- Numerical Stability: Primitive shapes eliminate mesh artifacts and numerical precision issues
- Consistent Geometry: Uniform collision representation across different simulators
- Simplified Physics: More stable physics simulation with primitive shapes
- Sampling-based Planners: Faster collision checking enables more thorough space exploration
- Optimization-based Methods: Smooth distance gradients improve trajectory optimization
- Multi-robot Systems: Efficient collision checking scales better with robot count
Bubblify's spherized URDFs and YAMLs work with modern motion planning frameworks:
- cuRobo: NVIDIA's CUDA-accelerated motion planning library
- VAMP: Vectorized Approximate Motion Planning
- URDF Files: Standard Robot Description Format with visual and collision meshes
- Geometric URDF: New URDF file with collision geometries replaced by primitive shapes (spheres, boxes, cylinders)
- Configuration YAML: Geometry parameters for reproducible results
collision_geometries:
base_link:
- center: [0.0, 0.0, 0.0]
type: sphere
radius: 0.05
# Note: Spheres don't include rotation info (center-symmetric)
- center: [0.1, 0.0, 0.0]
type: box
size: [0.1, 0.1, 0.1]
rpy: [0.785, 0.0, 0.0] # 45° rotation around X-axis
- center: [0.2, 0.0, 0.0]
type: cylinder
radius: 0.03
height: 0.15
rpy: [0.0, 0.0, 1.047] # 60° rotation around Z-axis
link1:
- center: [0.0, 0.0, 0.15]
type: sphere
radius: 0.06The exported URDF file generates corresponding collision elements for each geometry type, including rotation information:
<collision name="sphere_0">
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<sphere radius="0.05"/>
</geometry>
</collision>
<collision name="box_1">
<origin xyz="0.1 0.0 0.0" rpy="0.785 0.0 0.0"/> <!-- 45° rotation around X-axis -->
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
</collision>
<collision name="cylinder_2">
<origin xyz="0.2 0.0 0.0" rpy="0.0 0.0 1.047"/> <!-- 60° rotation around Z-axis -->
<geometry>
<cylinder radius="0.03" length="0.15"/>
</geometry>
</collision>- Spheres: Direct use of radius value
- Boxes: Use half of diagonal length as effective radius
- Cylinders: Use cylinder radius as effective radius
The new Geometry class contains parameters for all geometry types, with the geometry_type field determining which parameters to use.
This design ensures code simplicity and extensibility while maintaining complete compatibility with existing code.
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

