GUI

Top level description of the whole gui program and modules

Below is the flow chart of the whole gui system.

Flow Chart of the System
HTML file of the diagram

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

  1. GepettoApp.py is opened, the gui program that user interacts with

  2. User gives motor locations and combination first to create background schematic.

  3. After motors are placed, user gives frame points and frame durations for each frame

  4. 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

  5. User presses "Done" button and the gui program closes, saves points to a txt file for interpolation

interpolate_points.py steps

  1. interpolate_points.py takes points from this txt file and interpolates a curved path.

  2. After interpolating, divides each frame into multiple frames on this curved path.

  3. Extracts new points and durations between these new points linear with distance between points

  4. Shows an output graph which is the curved path

  5. User closes this graph window and the new points and durations are written to a txt file for next module

motor_params.py steps

  1. motor_params.py takes these points from interpolation, and converts to motor parameters.

  2. Each point are in terms of meters, we know makara radius, motor one turn step number so conversion is simple two equations:

    1. number of turns = distance / (2*Pi*radius)

    2. number of steps = (number of turns) * (one turn step number

  3. 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)

  4. After converting all steps distances and step speeds, the outputs are written into a to a txt file

  5. Also these outputs are converted to json file and send to the web with web_comm module.

move_to_vs_t.py

  1. This module was the smoothing module, but it wasn't robust so not used now

  2. This module takes the unsmoothed frames from motor_params.py program.

  3. Using Step vs Time graph, it tries to interpolate those points to get smooth velocity changes

Last updated

Was this helpful?