This 5-bar robot was designed with modularity in mind, so that not only you can make different components for the robot with relative ease, but also to easily visualize the changes on its task-space based on its current geometry. You can change the length of every arm by steps of 2 cm, and you can also change the distance between the servos in the same steps, and then the program to control the robot will show you where the robot can move. You can also give the robot positions to move to by simply clicking on its task-space. Additionally, this robot uses an Arduino Board to control an electromagnet, which can be controlled on the same program.
This robot's main purpose is mostly educational, showing how the task-space and the c-cpace change on a robot given its dimensions, but also integrating that aproach to a real robot to give a better understanding of it.
In regards to the code, there are 4 python programs here, as well as an Arduino sketch borrowed from the examples folder of Arduino IDE:
- cinematica_scara.py contains the functions to calculate the direct and inverse kinematics of the robot, that is, the final position of the robot given the angles, and the angles given the position, respectively.
- plot_task_space.py contains the functions to plot the possible angles and points given a certain geometry.
- com_iman.py has the code to send the signals to the Arduino board and control the electromagnet
- Scara.py compiles everything and communicates with the servo controller and the Arduino boards, while also translating everything into a simple user-friendly interface.
- Finally, PhysicalPixel.ino allows Scara.py to establish communication with the Arduino, by reading strings and changing the digital output of ine of its pins to control the electromagnet