GUI
Top level description of the whole gui program and modules
Last updated
Top level description of the whole gui program and modules
Last updated
Below is the flow chart of the whole gui system.
Programs are divided into modules to simplify the process. Each program communicates with each other via text files. This helps debug each process' output.
To further describe the system in summary, here are the steps:
GepettoApp.py steps
GepettoApp.py is opened, the gui program that user interacts with
User gives motor locations and combination first to create background schematic.
After motors are placed, user gives frame points and frame durations for each frame
When all frames but last one finishes, user ends the frames with RTH, return to home which places new frame points to the starting positions, and gives its duration to make it a loop
User presses "Done" button and the gui program closes, saves points to a txt file for interpolation
interpolate_points.py steps
interpolate_points.py takes points from this txt file and interpolates a curved path.
After interpolating, divides each frame into multiple frames on this curved path.
Extracts new points and durations between these new points linear with distance between points
Shows an output graph which is the curved path
User closes this graph window and the new points and durations are written to a txt file for next module
motor_params.py steps
motor_params.py takes these points from interpolation, and converts to motor parameters.
Each point are in terms of meters, we know makara radius, motor one turn step number so conversion is simple two equations:
number of turns = distance / (2*Pi*radius)
number of steps = (number of turns) * (one turn step number
After that, we know the frame durations, so we can calculate speeds with the following equation
speed = distance / time. In our case distance is step numbers, so this equation looks like this:
speed = (number of steps in frameN - number of steps in frameN-1) / (frame N duration)
After converting all steps distances and step speeds, the outputs are written into a to a txt file
Also these outputs are converted to json file and send to the web with web_comm module.
move_to_vs_t.py
This module was the smoothing module, but it wasn't robust so not used now
This module takes the unsmoothed frames from motor_params.py program.
Using Step vs Time graph, it tries to interpolate those points to get smooth velocity changes