eyrc-25-26_krishi_drone: The Repo That Turns a Nano Drone Into a Control Theory Exam

A ROS 2 greenhouse challenge built around cheap vision localization, dual PID/LQR controllers, and a grading pipeline that forces real understanding.

9 min read • View on GitHub • More from eYantra-Robotics-Competition

A nano drone hovers inside a greenhouse aisle while an overhead camera watches from above and a circular marker sits beneath the drone. A laptop workstation at the edge of the scene feeds the control loop, showing how vision, localization, and flight control connect in one classroom system. The image explains that this repository is not just about drones. It is about making autonomy teachable with low-cost infrastructure.
The whole loop in one frame: camera, marker, controller, and drone.
Key Takeaways

A Drone Repo Built Like a Lab

Most drone repos teach one thing well. This one tries to teach the whole stack: simulation, localization, control, and assessment. That is why eyrc-25-26_krishi_drone feels less like a starter kit and more like a lab exercise with guardrails.

The setting matters. A greenhouse is a constrained world, which is exactly what makes it useful for learning autonomy. Students are not asked to solve flight in the abstract. They are asked to localize a nano drone, stabilize it, find plant targets, and complete a task under a competition rubric.

Yantra's genius has been to to manufacture our own drones and have you guys assemble it and build the drone control system and all that so the knowledge that you acquire in the process is not toy knowledge the knowledge is very real.

That is the core design move. The repository does not hide the system boundaries. It uses them as the lesson.

WhyCon Turns a Camera Into Indoor GPS

WhyCon is the enabling trick. A simple overhead camera watches circular markers and turns visual geometry into a usable pose estimate. In a room like this, that stands in for the expensive positioning systems that real research labs often depend on.

One pose stream, two control philosophies. The same visual input can drive either a simple feedback loop or a state-space controller.

A close-up technical scene shows an overhead camera, a circular marker, a pose estimate stream, and two diverging controller paths. The image explains that WhyCon is the bridge between inexpensive vision and stable autonomous flight. It also shows why the same sensing layer can feed different control strategies without changing the hardware.
WhyCon is the bridge between a cheap camera and a usable control signal.

The repository’s architecture reflects that idea. The ROS 2 workspace separates the vision system, controller code, and hardware bridge into distinct packages such as whycon, swift_pico_hw, and crsf-ros2. That separation is what makes the system readable to students, and transferable from simulation to hardware.

Two Controllers, Two Ways to Think

This is where the repo becomes an exam. PID is the familiar feedback loop. LQR is the more formal state-space path, where students have to reason about dynamics instead of only tuning error terms. The repository keeps both alive because they teach different instincts.

DimensionPIDLQR
Mental modelTuning error, one axis at a timeModeling state, cost, and optimal correction
Student experienceFast to grasp, easy to testMore mathematical, more revealing
Control styleReactive feedbackStructured state-space control
What it teachesPractical stabilizationSystem dynamics and trade-offs
Best use hereGetting the drone steady quicklyForcing a deeper control design
# The essential shape of the loop
pose = get_whycon_pose()
error = target - pose

if mode == 'PID':
    command = pid.update(error)
else:
    state = build_state_vector(pose)
    command = lqr.update(state)

publish_rc_command(command)

The important part is not which one is "better." It is that the repo makes the difference legible. PID teaches intuition. LQR teaches structure. In a classroom, that contrast is the lesson.

The aim here is to design and implement a PID or a LQR control to navigate a quadcopter autonomously through a gamified greenhouse environment as you can see in front of you you have to identify some infected plants in this greenhouse and carry out biopesticide spraying and then return to the home base.

The Grader Is Part of the Curriculum

The local grader is unusual, and that is the point. Obfuscated scripts and protected helpers create a competition environment where students can test offline without turning the reference solution into a shortcut. In other words, the repo is optimized for learning under constraints, not for inspectability at any cost.

That is a deliberate trust mechanism. It keeps the evaluation logic close to the workspace, but not open enough to collapse the competition into cargo-cult copying. For an educational robotics program at scale, that trade-off makes sense.

The Swift Pico Drone is an Unmanned Aerial Vehicle (UAV) developed at e-Yantra. It has a WhyCon marker mounted on top of it to help locate it easily and serve as a feedback mechanism for the control system to control and move the drone.

From Gazebo to a Real Drone

The pedagogical path is staged on purpose. Students begin in Gazebo, where the control loop is safer and easier to debug. Then selected teams move to hardware, where the same ideas have to survive camera noise, radio delay, and a real aircraft that does not forgive sloppy assumptions.

That simulation-to-hardware bridge is why the repo matters. A lot of educational robotics stops at a demo. This one asks whether the mental model still works when the drone leaves the simulator and enters a physical arena.

PlatformLocalizationLearning modelSetup burdenWhat makes it distinct
Krishi DroneWhyCon overhead cameraProject-based learning with a greenhouse themeModerateAccessible vision-based autonomy for scale
CrazyflieLighthouse or OptiTrackResearch and prototypingHigherBroad ecosystem, strong research pedigree
PX4 or HoverGamesVaries by stackCompetition and industry-aligned practiceModerate to highIndustry relevance and flight-controller depth
OptiTrack or Vicon labExternal motion captureAdvanced researchVery highPrecision infrastructure, but expensive and less scalable

The comparison is not about picking a winner. It is about recognizing the design target. Krishi Drone is trying to make robotics education feel serious without making it inaccessible.

What This Repo Is Really Teaching

On the surface, the repo teaches control, perception, middleware, and integration. Underneath, it teaches a more important skill: how to reason about a system when every layer depends on the others. That is the real autonomy lesson.

The greenhouse theme gives that lesson a shape. The control loop is constrained, the task is meaningful, and the grading is strict. Put together, those choices produce a rare thing in educational robotics: a project that is both approachable and rigorous.