Installation¶
This guide explains how to build rclgd and provision the Godot editor it targets.
Prerequisites¶
ROS 2 (developed and tested on Jazzy).
A colcon workspace (e.g.
~/ros2_ws).Build essentials for C++ ROS 2 packages (
colcon, a compiler,rosdep).
You do not need to install Godot yourself: rclgd pins the exact engine version it was compiled against and downloads it for you (see The Godot Editor binary below).
Building from Source¶
The repository contains three ROS 2 packages that are built together:
Package |
Type |
Contents |
|---|---|---|
|
ament_cmake |
the GDExtension ( |
|
ament_python |
the |
|
ament_python |
the |
Clone the repository (with the
godot-cppsubmodule):cd ~/ros2_ws/src git clone --recurse-submodules https://github.com/Ozuba/rclgd.git
Install dependencies (pulls in
ros_babel_fishamong others):cd ~/ros2_ws rosdep install --from-paths src --ignore-src -y -r
Build and source:
colcon build --packages-up-to rclgd rclgd_cli colcon_rclgd source install/setup.bash
The Godot Editor binary¶
The build downloads exactly the engine release librclgd was compiled against
— verified against a pinned SHA-512 — and installs it into the prefix as
lib/rclgd/godot-bin, right next to librclgd.so. That's the whole
mechanism: no caches, no environment variables, no extra step; a built (or
apt-installed) rclgd is complete out of the box.
To verify everything is wired up:
ros2 rclgd doctor
doctor checks the ROS environment, the extension library, the launcher,
the version pin and the engine binary, and prints a hint for anything that
is off.
Targeting a different Godot version¶
rclgd supports exactly one engine version per build — the one its godot-cpp
bindings were generated from. To change it:
Retarget the
godot-cppsubmodule to the branch/tag matching the desired version.Edit
GODOT_VERSIONand theGODOT_SHA512_*pins inrclgd/CMakeLists.txtto the matching release (the sums come from the release'sSHA512-SUMS.txt).Rebuild.
The build warns if the pinned version and the submodule's API version disagree.
Running the Godot Editor¶
Always launch the editor through the sourced ROS 2 environment so
librclgd.so and all runtime dependencies resolve:
ros2 rclgd editor <package> # open a built rclgd package's source project
ros2 rclgd editor # current directory, or the project manager
ros2 run rclgd godot # the raw engine binary, no project logic
How extension resolution works¶
Projects created with ros2 rclgd create ship a tiny
addons/rclgd/bin/rclgd.gdextension that references librclgd.so by bare
name. Godot resolves it relative to the running executable, and since the
build installs the engine binary next to librclgd.so in the install
prefix, there is exactly one copy of the library on the machine and
every project uses it. No per-project binaries, no symlinks — packages stay
pure source and fully portable.
Next Steps¶
With installation complete, create your first package with the ros2 rclgd command or head to the Tutorials.