Skip to content

Commit

Permalink
Cleanup for PR
Browse files Browse the repository at this point in the history
File Cleanup for PR, resetting irrelevant notebooks

File Cleanup for PR

Cleanup
  • Loading branch information
ldania authored and IsabelParedes committed Mar 3, 2023
1 parent fed4ae4 commit 5171864
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 284 deletions.
41 changes: 6 additions & 35 deletions notebooks/ROS2_Keyboard_Input.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -24,7 +24,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -37,7 +37,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -46,7 +46,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -62,38 +62,9 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "bbc3405979ce48918e210c79dbe99979",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Canvas()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "918427091a334342b8673302f787ab75",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"key_send = jr2.KeyInput(key_node, String, '/keyboard_stream')\n",
"key_send.display_inputs()"
Expand Down
74 changes: 2 additions & 72 deletions notebooks/ROS2_Publisher_Subscriber.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,7 @@
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0abfdd19ee5046a6b1ee60f6a50d2810",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Button(description='Start', style=ButtonStyle()), Button(description='Stop', sty…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"#Method 1 of subscribing and printing data\n",
"sub = jr2.Subscriber(test_node, Pose, '/Pose', cb, print_incoming_msg=True)\n",
Expand All @@ -88,68 +73,13 @@
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "90d8e251e05e4d68b62efce7f0456b1a",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(Label(value='position'), HBox(children=(Label(value='x', layout=Layout(width='100px')), FloatTe…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"#Method 1 of publishing to node\n",
"pub = jr2.Publisher(test_node, Pose, '/Pose')\n",
"pub.display()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b364f7b6729b471d85c42a0c02fe79c8",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Button(description='Start', style=ButtonStyle()), Button(description='Stop', sty…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#Method 1 of subscribing and printing data\n",
"sub = jr2.Subscriber(test_node, String, '/pose_stream', cb, print_incoming_msg=True)\n",
"sub.display()"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
95 changes: 21 additions & 74 deletions notebooks/ROS2_Turtlesim.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,
"id": "7259a8b6",
"metadata": {},
"outputs": [],
Expand All @@ -23,7 +23,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "1964ecfc-67ee-47bf-aad3-824315c4418d",
"metadata": {},
"outputs": [],
Expand All @@ -37,7 +37,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "47354d6d-8c92-47ce-9f85-c0c1e403d8bf",
"metadata": {},
"outputs": [],
Expand All @@ -48,47 +48,24 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "2dbf024d",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"turtle1 has spawned.\n"
]
}
],
"outputs": [],
"source": [
"turtlesim = turtle.TurtleSim(background_color=\"#0000FF\")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "2bfe401a-2a01-4f75-839a-411b221bac8e",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f7e9060702e74556b7652d4a783d9768",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"MultiCanvas(height=1600, layout=Layout(width='100%'), width=1600)"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"display(turtlesim.canvas)"
]
Expand All @@ -103,20 +80,12 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "497db1e0-8c21-4ec0-b620-1607ab34d685",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'x': 800, 'y': 800, 'theta': 0}\n"
]
}
],
"outputs": [],
"source": [
"poses = {}\n",
"\n",
Expand All @@ -136,25 +105,10 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "cd2e66dc",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9a96ef62b2b440e0a6edd111a08f2a22",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Button(description='Start', style=ButtonStyle()), Button(description='Stop', sty…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"topic_name = '/Pose'\n",
"def move_turtles(msg):\n",
Expand Down Expand Up @@ -186,25 +140,10 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "c9e44409-1f96-426f-9826-95f2ddff5119",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b9d3b46917c34d3097c23523095f14df",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Output(layout=Layout(border='1px solid gray'))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"%%thread_cell2\n",
"run = True\n",
Expand All @@ -219,6 +158,14 @@
" i += 1\n",
"print(\"Done\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0fd093f5-122e-4006-8ad8-813428356fbe",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Loading

0 comments on commit 5171864

Please sign in to comment.