Robotics

New Gazebo Plugin Simulates Spray Painting with Ray-Cast and Particle Effects

Ray-cast paint patches and optional particle spray cloud for realistic simulation.

Deep Dive

Topguns837 has released gz_sim_spray_painting_plugin, an open-source Gazebo Harmonic system plugin that fills a long-standing gap in robotic spray painting simulation. The plugin attaches a spray nozzle to any robot link and fires a cone of rays every simulation step. Wherever a ray hits a surface, a colored disc is placed flush against it — working on any geometry from simple boxes to complex vehicle meshes like the Prius used in the demo. An optional particle emitter creates the visual mist of a real spray gun, which can be disabled via an SDF flag (<enable_particle_emitter>false</enable_particle_emitter>) for headless simulations or ML training. The spray ON/OFF signal is a standard Gazebo transport Boolean topic (default /spray_paint/trigger), easily bridged to ROS 2 with ros_gz_bridge.

The plugin is fully configurable through SDF parameters: <cone_half_angle_deg> (default 15°), <cone_max_range> (default 1 m), <spray_color> (RGBA, default red). Integration requires only a single plugin block in any URDF or SDF link. The repository includes four demo worlds (demo_car, demo_cube, demo_cylinder, demo_ellipsoid) and a complete Docker setup — no local ROS 2 or Gazebo install needed. The startScript.sh handles Docker build, code build, and simulation launch via an interactive menu. Built with ROS 2 Humble, Gazebo Harmonic, and C++17, the plugin is ready for industrial robotics painting, coating, and surface-coverage tasks. The developer welcomes feedback and contributions via GitHub Issues.

Key Points
  • Dual pipeline: ray-cast paint discs on any geometry plus optional particle spray cloud for visual mist
  • ROS 2 integration via configurable Boolean topic (/spray_paint/trigger) bridged with ros_gz_bridge
  • Complete Docker setup with four demo worlds (car, cube, cylinder, ellipsoid) and single start script

Why It Matters

Enables realistic robotic painting simulation for ML training and industrial coating without physical hardware.

📬 Get the top 10 AI stories daily