Performance: Gazebo physics and collision
This affects simulation speed and responsiveness by determining how physics calculations and collision detections impact CPU load and frame updates.
Jump into concepts and practice - no test required
Use simplified collision shapes like boxes, spheres, or capsules for robot parts and environment where possible.
Use high-detail mesh collision models for all robot parts and environment objects without simplification.
| Pattern | Collision Checks | Physics Calculations | CPU Load | Verdict |
|---|---|---|---|---|
| High-detail mesh collisions | High (many polygons) | High (complex forces) | High CPU spikes, low FPS | [X] Bad |
| Simplified primitive collisions | Low (few shapes) | Low (simple forces) | Smooth CPU usage, stable FPS | [OK] Good |
<collision name="box_collision">
<geometry>
<box><size>1 1 1</size></box>
</geometry>
</collision><collision>
<geometry>
<sphere><radius>0.5</radius></sphere>
</geometry>
</collision>