Week 17: Oct 11th - 17th
- Neil Bishop
- Oct 16, 2022
- 1 min read
Building Graphics for Arm Positions:
After researching the best way to implement graphics for the arm positions, I decided to go with using a polar graph in the Matplotlib library. This would allow us to display the position of each section of the arm as a vector in a polar graph which would also display the rotations in degrees.
First, I built the polar graphs in a separate program as a mockup to see how well they would work if they were added to the GUI. I did this by building functions like the arm movement functions used in the software for the GUI. These would take in a value in degrees and create a polar graph with a vector.
When the button to go up or down is pressed the vector is moved accordingly. Also, since the vector would only have to move from 0 to 180 degrees, the polar graph was made to only show half of the graph. For the tilt and up/down sections of the arm, the graph would have to be rotated. Using a function of the Matplotlib library, that allows the 0 position of the graph to be oriented in another direction, I was able to rotate the graph so that 0 was pointing down and 180 is pointing up.
Unfortunately, the graphic does not update smoothly and the constant updating of the graphic causes it to blink slightly. This will be researched further to find a way to solve this issue.
Comments