Giter Site home page Giter Site logo

bikinematics's Introduction

BiKinematics

Application to analyse mtb suspension kinematics.

Written as a project to learn Python :)

Uses the following main packages:

  • Kivy - GUI
  • Numpy/Scipy - Linkage Simulation
  • Matplotlib - Plotting
  • bikinematicsolver - A library I made to analyse bike supsensions
  • Jupyter - Development/prototyping of solver eqns/maths

Installation

  1. Ideally setup a Python 3.10.11 virtual environment - later python versions should work however I haven't tested.

  2. Install requirements

pip install -r requirements.txt #Python reqs

python -m pip install https://github.com/kivy-garden/matplotlib/archive/master.zip #https://stackoverflow.com/questions/77910687/kivy-2-3-0-attributeerror-figurecanvaskivyagg-object-has-no-attribute-resiz

Usage

Run app

py BiKinematics.py

Features

Current features

  • Background image import
  • Simulated motion of following (tested!) suspension systems - can probably handle more, solver is reasonably general (handles any system that is a single-piv or a 4-bar arrangement with slightly different placed pivots (seems like >80% of suspension despite all the different names/trademarks):
    • Horst Link
    • DW Link
    • Split Pivot (Devinci)
    • Single Pivot
  • Axle Path
  • Leverage ratio calculation
  • Anti squat calculation
  • Results Plotting

To add

  • Other suspension systems (whatever tf yeti is doing, specialised demo/canyon sender with the extra links for shock)
  • Idler pulley support (solver side is almost there, not much more work to be done)
  • Pedal kickback calculations
  • Improved results plotting (axis ranges, data normalising to zero etc..) and graph image saving
  • Slicker UI
  • Write specific optimised solvers for each layout (4 bar, single piv etc)

Guide/Workflow (Slightly out of date - best to load up an example and see what it contains):

Typical workflow for analysing bike image

  1. Add image

  1. Add points
  • Click add point, then click on screen where you want to place it
  • Ground points do not move relative to front triangle (usually attachment to front triangle)
  • Linkage points will move relative to front triangle as suspension compresses
  • Front and rear wheel should be pretty obvious...
  • Note points can be dragged around after placement

  1. Add links between points
  • Click add link, then click the points to add between in turn
  • Add links between any points on the same member (rigidly connected to each other)
  • Add shock between shock mountings
  1. Add wheelbase in User Parameters
  • Allows scaling from px to mm, gives accurate travel distance in simulation
  • Either get from datasheet or adjust until shock eye- eye length (mm) is correct

  1. Save model if desired
  • Will save all geometry and wheelbase values in /SaveFiles/ in json format
  • Note - there are some examples of bikes I have been testing with already in SaveFiles
  1. Simulate for desired travel
  • The results will be saved in /Results/Filename.csv

  1. In plotting screen, select data and desired characteristics to be plotted
  • Note all simulated results saved can be loaded in, so multiple different bikes can be compared

bikinematics's People

Contributors

dependabot[bot] avatar mark-bak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

logharv

bikinematics's Issues

Running the program

Hello, I tried to run your project through your instructions but it seems that something goes wrong : the installation stops when it hits the Kivy part (seems like the error is related to win32 but i am on macOS) and installing kivy manually doesn't solve the issue so i get a "from KivyWidgets.mainpage import MainPage, ModuleNotFoundError: No module named 'KivyWidgets'" error when running BiKinematics.py.
Have you any idea to fix this ? I really want this to work :(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.