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 Orchard World is a large, flat outdoor Gazebo simulation environment modelling a working orchard. Parallel rows of small trees are separated by dirt path lanes, creating a highly structured navigation space well suited to row-following, inter-row coverage, and agricultural path planning research. The terrain is slightly uneven underfoot — small surface bumps simulate realistic dirt-field conditions — but the overall landscape remains essentially flat, keeping the focus on lateral navigation between tree rows rather than on elevation challenges. Wide, clear turn-around areas at each end of the orchard provide space for robots to reverse direction between passes.

Supported Platforms

The Orchard 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 Orchard World simulation with a Husky robot spawned at the default position:
roslaunch cpr_orchard_gazebo orchard_world.launch
The default spawn position is (-11.0, 9.0, 0.2) with a yaw of 1.5707963267948966 (π/2 radians, facing North), placing the robot in a turn-around area at one end of the orchard rows.
2

Launch with a different platform

Use the platform argument to spawn a Jackal or Warthog instead:
roslaunch cpr_orchard_gazebo orchard_world.launch platform:=jackal
roslaunch cpr_orchard_gazebo orchard_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_orchard_gazebo orchard_world.launch \
  robot_x:=-11.0 \
  robot_y:=9.0 \
  robot_z:=0.2 \
  robot_yaw:=1.5707963267948966
Always set robot_z to a small positive value (e.g. 0.2) above the ground plane. If the robot spawns at or below ground level 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_orchard_gazebo view_world.launch
This opens the orchard world geometry in RViz using a robot state publisher, allowing you to survey the tree-row layout and path geometry before selecting a robot and spawn configuration.

Features

The Orchard World includes the following environment elements:
  • Rows of trees — Many parallel rows of small trees evenly spaced to create clearly defined lane corridors, ideal for structured row-following navigation.
  • Dirt path lanes — Unpaved dirt paths running between each row of trees, providing natural navigation channels with slightly irregular surface geometry.
  • Wide turn-around areas — Larger open zones at each end of the orchard rows where robots can manoeuvre, reverse direction, and transition between rows without obstacle interference.
  • Slightly bumpy terrain — The ground surface has small undulations that simulate a real agricultural field, exercising chassis suspension and odometry robustness without presenting major elevation obstacles.
When developing row-following or coverage planners, use the wide, flat areas at each end of the orchard as staging zones. The extra open space makes them safe locations to spawn the robot, perform initial localisation, and execute U-turn manoeuvres between passes down the tree rows.

GPS / Real-World Coordinates

The Orchard 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 Orchard World datum is located in central Greece:
VariableValue
GAZEBO_WORLD_LAT39.512152
GAZEBO_WORLD_LON22.426669
Source the datum before launching any ROS nodes that depend on GPS coordinates:
source $(rospack find cpr_orchard_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 orchard_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:"-11.0"
Robot spawn position along the X axis (metres).
robot_y
float
default:"9.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:"1.5707963267948966"
Robot spawn heading in radians. The default of 1.5707963267948966 (π/2) faces the robot North — aligned with the direction of the tree rows.
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 orchard geometry is loaded as a separate URDF model on top of this base world, matching the approach used by the Agriculture World.

Build docs developers (and LLMs) love