Skip to content

Repository files navigation

turtlesim_rclgd

A 100% feature-complete reimagining of the classic ROS 2 turtlesim package, built natively in the Godot 4 game engine using the rclgd bindings.

This package serves as both a drop-in replacement for the original tutorials node and a demonstration of writing native ROS 2 GUI applications and simulators in Godot 4.

Features Supported

This package implements all mechanics and interfaces from the original C++ ros2_tutorials/turtlesim, including:

  • Topics:
    • /<turtle>/cmd_vel (geometry_msgs/msg/Twist)
    • /<turtle>/pose (turtlesim/msg/Pose)
    • /<turtle>/color_sensor (turtlesim/msg/Color)
  • Services:
    • /spawn (turtlesim/srv/Spawn)
    • /kill (turtlesim/srv/Kill)
    • /reset (std_srvs/srv/Empty)
    • /clear (std_srvs/srv/Empty)
    • /<turtle>/set_pen (turtlesim/srv/SetPen)
    • /<turtle>/teleport_absolute (turtlesim/srv/TeleportAbsolute)
    • /<turtle>/teleport_relative (turtlesim/srv/TeleportRelative)
  • Parameters:
    • background_r, background_g, background_b live color reloading.
  • Physics:
    • Exact bounding wall clamping (stops at map edge, zero velocity).
    • 1.0 second velocity command timeout.

Requirements

  • ROS 2 (Humble, Iron, Jazzy, etc.)
  • Godot 4.x
  • rclgd GDExtension installed in this package or the workspace.

Building and Running

To build the package:

cd ~/rclgd_ws
colcon build --packages-select turtlesim_rclgd
source install/setup.bash

To run the node:

ros2 run turtlesim_rclgd turtlesim_rclgd

About

A reimplementation of ros2 classic example using godot and rclgd

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages