Here are links to some of the different arm models that we've been working with, in both Python and Matlab.

Python simulations

Here is Python code that simulates a simple 2 link arm model. There is Python only code (, and a simulation generated from MapleSim and compiled down to some highly optimized C code (

To compile the MapleSim simulator, download the folder and run "python build_ext -i".

2 Link Arm Python code

Matlab simulations

Here is Matlab code that simulates a simple arm model. To add forces to the arm, you can use the keys 'q' and 'w' for the shoulder and 'o' and 'p' for the elbow. Should be able to just paste and run this in recent Matlab versions.

2 Link Arm Matlab code