Projects for the course EBS 289K: Sensors and Actuators in Agricultural Automation (UC Davis)
While every attempt has been made to accurately create a mobile robot simulation, the work has not been verified independently and some typographical and/or technical errors may be present due to the type of assumptions made. In any case, the authors (Guilherme De Moura Araujo, Bennett Evans, and Nicholas Buxbaum) hope that the present files will be a helpful guide and assist in making further improvements as necessary.
The project you will find in this repository is directly taken from course assignments with the instructor’s consent.
Computer simulation of an agricultural robot inspecting a tree nursery. This project is part of the course EBS289K: Agricultural Robotics and Automation, taught at UC Davis by Prof. Stavros Vougioukas. The challenge consisted in programming a mobile robot equipped with a GPS, a digital compass, and a 2D laser scanner to traverse the field block and count the number of trees in each row. In addition, the diameter of the trunk of each tree should be estimated, so that management could decide which trees are ready for the market.
Fig. 1 - Robot-compatible tree nursery. Source: Davey Nursery.
The project's success relied on developing specific components, including Guidance, Navigation, and Control (GNC) for the robot, Simultaneous Localization and Mapping (SLAM) for environment perception, and computer vision algorithms for tree classification based on diameter.
• To ensure the robot moved along the optimal route through the orchard, we implemented a genetic algorithm for path planning that created the shortest Dubins path. This helped us save time and resources.
• In order to have a better understanding of the environment, we used a 2D laser scanner to generate an occupancy grid, which is basically a map of the orchard. This allowed us to classify each tree based on their diameter, which is important for orchard management.
• To make sure that the robot moved along the planned path, we used a technique called Pure Pursuit algorithm. It's like playing a game of follow-the-leader, but with the robot as the leader.
• For the robot to know where it was in the orchard, we used a combination of GPS and odometer sensors, which we fused using an Extended Kalman Filter. This made it possible for us to get an accurate location of the robot and helped us simulate the real world better.
• Since real-world conditions are not always perfect, we added simulated noise to the GPS, odometer, and laser scanner data. However, to make sure our results were reliable, we filtered out the noise using a low-pass filter.
- Generate random nursery
- Plan the path using a genetic algorithm and the dubbins path
- Traverse the field and scan the environment with the 2D LiDAR (SLAM)
- Use low-pass filter to enhance LiDAR data (filter out noise)
- Use image processing techniques such as morphological operations to enhance the orchard map (enhanced image), locate trees and estimate their diameter using the Hough Transform
- Run the simulation
- Data Analysis
a) Navigation error
b) Tree localization error
c) Tree diameter estimate error
• FinalProjectMain.m: Author: Guilherme De Moura Araujo, Bennett Evans, and Nico Buxbaum. Description: Masterfile for project. Initializes parameters, calls all functions, performs C.V. algorithms and produces final output.
• generateNursery.m: Author: Stavros G. Vougioukas. Description: Creates a randomized simulated nursery for testing.
• tspof_ga.m: Author: Joseph Kirk. Description: Solves traveling salesman problem to compute optimal path through orchar using genetic algorithm.
• robotOdo.m: Author: Stavros G. Vougioukas. Description: Produces simulated noisy odometery data.
• GPS_CompassNoisy: Author: Stavros G. Vougioukas. Description: Produces simulated noisy GPS data.
• ekfODO: Author: Guilherme De Moura Araujo, Bennett Evans, and Nico Buxbaum. Description: Extended Kalman Filter implementation
• purePursuit.m: Author: Guilherme De Moura Araujo, Bennett Evans, and Nico Buxbaum. Description: Path tracking script, uses pure pursuit algorithm.
• bresenhamfast.m: Author:Peter I. Corke. Description: Performs Bresenham line algorithm (processes 2D LIDAR data).
• laserScannerNoisy.p: Author: Stavros Vougioukas. Description: Produces simulated noisy LIDAR (2D) data.
• laserRange.m: Author: Peter I. Corke and Stavros Vougioukas. Description: Takes noisy LIDAR data and performs range finding algorithm.
• XYtoIJ.m: Authot: Stavros G. Vougioukas. Description: Transforms coordinates from world to robot frame.
• updateLaserBeamGrid.m: Author: Guilherme De Moura Araujo, Bennett Evans, and Nico Buxbaum. Description: Updates nursery occupancy grid.
• updateLaserBeamBitmap.m: Author: Guilherme De Moura Araujo, Bennett Evans, and Nico Buxbaum. Description: Updates nursery bitmap.
• findTrees.m: Author: Guilherme De Moura Araujo, Bennett Evans, and Nico Buxbaum. Description: Image processing algorithm to scan an occupancy grid, find circular shapes, and record circular shape center location (x,y) and diameter.
• draw_disc.m: Author: Stavros G. Vougioukas. Description: Draws simulated nursery.
• Image_Processing_Error.m: Author: Guilherme De Moura Araujo, Bennett Evans, and Nico Buxbaum. Description: Performs statistical analysis on output data.
• bycicle_model.m: Author: Guilherme De Moura Araujo, Bennett Evans, and Nico Buxbaum. Description: Performs euler integration to find final state of the robot.
• draw_tractor.m: Author: Guilherme De Moura Araujo, Bennett Evans, and Nico Buxbaum. Description: Plots tractor model (robot).
• move_robot.m: Author: Guilherme De Moura Araujo, Bennett Evans, and Nico Buxbaum. Description: Creates animated version of the robot moving.