Dongho Kang (DK)
Dongho Kang (DK) Robotician at UT Austin

Impact Simulation

Impact Simulation

This project simulates a “jack” which is made of a 4 point masses inside the square box in a 2D plane. The box is subjected to external forces which will allow jack to experience impacts. This project was done in Jupyter notebook and source codes can be found in my github repository

Results

jackbox
plot

Simulation Setup

Transformation

tf

Vertexes of the bot were represented as {A}, {B}, {C}, and {D} while the edges of it were done as {1}, {2}, {3}, and {4}. Four point masses of jack were shown as {a}, {b}, {c}, and {d} while the World frame is shown as {W}.

Configuration

config

Both the box and jack are free to translate and rotate in a xy-plane

LAGRANGIAN

v1v2
velocity
pe
ke
L

External Force

F
Fext

External force was applied assuming someone is shaking the box.

To ensure that jack hit all four edges of the box, the external force was applied in x-direction since gravitational force will take y-direction to make sure jack hit the all four edges of the box.

Constraint

qlist
qfor

The jack has the constraint that it has to stay within the boundaries of the box.

Phi defines when the point masses of the jack make contacts with the boundaries of the box which are {1}, {2}, {3}, and {4}. There are multiple phi called phi_list in this system, and they are called in a for-loop so that it eliminates the necessity of making multiple impact update functions.

Phi can be expressed with g matrix while g_ij [3] represents x-component and g_ij [7] does y-component.

Euler-Lagrangian

EL

Impact Update Law

qpm
ham
eq

Function ‘impact_condition’ takes phi_list and initial conditions which includes initial positions and velocities, lambdifies phi values, and tolerance to decide the impact condition.

Function ‘impact_update takes initial conditions and impact equations to numerically update impacts

comments powered by Disqus