• Stars
    star
    382
  • Rank 112,241 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ROS nodes and Gazebo model for NVIDIA JetBot with Jetson Nano

jetbot_ros

ROS2 nodes and Gazebo model for NVIDIA JetBot with Jetson Nano

note: if you want to use ROS Melodic, see the melodic branch

Start the JetBot ROS2 Foxy container

git clone https://github.com/dusty-nv/jetbot_ros
cd jetbot_ros
docker/run.sh

Run JetBot

If you have a real JetBot, you can start the camera / motors like so:

ros2 launch jetbot_ros jetbot_nvidia.launch.py

or (for a Sparkfun Jetbot)

ros2 launch jetbot_ros jetbot_sparkfun.launch.py

Otherwise, see the Launch Gazebo section below to run the simulator.

Launch Gazebo

ros2 launch jetbot_ros gazebo_world.launch.py

Then to run the following commands, launch a new terminal session into the container:

sudo docker exec -it jetbot_ros /bin/bash

Test Teleop

ros2 launch jetbot_ros teleop_keyboard.launch.py

The keyboard controls are as follows:

w/x:  increase/decrease linear velocity
a/d:  increase/decrease angular velocity

space key, s:  force stop

Press Ctrl+C to quit.

Data Collection

ros2 launch jetbot_ros data_collection.launch.py

It's recommended to view the camera feed in Gazebo by going to Window -> Topic Visualization -> gazebo.msgs.ImageStamped and selecting the /gazebo/default/jetbot/camera_link/camera/image topic.

Then drive the robot and press the C key to capture an image. Then annotate that image in the pop-up window by clicking the center point of the path. Repeat this all the way around the track. It's important to also collect data of when the robot gets off-course (i.e. near the edges of the track, or completely off the track). This way, the JetBot will know how to get back on track.

Press Ctrl+C when you're done collecting data to quit.

Train Navigation Model

Run this from inside the container, substituting the path of the dataset that you collected (by default, it will be in a timestamped folder under /workspace/src/jetbot_ros/data/datasets/)

cd /workspace/src/jetbot_ros/jetbot_ros/dnn
python3 train.py --data /workspace/src/jetbot_ros/data/datasets/20211018-160950/

Run Navigation Model

After the model has finished training, run the command below to have the JetBot navigate autonomously around the track. Substitute the path to your model below:

ros2 launch jetbot_ros nav_model.launch.py model:=/workspace/src/jetbot_ros/data/models/202106282129/model_best.pth

note: to reset the position of the robot in the Gazebo environment, press Ctrl+R

More Repositories

1

jetson-inference

Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
C++
7,694
star
2

jetson-containers

Machine Learning Containers for NVIDIA Jetson and JetPack-L4T
Python
2,017
star
3

jetson-reinforcement

Deep reinforcement learning GPU libraries for NVIDIA Jetson TX1/TX2 with PyTorch, OpenAI Gym, and Gazebo robotics simulator.
C++
875
star
4

ros_deep_learning

Deep learning inference nodes for ROS / ROS2 with support for NVIDIA Jetson and TensorRT
C++
870
star
5

jetson-utils

C++/CUDA/Python multimedia utilities for NVIDIA Jetson
C++
693
star
6

jetson-voice

ASR/NLP/TTS deep learning inference library for NVIDIA Jetson using PyTorch and TensorRT
Python
177
star
7

NanoLLM

Optimized local inference for LLMs with HuggingFace-like APIs for quantization, vision/language models, multimodal agents, speech, vector DB, and RAG.
Python
147
star
8

jetson-scripts

Configuration scripts and install guides for NVIDIA Jetson platform
Shell
96
star
9

turbo2

Tegra Unmanned Retrieval Bot gen2, with NVIDIA Jetson and deep reinforcement learning
C++
89
star
10

jetson-presentations

PDF slides about NVIDIA's Jetson embedded platform and deep learning.
59
star
11

camera-capture

GUI tool for collecting & labeling data from live camera feed
C++
41
star
12

pytorch-segmentation

Training of semantic segmentation networks with PyTorch
Python
35
star
13

rovernet

Deep reinforcement learning-driven robotic controller and navigation library using Torch.
C++
34
star
14

super-resolution

PyTorch super resolution model with RGB support and ONNX exporter
Python
31
star
15

pytorch-classification

Training of image classification models with PyTorch
Python
28
star
16

pytorch-detection

Training of object detection networks with PyTorch
16
star
17

pytorch-odometry

Training of visual odometry estimation networks using PyTorch
Python
16
star
18

NanoDB

Zero-copy multimodal vector DB with CUDA and CLIP/SigLIP
Python
10
star
19

clip_trt

CLIP and SigLIP models optimized with TensorRT with a Transformers-like API
Python
8
star
20

gtc-llm-lab

Jetson AI Lab - LLM Inference
Shell
8
star
21

pytorch-timeseries

Python
7
star
22

ros2_pololu

ROS2 nodes for Pololu Maestro, Jrk, and Simple Motor Controller
C++
1
star