Introduction
It’s been a few months since I installed ROS2, and honestly… I’ve just been letting it sit there.
Sure, I could say, “Well, I’ve been busy with hardware development,” but software is just as important.
So, I finally decided it’s time to dive in.
Trying Out TurtleSim
When you open ROS2 books, you’ll find all sorts of sample programs.
Among them, TurtleSim looked simple and fun—so I gave it a try.
“Wait, the turtle just moves?”
If that’s your reaction, you’re probably experienced.
But here’s the thing: if it moves with the keyboard, that means there are publishers (senders) and subscribers (receivers) working in the background.
For a beginner like me, this is the perfect starting point.
With a little help from ChatGPT, I ran these commands:
# Main node
ros2 run turtlesim turtlesim_node
# Keyboard control (keep active in the foreground)
ros2 run turtlesim turtle_teleop_key
# Turtle position info
ros2 topic echo /turtle1/pose
Here’s what it looks like when everything’s running:
Ah, I see! The position data is constantly being exchanged in the background.
If I can handle this data in Python, I should be able to make the turtle do all sorts of moves.
Trying to Draw a Spiral → Chaos Ensues
So I thought: “If I add a publisher that draws small circles while moving with the keyboard, won’t that create a spiral?”
But then, ROS complained that the publishers were conflicting.
When I asked ChatGPT, it suggested: “Why not merge them?” and even wrote some Python code.
Then came the unexpected question:
“Do you usually create a custom workspace for modified versions?”
Well, when asked like that, I had to answer “Yes.”
And that’s where the trouble began.
Turns out, I hit a bug in ROS 2 Jazzy + Python 3.12 where the new directory ended up completely empty.
I tried following ChatGPT’s advice and manually fixing it, but…
My energy ran out, and so did GPT-5’s session limit. That’s where I stopped for now.
Wrap-Up
This time, I played around with TurtleSim in ROS2, with a lot of help from ChatGPT.
I tested on Ubuntu, but I’m pretty sure it would also run on Windows using a virtual environment (if I remember correctly).
The key takeaway: TurtleSim might look simple, but it’s deeper than it seems once you start working with position data.
I’ll save the spiral-drawing challenge for next time.
Even just “making the turtle move” is a great entry point for learning how ROS2 works.
Next time, I’ll make sure my turtle draws a perfect spiral! 🐢✨
