Skip to content

Commit

Permalink
fix: clear the notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
lvjonok committed Jun 29, 2024
1 parent fa23288 commit 47ae179
Showing 1 changed file with 14 additions and 84 deletions.
98 changes: 14 additions & 84 deletions examples/match_energy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -21,7 +21,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -40,7 +40,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -49,7 +49,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -61,20 +61,9 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(array([-1.21974604, 0. ]), -1.2197460404740708)"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"mjdata.qpos[:] = q.copy()\n",
"mjdata.qvel[:] = v.copy()\n",
Expand All @@ -89,20 +78,9 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(-1.2197457679147197, [-1.2197457679147197, 0.0])"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"(\n",
" np.sum(\n",
Expand All @@ -120,23 +98,9 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"((60,),\n",
" array([ 6.73326000e-01, 1.66311522e-06, -1.69664685e-04, 1.56021081e-02,\n",
" 1.64484975e-03, -5.95801269e-08, 1.08083746e-03, -4.38536417e-07,\n",
" 4.43147004e-06, 8.39403034e-04]))"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"theta = np.concatenate([parameters.get_dynamic_parameters(mjmodel, i) for i in mjmodel.jnt_bodyid])\n",
"\n",
Expand All @@ -145,32 +109,9 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"for body 0 norm of difference is 4.903343079507622e-07\n",
"for body 1 norm of difference is 2.5970031568529883e-06\n",
"for body 2 norm of difference is 2.650078190181762e-07\n",
"for body 3 norm of difference is 3.701542518534774e-07\n",
"for body 4 norm of difference is 8.053173890678282e-08\n",
"for body 5 norm of difference is 7.002258930267969e-08\n"
]
},
{
"data": {
"text/plain": [
"((60,), 2.6839308799870235e-06)"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"params = []\n",
"\n",
Expand All @@ -195,20 +136,9 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"-1.2197460404740712"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"reg_en = regressors.mj_energyRegressor(mjmodel, mjdata)[2]\n",
"\n",
Expand Down

0 comments on commit 47ae179

Please sign in to comment.