Examples
Clone this wiki locally
This page lists the examples provided with JetBot.
Make sure your robot is connected to WiFi as described in the software setup
Example 1 - Basic Motion
In this example we'll control JetBot by programming from a web browser.
-
Connect to your robot by navigating to
http://<jetbot_ip_address>:8888
-
Sign in with the default password
jetbot
-
Navigate to
~/Notebooks/basic_motion/
-
Open and follow the
basic_motion.ipynb
notebookMake sure JetBot has enough space to move around.
Example 2 - Teleoperation
This example requires a gamepad controller connected to your workstation.
In this example we'll drive JetBot remotely, view live streaming video, and save snapshots!
-
Connect to your robot by navigating to
http://<jetbot_ip_address>:8888
-
Sign in with the default password
jetbot
-
Shutdown all other running notebooks by selecting
Kernel
->Shutdown All Kernels...
-
Navigate to
~/Notebooks/teleoperation/
-
Open and follow the
teleoperation.ipynb
notebook
Example 3 - Collision avoidance
In this example we'll collect an image classification dataset that will be used to help keep
JetBot safe! We'll teach JetBot to detect two scenarios free
and blocked
. We'll use this AI classifier to prevent JetBot from entering dangerous territory.
Step 1 - Collect data on JetBot
We provide a pre-trained model so you can skip to step 3 if desired. This model was trained on a limited dataset using the Raspberry Pi V2 Camera with wide angle attachment.
-
Connect to your robot by navigating to
http://<jetbot_ip_address>:8888
-
Sign in with the default password
jetbot
-
Shutdown all other running notebooks by selecting
Kernel
->Shutdown All Kernels...
-
Navigate to
~/Notebooks/collision_avoidance/
-
Open and follow the
data_collection.ipynb
notebook
Step 2 - Train neural network
Option 1 - Train on Jetson nano
-
Shutdown your robot and remove the micro USB power cable.
-
Power the Jetson Nano by using the 5V wall power supply.
-
Connect to your robot by navigating to
http://<jetbot_ip_address>:8888
-
Sign in with the default password
jetbot
-
In the Jupyter Lab tab, navigate to
~/collision_avoidance
-
Upload the collision avoidance training notebook to this folder
-
Open and follow the
train_model.ipynb
notebook
Option 2 - Train on other GPU machine
-
Connect to a GPU machine with PyTorch installed and a Jupyter Lab server running
-
Upload the collision avoidance training notebook to this machine
-
Open and follow the
train_model.ipynb
notebook
Step 3 - Run live demo on JetBot
-
Power your robot from the USB battery pack
-
Connect back to your robot by navigating to
http://<jetbot_ip_address>:8888
-
Sign in with the default password
jetbot
-
Shutdown all other running notebooks by selecting
Kernel
->Shutdown All Kernels...
-
Navigate to
~/Notebooks/collision_avoidance
-
Open and follow the
live_demo.ipynb
notebookStart cautious and give JetBot enough space to move around.
Video
This video shows multiple JetBots running collision avoidance
Example 4 - Object Following
In this example we'll have JetBot follow an object using a pre-trained model capable of detecting common objects likePerson
, Cup
, and Dog
. While doing this, JetBot will run the collision avoidance model from Example 3 to make sure it stays safe!
-
Download the object detection model according to the table below
JetBot SD Card Version Model v0.3 ssd_mobilenet_v2_coco.engine v0.4 (latest) ssd_mobilenet_v2_coco.engine -
Connect to your robot by navigating to
http://<jetbot_ip_address>:8888
-
Shutdown all other running notebooks by selecting
Kernel
->Shutdown All Kernels...
-
Navigate to
~/Notebooks/object_following/
-
Upload the pre-trained
ssd_mobilenet_v2_coco.engine
model to this folderAlso make sure the collision avoidance model from Example 3 is in
~/Notebooks/collision_avoidance
-
Open and follow the
live_demo.ipynb
notebookStart cautious and give JetBot enough space to move around.
Video
This video shows JetBot following a person and avoiding obstacles
Next
Make JetBot smarter
- Collect more collision avoidance data
- Try out different neural network architectures (the torchvision package has lots!)
- Modify the collision avoidance example for a new task (ie:
cat
/no cat
. ifcat
thenrun
)
Create something entirely new!
- Modify the collision avoidance example for your own project
- Try out some new hardware with Jetson Nano. It's easy with Jetson GPIO and Adafruit Blinka
Share it with us