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 cpr_accessories_gazebo package provides two reusable URDF xacro macros for placing simulation props in any Gazebo environment: the Clearpath base station (a tripod-mounted communications mast) and the Wibotic TR-301 wireless charge dock. Both macros follow the same interface — a name, a parent link, and an origin block — making them straightforward to drop into any world geometry file. They are already used across several CPR Gazebo environments, including cpr_empty_gazebo, cpr_agriculture_gazebo, cpr_inspection_gazebo, and cpr_orchard_gazebo.
These models are visual and collision props only. No sensor data, network communication, or battery charging behavior is simulated. They are provided to give environments realistic landmarks and to support annotation or mapping workflows that benefit from a recognizable reference object.

Base Station (cpr_base_station macro)

The base station macro inserts a Clearpath base station mesh (tripod with mast) as a fixed link in your robot or world URDF.

Macro signature

<xacro:macro name="cpr_base_station" params="name parent *origin">

Parameters

name
string
required
Base name used for the generated link (${name}_link) and joint (${name}_joint). Must be unique within your URDF.
parent
string
required
The name of the parent link to attach the base station to. In world geometry files this is typically the root world link (e.g., world, empty_world_link).
origin
block
required
An xacro:origin block (or plain origin element) specifying the position and orientation of the base station relative to the parent link. Passed through xacro:insert_block.

Usage example

<xacro:include filename="$(find cpr_accessories_gazebo)/urdf/base_station.urdf.xacro" />

<xacro:cpr_base_station
  name="base_station"
  parent="world">
  <origin xyz="50 50 0" rpy="0 0 0" />
</xacro:cpr_base_station>
The visual geometry is the BaseStationWithTripod.dae mesh and the collision geometry uses the corresponding BaseStationWithTripod.stl — both resolved from the cpr_accessories_gazebo package. No visual origin offset is applied; the mesh origin sits at the base of the tripod feet.

Charge Dock (cpr_charge_dock macro)

The charge dock macro inserts a Wibotic TR-301 wireless charging pad as a fixed link. The TR-301 mesh has a built-in visual and collision offset so that the dock face is correctly oriented regardless of the joint origin you specify.

Macro signature

<xacro:macro name="cpr_charge_dock" params="name parent *origin">

Parameters

name
string
required
Base name used for the generated link (${name}_link) and joint (${name}_joint). Must be unique within your URDF.
parent
string
required
The name of the parent link to attach the charge dock to. Typically the root world link in environment geometry files.
origin
block
required
An xacro:origin block specifying the pose of the charge dock relative to the parent link. Passed through xacro:insert_block.

Usage example

<xacro:include filename="$(find cpr_accessories_gazebo)/urdf/charge_dock.urdf.xacro" />

<xacro:cpr_charge_dock
  name="charge_dock"
  parent="world">
  <origin xyz="5 0 0" rpy="0 0 0" />
</xacro:cpr_charge_dock>
The visual and collision geometries both use WiboticTR301.dae / WiboticTR301.stl, resolved from the cpr_accessories_gazebo package. Both have a built-in origin offset of -0.35 m on X and a 90° rotation about Z (rpy="0 0 1.5707963267948966") applied inside the macro, so the dock face points in the correct direction relative to the joint origin you supply.

Usage in World Environments

Several CPR Gazebo worlds already use these macros to populate their scenes:
World packageBase stationCharge dock
cpr_empty_gazebo✅ at (50, 50, 0) relative to world link✅ position configurable via CPR_SIMULATION_DOCK_X/Y/YAW env vars
cpr_agriculture_gazebo✅ at (-40, -17, 0.7)✅ at (8, -4, -0.2)
cpr_inspection_gazebo✅ at (0, -12, 1)
cpr_orchard_gazebo✅ at (-2, 1, 0)
Refer to the geometry xacro files in each world package for the exact include and invocation patterns used in those environments.

Adding the Dependency

To use the cpr_base_station or cpr_charge_dock macros in your own package, declare a runtime dependency on cpr_accessories_gazebo in your package.xml:
<depend>cpr_accessories_gazebo</depend>
Then include the relevant xacro file at the top of your URDF:
<!-- Base station -->
<xacro:include filename="$(find cpr_accessories_gazebo)/urdf/base_station.urdf.xacro" />

<!-- Charge dock -->
<xacro:include filename="$(find cpr_accessories_gazebo)/urdf/charge_dock.urdf.xacro" />
Both macros can be included in the same file simultaneously.

Build docs developers (and LLMs) love