Time to start your first complete project with ROS 2!
For this project you will use the Turtlesim package as a simulation tool, so you can visualize what the robot is doing.
Before going further, make sure you’ve watched the video with the final result you should get (“Turtlesim Project - Final Result Overview” video).
If this sounds hard, well, yes, it’s certainly harder than what we previously did in this course. But it’s totally doable if you’ve understood the concepts, how to apply them, and of course if you take enough time to work on the project.
At any time feel free to come back to previous lessons on the course. Solving problems when you work on a project is one of the best ways to learn, because the lessons you’ll watch again will be directly linked to a practical problem.
I have separated the solution into different parts, so that it will be easier for you to navigate. Also, if you really feel stuck at some point, you can watch only one part of the solution, and then go back to work on the next part by yourself.
So:
First try to design the application by yourself. Don’t write code! Just take a piece of paper and make the design. What nodes should you create? How do the nodes communicate between each other? Which functionality should you add, and where to put them? Etc.
Then, either you directly start on your own (let’s call this the hardcore mode), or read the next part where I give you some tips for the design.
Then, work step by step on each functionality/communication. You can decide to break the project as I did, and for each step, write the code, and then watch the solution. Or you can ignore the solution and challenge yourself to do everything by yourself.
Just do as you feel. The more independent you are on the project, the better. However, don’t stay stuck for days or weeks, if you have to watch parts of the solution, it’s fine too. In this case, a nice challenge would be to do the project again a few days later, without any help this time.
Note: the design + code I propose is ONLY one possible solution. You might end up with a totally different code, but still working. And that’s great too! The real goal here is to make what you saw on the demo video (and also keep in mind to make your code clean and scalable).
As an additional help, you can download the code for each step (contains both Python and Cpp code for the step).