This quickstart walks through launching the full AGRIBOT simulation — spawning the robot in a farm world, starting the ROS controller stack, and running the GPS-guided autonomous drive nodes. By the end you will have AGRIBOT navigating autonomously toward a GPS goal coordinate inside a simulated farm field, with its trajectory visible in Mapviz.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Dhruv2012/Autonomous-Farm-Robot/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites before you begin:
- ROS Melodic (Ubuntu 18.04) or ROS Kinetic (Ubuntu 16.04)
- Gazebo 9 or later
- Python 3.6 or later
- A configured catkin workspace (created during installation)
Clone and build the workspace
Clone the AGRIBOT repository and build the catkin workspace. The
catkin_make step compiles all ROS packages — agribot_description, agribot_control, and autonomous_drive — in a single pass.Launch Gazebo with the farm world
Spawn AGRIBOT into a Gazebo simulation. Use This launch file spawns the AGRIBOT URDF model (
agribot_gazebo_simulation.launch to start with an empty world, or my_world.launch to load the full farm field environment (recommended).agribot_sensors.urdf.xacro) into an empty Gazebo world and publishes a static transform between base_link and base_footprint. To use the custom farm field world with CropWithWeed models, grass terrain, and a gate instead, run:my_world.launch loads Farm.world, starts joint_state_publisher and robot_state_publisher, and automatically includes agribot_control.launch so you do not need to start the controllers separately. It also opens the GPS converter and data manipulation nodes in separate xterm terminals automatically — if you use my_world.launch, skip Steps 3, 4, and 5 and proceed directly to Step 6.Start the ROS controllers
Open a new terminal and start the effort controllers for all four wheels. These PID controllers (
rightwheelR_effort_controller, leftwheelR_effort_controller, rightwheelF_effort_controller, leftwheelF_effort_controller) are required for the autonomous drive node to issue velocity commands.Skip this step if you launched
my_world.launch in the previous step — it already includes agribot_control.launch.Launch the GPS converter node
Open a new terminal and start the GPS data conversion node. This node reads the simulated GPS fix topic, converts raw GPS coordinates into a local Cartesian frame, and prompts you to enter a goal position.When prompted, enter the latitude and longitude of your navigation goal. The node will compute the bearing and distance from the robot’s current GPS position to the goal.
Skip this step if you launched
my_world.launch — it already starts this node in an xterm terminal automatically.Launch the data manipulation node
Open a new terminal and start the sensor data manipulation node. This node applies a Moving Median filter and a single-dimension Kalman filter to reduce GPS and magnetometer noise before passing heading corrections to the drive controller.
Skip this step if you launched
my_world.launch — it already starts this node in an xterm terminal automatically.Launch the autonomous drive node
Open a new terminal and start the autonomous drive node. AGRIBOT will now use the filtered GPS bearing data to navigate toward the goal coordinates you entered.The robot drives forward along the computed heading, correcting its course using the magnetometer and GPS feedback loop. Watch Gazebo to observe AGRIBOT moving through the farm rows.
Visualizing in Mapviz
Mapviz is a ROS visualization tool that renders the robot’s GPS trace on a map canvas. Launch it in a separate terminal:autonomous_drive nodes:
- Green points — the endpoints of each crop row in the field, used as intermediate waypoints.
- Blue line — the continuous GPS trajectory traced by AGRIBOT as it navigates.
/agribot/camera/image_raw can also be fed directly into the Bonnet CNN classification model for real-time crop-weed segmentation alongside navigation.