Skip to content
All projects

Robotics

Solar Farm Drone

A Webots simulation of a DJI Mavic 2 Pro surveying an L shaped solar farm. It plans its own lawnmower route from the farm layout, checks off every table its camera passes over, and returns to its pad.

One sortie covers all 80 tables: 452 m of route, 6 survey passes and about 190 s in the air.

The drone climbs off its pad beside the solar farm
Flying the first survey pass at 12 m over the south arm
Looking down on the drone as it tracks a row of panels
Turning at the end of a pass to start the next one
Each table: two 72-cell panels on a 25 degree rack
The corner of the L where the two arms meet
The first version: fenced site, service roads and a live sun clock

01 / 08The drone climbs off its pad beside the solar farm

Overview

Solar farms are inspected by drones that fly slow, overlapping passes so a camera can spot dirty or damaged panels. This project builds that job in the Webots robot simulator: an L shaped farm of 80 fixed-tilt tables, about 74 kWp of panels, and a stock DJI Mavic 2 Pro with real propellers, GPS, IMU and a gimbal camera.

The drone takes off, flies three passes over each arm of the farm, transits between them, and lands back on its pad. The route is not hard coded. A single Python generator describes the farm, writes the world file and a layout file from the same numbers, and the controller plans its passes from that layout, so changing the row count or spacing changes the flight automatically.

Coverage is measured rather than assumed. As the camera footprint sweeps the array, the controller ticks off each table and prints the final count on landing, along with distance flown and time in the air.

Features

  • Watch a replay of the flight in 3D in the browser, orbit around it and scrub through the timeline
  • Generate a new farm layout from one Python file and the survey route follows it
  • Preview every leg of the route as an ASCII map without opening Webots
  • Get a flight log with position, speed and tables covered every 15 seconds
  • Render preview images headless from a supervisor camera that moves between set poses
  • Spot soiled tables, since selected panels carry a generated dust layer

Challenges

  • Holding a steady 3 m/s was harder than nudging the stick, because the simulated air drags the drone to a stop. The guidance loop asks for an acceleration that cancels the drag and then converts it into the bank angle that produces it, which is what a real multirotor has to do.
  • Stepping straight to a 15 degree bank out-torqued the inner attitude loop and flipped the airframe. Ramping the tilt command at a fixed rate fixed it without making the drone feel sluggish.
  • Chasing corner waypoints made the drone cut across the rows. It now follows a point 6 m ahead along the current leg and slows down while its nose swings round at the end of a pass, so each pass is a straight line over the panels.
  • An earlier version tumbled out of the sky whenever it tried to cruise, because the sample controller's rate damping was far too low for real speeds. Raising the damping to about critical and slew-limiting the forward command made it stable.

Try it

Solar Farm DroneOpen in a new tab