Skip to content

A small library of classes and methods that can control a NVIDIA Jetson Jetbot. Includes camera and gamepad functionality. Works on Linux.

License

Notifications You must be signed in to change notification settings

Klattet/JetbotControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A library with classes and functions to help control a JetBot.

Goal

Make it easy to interface with the JetBot in your code so that you can focus on what really matters.

Background

In college, I had several courses that involved self-driving robots and machine learning. I was lent an NVIDIA Jetson Nano JetBot, and I was tasked to make it drive autonomously and avoid obstacles by training an image recognition model.

Since I found the official example code hideous and the use of the traitlets library annoying, I decided to make my own module with all the robot interfacing code that I needed at the time.

Someone also told me that it wasn't possible to control the JetBot via gamepad controller directly through the on-board usb ports. So I decided to prove them wrong.

Features

  • Receive input signals directly from an onboard usb gamepad controller.
  • Bind custom functions to execute code based on gamepad input, and even change them at run-time.
  • Initialise camera and receive the latest image frames through an iterator.
  • Drive motors in whichever way you'd like.
  • Scan QR codes through the camera to receive commands.

Dependencies

Dependency Usecase
Adafruit_MotorHAT A depreciated version of the Adafruit MotorHAT library used to interface with the motors.
numpy To work with the image data delivered by OpenCV that is in numpy matrices format.
OpenCV-Python To read images from the camera and to scan QR codes.

After cloning this repo, I recommend creating a virtual environment with:

python -m venv .venv

Then activating it with:

source .venv/bin/activate

Run the command below to install dependencies.

pip install -r requirements.txt

About

A small library of classes and methods that can control a NVIDIA Jetson Jetbot. Includes camera and gamepad functionality. Works on Linux.

Resources

License

Stars

Watchers

Forks

Languages