How sreelm10sj/ros2-autonomous-agribot works
This ROS 2 project simulates an agricultural rover and describes a closed-loop spot-and-treat workflow: Gazebo provides the rover and camera feed; the vision/navigation node detects weeds, steers between crop rows, triggers targeted nozzles, and plans field coverage. A separate collector supports image capture, while the training assets and script support YOLO model training. The README documents capabilities in the unsampled master node; those links are cited to the README rather than presented as inspected source details.
Main entry points: spot_and_treat.py Spot-and-Treat Node · rover.launch.py Simulation Launch · data_collector.py Image Collector · data.yaml YOLO Dataset
Components 18
Simulation
- Simulation Launch
swarm_ws/src/rover_description/launch/rover.launch.py - Farm World
swarm_ws/src/rover_description/worlds/massive_farm.world - Rover Model
swarm_ws/src/rover_description/urdf/rover.urdf.xacro
Perception
- Image Collector
swarm_ws/src/rover_vision/rover_vision/data_collector.py - YOLO Detector
swarm_ws/src/rover_vision/rover_vision/yolo_detector.py
Autonomy & Treatment
- Spot-and-Treat Node
swarm_ws/src/rover_vision/rover_vision/spot_and_treat.py - Weed Detection
swarm_ws/src/rover_vision/rover_vision/spot_and_treat.py - Odometry Steering
swarm_ws/src/rover_vision/rover_vision/spot_and_treat.py - Tripwire Stop
swarm_ws/src/rover_vision/rover_vision/spot_and_treat.py - Targeted Nozzles
swarm_ws/src/rover_vision/rover_vision/spot_and_treat.py - Swath Planning
swarm_ws/src/rover_vision/rover_vision/spot_and_treat.py - Telemetry HUD
swarm_ws/src/rover_vision/rover_vision/spot_and_treat.py
Model Training
- YOLO Dataset
yolo_training/data.yaml - Training Script
yolo_training/train_sim.py - Trained Weights
yolo_training/runs/detect/simulated_farm/weights/best.pt
Other components
- Operator
- Gazebo
- Camera Feed
Connections 19
- Operator → Simulation Launch: starts simulation
README.md - Simulation Launch → Rover Model: loads model
swarm_ws/src/rover_description/launch/rover.launch.py - Simulation Launch → Farm World: selects world
swarm_ws/src/rover_description/launch/rover.launch.py - Simulation Launch → Gazebo: launches
swarm_ws/src/rover_description/launch/rover.launch.py - Gazebo → Camera Feed: publishes images
README.md - Operator → Spot-and-Treat Node: starts node
README.md - Camera Feed → Spot-and-Treat Node: supplies images
README.md - Camera Feed → Image Collector: supplies images
swarm_ws/src/rover_vision/rover_vision/data_collector.py - Image Collector → YOLO Dataset: captures images
- YOLO Dataset → Training Script: trains on
yolo_training/train_sim.py - Training Script → Trained Weights: produces weights
yolo_training/train_sim.py - Trained Weights → Spot-and-Treat Node: provides model
README.md - Camera Feed → YOLO Detector: supplies images
swarm_ws/src/rover_vision/rover_vision/yolo_detector.py - Spot-and-Treat Node → Weed Detection: runs detection
README.md - Spot-and-Treat Node → Odometry Steering: controls rover
README.md - Spot-and-Treat Node → Tripwire Stop: stops on target
README.md - Spot-and-Treat Node → Targeted Nozzles: triggers treatment
README.md - Spot-and-Treat Node → Swath Planning: plans coverage
README.md - Spot-and-Treat Node → Telemetry HUD: renders telemetry
README.md