Skip to content

Latest commit

 

History

History
37 lines (19 loc) · 3.42 KB

README.md

File metadata and controls

37 lines (19 loc) · 3.42 KB

Freemocap Slackline Project

https://humon-research-lab.github.io/freemocap_slackline_project/

This is the repo for the project that will do biomechanical analysis of slackline data, especially looking at the relationship between Center of Mass (CoM) and Base of Support (BoS). Possibly using 'cart and pendulum,' 'PD' controller types of approaches.

ODEPendulum.py

Models and displays/saves an animation of a simple pendulum. Uses Scipy's ODE solver and an object-oriented structure in order to make it a solid jumping off point for more complex pendulum modeling and animations, including cart and pendulum and double pendulums.

The initial parameters, including simulation length, pendulum angle and velocity, and force of gravity, can all be changed in the __init__ function of the Pendulum class. The animation can be displayed, saved, or both by changing the parameters of the main function.

ode_simple_pendulum_animation.mp4

CartAndPendulum.py

Models and animates a cart and pendulum controlled by a PID controller. It is built off of the structure of ODEPendulum.py, and is able to balance the pendulum from a range of initial conditions within 5 seconds. It must start with a roughly upright pendulum - it is not able to perform a swing-up operation.

The initial parameters, including simulation length, pendulum angle and velocity, cart position and velocity, and desired cart position, can all be changed in the __init__ function of the Pendulum class. The PID controller can be altered by changing the gains in the set_pid_gains function of the Pendulum class. The animation can be displayed, saved, or both by changing the parameters of the main function.

cart_pendulum_animation.mp4

DoublePendulum.py

Models and animates a double pendulum without a controller or any friction force. It is built off of the structure of ODEPendulum.py, and shows the highly chaotic nature of double pendulums.

The initial parameters, including simulation length, pendulum angles, lengths, masses, and velocities, can all be changed in the __init__ function of the DoublePendulum class. The animation can be displayed, saved, or both by changing the parameters of the main function.

double_pendulum_animation.mp4

SpringedCartAndPendulum.py

A very similar cart and pendulum system to CartAndPendulum.py, but with a horizontal spring attached to the cart, which pulls on the cart back towards the origin. The cart is controlled with a PD controller, and within a range of spring constants is still able to balance the pendulum. A derivation of simulation parameters related to the spring is given in SpringedCartAndPendulumJustification.md.

The initial parameters, including spring constant, system mass, pendulum angle and velocity, cart position and velocity, and desired cart position, can all be changed in the __init__ function of the Pendulum class. The PID controller can be altered by changing the gains in the set_pid_gains function of the Pendulum class. The animation can be displayed, saved, or both by changing the parameters of the main function.

spring_cart_pendulum_animation.mp4