packages = ['numpy', 'matplotlib']

# Exercise 5.aForward dynamics

Forward dynamics is the problem of computing the joint (angular) accelerations of a robot given the applied joint torques. This allows us to construct physical models that can predict the next steps of the motion when applying certain torques. You can read about forward dynamics in Section 6 of the RCFS documentation.

The goal of this exercise is to familiarize with the dynamics of a 2D planar manipulator. You can move the robot by dragging its joints using the left mouse button.

• Use your mouse to perturb the robot and observe the effect of the dynamics.
• Change param.l, param.l_m and param.damping to see how these parameters affect the dynamics. Note that some parameters will produce instable behaviors (if this happens, you can reload the page to restart from a stable initial state).

param.l = [2, 2] # Robot links lengths param.l_m = [1, 1] # Links masses param.damping = 5 # Damping