Hi!
I'm pretty new to ROS (Robot Operating System). I've done quite a few tutorials and I'm starting to get a grasp of it. Right now, I'm looking to build my own little project to really get a better understanding of the way it works.
I'm trying to build a fully autonomous Rubik cube solving robot. However, I'm not quite sure I fully understand what kind of nodes I'd need and how to make them communicate with each other. Here's the structure I'm thinking about:
* Node for the running camera. Outputs color images.
* Node for the servo motors (turns the Rubik Cube). Input is a sequence of moves to solve the cube. Using an Arduino.
* Node with the main Python code. This is the part I'm not quite sure about.
The Python code node works like this:
1. Subscribes to the camera, takes the 1st image, saves it as cube face #1.
2. Publishes a signal to the servos to rotate the cube.
3. Repeats steps 1 and 2 until all 6 faces have been saved.
4. Process saved faces to obtain current cube configuration (associates a color to every position)
5. Finds a solution for the Rubik cube.
6. Publishes the sequence of moves to the Arduino
Is this the right way to do things? Should I change the structure? Also, I'm not quite sure I understand how the publishing/subscribing will work considering the nodes will be sending messages back and forth. I have already implemented the Python code (without the subscribing/publishing) - However, I don't really understand how to add it to a node.
I'm really eager to learn so please do not hesitate to point me in the right direction, or to point me towards a good read or similar example. In particular, any example where two nodes communicate back and forth and waiting for a signal before executing part of the code would be appreciated!
↧