Created
October 27, 2013 08:05
-
-
Save scpeters/7179025 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"This is a rough draft of documentation for Gazebo's Physics Accuracy benchmarks.\n", | |
"\n", | |
"This document will describe simple motion of a rigid body for which analytical solutions can be computed.\n", | |
"\n", | |
"Consider a rigid body with mass $m$,\n", | |
"body-fixed inertia matrix $\\textbf{I}$,\n", | |
"center of mass (com) location $\\textbf{c}$,\n", | |
"orientation quaternion $\\textbf{q}$,\n", | |
"and body-fixed angular velocity $\\boldsymbol{\\omega}$.\n", | |
"\n", | |
"Let $\\textbf{R}(\\textbf{q})$ be the rotation matrix from an inertial frame to the coordinate frame given by $\\textbf{q}$.\n", | |
"\n", | |
"For time $t$, denote the initial conditions\n", | |
"$\\textbf{c}(t=t_0) = \\textbf{c}_0$,\n", | |
"$\\dot{\\textbf{c}}(t=t_0) = \\dot{\\textbf{c}}_0$,\n", | |
"$\\textbf{q}(t=t_0) = \\textbf{q}_0$,\n", | |
"$\\boldsymbol{\\omega}(t=t_0) = \\boldsymbol{\\omega}_0$.\n", | |
"\n", | |
"Let $\\textbf{p}(t)$ represent linear momentum as $\\textbf{p}(t) = m \\dot{\\textbf{c}}(t)$,\n", | |
"with an initial value of $\\textbf{p}_0$.\n", | |
"\n", | |
"Let $\\textbf{H}(t)$ represent the angular momentum with respect to the center of mass, expressed in an inertial frame,\n", | |
"as $\\textbf{H}(t) = \\textbf{R}^T(\\textbf{q}(t))\\textbf{I}\\boldsymbol{\\omega}(t)$,\n", | |
"and an initial value of $\\textbf{H}_0$\n", | |
"\n", | |
"Let $T$ represent the kinetic energy as\n", | |
"$T = \\frac{1}{2} m \\dot{\\textbf{c}}^T \\dot{\\textbf{c}} +\n", | |
" \\frac{1}{2} \\textbf{I} \\boldsymbol{\\omega}^T \\boldsymbol{\\omega}$,\n", | |
"and an initial value of $T_0$\n", | |
"\n", | |
"1. In a gravity-free environment with no external forces, linear, angular momentum, and energy are conserved.\n", | |
"\n", | |
" * Linear momentum implies:\n", | |
" $\\textbf{p}(t) = \\textbf{p}_0$,\n", | |
" $\\dot{\\textbf{c}}(t) = \\dot{\\textbf{c}}_0$,\n", | |
" $\\textbf{c}(t) = \\textbf{c}_0 + \\dot{\\textbf{c}}_0(t-t_0)$\n", | |
"\n", | |
" * Angular momentum implies:\n", | |
" $\\textbf{H}(t) = \\textbf{H}_0$,\n", | |
" $\\textbf{R}^T(\\textbf{q(t)})\\textbf{I}\\boldsymbol{\\omega}(t) =\n", | |
" \\textbf{R}^T(\\textbf{q}_0)\\textbf{I}\\boldsymbol{\\omega}_0$\n", | |
"\n", | |
"1. With gravity vector $\\textbf{g}$ acting:\n", | |
"\n", | |
" * Newton implies:\n", | |
" $\\dot{\\textbf{p}}(t) = m \\textbf{g}$,\n", | |
" $\\dot{\\textbf{c}}(t) = \\dot{\\textbf{c}}_0 + m \\textbf{g} (t-t_0)$,\n", | |
" $\\textbf{c}(t) = \\textbf{c}_0 + \\dot{\\textbf{c}}_0(t-t_0) + \\frac{1}{2} m \\textbf{g} (t-t_0)^2$\n", | |
"\n", | |
" * Angular momentum: see above.\n", | |
"\n", | |
" * Energy conservation: define potential energy $V$ based on gravity direction." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [] | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment