Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/clearpathrobotics/cpr_gazebo/llms.txt

Use this file to discover all available pages before exploring further.

The Agriculture World is a large, flat outdoor Gazebo simulation environment designed for agricultural robotics research. It features a barn with surrounding fences, a medium-sized solar farm, and a wide open field — making it an ideal testbed for area-coverage algorithms, precision navigation, and autonomous field operations. The flat terrain gives ground-truth mobility to wheeled platforms without the complexity of elevation changes, while the structural landmarks provide natural reference points for localization and mission planning.

Supported Platforms

The Agriculture World supports the following Clearpath robot platforms. The default platform is Husky.
Platformplatform Value
Huskyhusky (default)
Jackaljackal
Warthogwarthog
The platform argument defaults to the CPR_GAZEBO_PLATFORM environment variable if set, otherwise husky is used.

Launching

1

Launch with the default platform (Husky)

Start the Agriculture World simulation with a Husky robot spawned at the default position:
roslaunch cpr_agriculture_gazebo agriculture_world.launch
2

Launch with a different platform

Use the platform argument to spawn a Jackal or Warthog instead:
roslaunch cpr_agriculture_gazebo agriculture_world.launch platform:=jackal
roslaunch cpr_agriculture_gazebo agriculture_world.launch platform:=warthog
3

Launch with a custom spawn position

Override the robot’s initial position and heading using the robot_x, robot_y, robot_z, and robot_yaw arguments:
roslaunch cpr_agriculture_gazebo agriculture_world.launch \
  robot_x:=10.0 \
  robot_y:=5.0 \
  robot_z:=0.2 \
  robot_yaw:=1.5707963267948966
Always set robot_z to a value above ground level (e.g. 0.2). If the robot spawns below the ground plane before the world geometry has fully rendered, it may fall through the terrain.

View Without Spawning a Robot

To inspect the world in RViz without spawning any robot, use the view_world launch file:
roslaunch cpr_agriculture_gazebo view_world.launch
This opens the agriculture world geometry in RViz using a robot state publisher, which is useful for reviewing the environment layout before committing to a robot configuration.

Features

The Agriculture World includes the following environment elements:
  • Barn — A full-scale barn model surrounded by fencing, providing a realistic rural landmark for navigation and localization tests.
  • Large open field — A wide, flat area free of obstacles, ideal for developing and evaluating area-coverage path planners.
  • Solar farm — A medium-sized array of solar panels that adds structured geometry to the environment for detection and inspection tasks.

GPS / Real-World Coordinates

The Agriculture World supports real-world GPS coordinates via a datum script. Sourcing datum.bash exports the GAZEBO_WORLD_LAT and GAZEBO_WORLD_LON environment variables, which set the GPS origin (datum point) for the simulation. This is used by the robot_localization package and other ROS navigation tools to convert between ENU (East-North-Up) local coordinates and global latitude/longitude. The Agriculture World datum is located near Carman, Manitoba, Canada:
VariableValue
GAZEBO_WORLD_LAT50.109461
GAZEBO_WORLD_LON-97.318978
Source the datum before launching any ROS nodes that depend on GPS coordinates:
source $(rospack find cpr_agriculture_gazebo)/scripts/datum.bash
This world uses an ENU-aligned coordinate frame. The positive X axis points East, positive Y points North, and positive Z points Up, consistent with the REP-103 convention used by robot_localization and navsat_transform_node.

Launch File Arguments

The following arguments are accepted by agriculture_world.launch. Most have sensible defaults and only need to be overridden for non-standard configurations.
platform
string
default:"husky"
The robot platform to spawn. Supported values: husky, jackal, warthog. Falls back to the CPR_GAZEBO_PLATFORM environment variable if set.
robot_x
float
default:"0.0"
Robot spawn position along the X axis (metres).
robot_y
float
default:"0.0"
Robot spawn position along the Y axis (metres).
robot_z
float
default:"0.2"
Robot spawn height above the ground plane (metres). Keep above 0.0 to avoid falling through unrendered terrain.
robot_yaw
float
default:"0.0"
Robot spawn heading in radians. 0.0 faces East; 1.5707963267948966 (π/2) faces North.
world_x
float
default:"0.0"
World geometry spawn offset along X (metres).
world_y
float
default:"0.0"
World geometry spawn offset along Y (metres).
world_z
float
default:"0.0"
World geometry spawn offset along Z (metres).
world_yaw
float
default:"0.0"
World geometry spawn rotation in radians.
gui
bool
default:"true"
Set to false to launch Gazebo in headless mode (no graphical window).
headless
bool
default:"false"
Set to true to run the Gazebo server without the client GUI.
use_sim_time
bool
default:"true"
Use Gazebo’s simulated clock for ROS time. Should remain true in most simulation scenarios.
world_name
string
default:"actually_empty_world.world"
Path to the Gazebo .world file used as the base environment. The agriculture world geometry is loaded as a separate URDF model on top of this base world.

Build docs developers (and LLMs) love