Agricultural Robotics and 3D Reconstruction

Plants on shelves

Indoor farms grow plants without soil, on stacked shelves, under light and nutrients that people set. Setting them well means knowing how each plant is doing. The project I joined at the Shanghai Artificial Intelligence Research Institute (SAIRI), run with the Shanghai Academy of Agricultural Sciences, was building a plant-state model for exactly that: a model that assesses growth and guides the growing environment.

A model like that is only as good as what it is fed. It needs the same plant measured again and again as it grows, without harming it, and every measurement has to be comparable with the one taken a week earlier and has to answer a question an agronomist would act on. From July to October 2025, as a Research Intern at SAIRI, also affiliated with MindSpore Shanghai, I built the part of the system that produces those measurements: the robotic-arm control, the mobile platform, the multi-view RGB-D acquisition and the three-dimensional reconstruction.

A chain of five stages: a mobile platform moves station to station, an arm carrying an RGB-D camera follows a viewpoint sequence, capture records color, depth and pose, reconstruction runs structure-from-motion and multi-view stereo, and measurement extracts leaf area and roots. A second arm lifts a plant clear of the shelf so the camera arm can reach it. A dashed return path shows the measurement setting what the capture must provide. A sixth box, the partner's plant-state model, sits outside the boundary of this work.
The sensing chain I built, from the mobile platform to the measurements, with the agricultural partner's plant-state model outside it on the right.

The same view, twice

Repeatability starts with the robot. The mobile platform moves between growing stations and has to arrive at each one in the same pose every time, because everything the arm does is defined relative to the station. I wrote the layer around the platform's existing navigation stack, covering motion commands, pose handling and the coordination with image capture, and read enough of the methods underneath to know where that stack would hold and where it would not.

The arm carries the camera. For each plant I designed a sequence of viewpoints around it, spread over azimuth and elevation, with enough overlap between neighbors for the reconstruction to link them. Every pose has to be reachable and every move between poses has to clear the plant and the shelf, so reachability and collision are part of designing the sequence rather than something checked after it. Arm motion, camera triggering and recording run as coordinated ROS nodes, and each frame comes out carrying the pose it was taken from.

That pose is what gives the pictures a scale. The camera, an Intel RealSense D435i, records color and depth, and the arm's forward kinematics places every frame in the arm's base frame, so a purely visual reconstruction can be brought back to physical units. It has to be: leaf area and root length are reported in centimeters. Lighting is controlled so that batches compare, and the images are organized by plant, growth stage and batch, with the acquisition record kept beside them.

From images to a plant

Reconstruction runs as a scripted COLMAP pipeline, from feature matching and sparse structure-from-motion through dense multi-view stereo to a fused point cloud and a mesh.

Plants make that pipeline work hard. They are thin, self-similar and weakly textured, so the pipeline is tuned for them: it looks for more features and places them more precisely, keeps only image pairs that agree geometrically, and lets the mapper build several partial models so that the largest consistent one can be chosen automatically. Before any of this, a mask built from depth and color keeps what is close to the camera and green, and the shelf, the neighboring plants and the room never reach the matcher. Afterward the point cloud is cleaned and checked for pose consistency, reprojection error and coverage before anything is measured from it. Measurements come from the fused point cloud and a Delaunay mesh; a Poisson mesh is kept for viewing.

The second arm

The plants were grown densely, and in place they could not be seen. Neighboring leaves blocked the viewpoints the reconstruction needed; leaves reflected light, crossed one another and changed shape as the plant grew.

The decisive change was to the scene, not to the algorithm. I added a second arm whose only job is to lift a plant out of the growing area so the camera arm can observe it alone. With the plant standing by itself, the neighbors are gone, and the camera can go where the measurement needs it rather than where the shelf allows. This is the configuration the system ran in.

Lifting the plant also exposed its roots. Whether they were worth measuring was an agricultural question rather than a geometric one, so I raised it with a collaborator on the agricultural side, and root measurement joined the workflow.

What gets measured

Two quantities come out of the chain. Leaf area is computed by segmenting individual leaves on the reconstruction and integrating their surface, and root geometry is measured from the reconstruction of the exposed root system. I led this measurement work with colleagues, and we settled both definitions with the agricultural collaborators, so that the system reports a quantity an agronomist would act on and not only one that is geometrically consistent. The measurement then reaches back through the whole chain: it decides the coverage, resolution and precision the acquisition must provide, and the acquisition is designed backward from it.

Outcome

I delivered the complete upstream chain, platform, arm, acquisition and reconstruction, as working parts of the system, with the leaf-area and root measurements defined and running on top of it. What can be released of the reconstruction and inspection workflow is packaged as two toolkits, VisRecon and Multiview Reconstruction; they are the public part of the code behind this page, not the whole of it. How the project changed the way I think about engineering research is the subject of How Agricultural Robotics Changed My View of Engineering Research.

Resources

Not everything from this project is published here. Some of it is still being organized, and some cannot be released.