Skip to content

πŸ¦• The smallest NVIDIA Jetson dinosaur robot πŸ¦– - Reborn by Road Balance

Notifications You must be signed in to change notification settings

Road-Balance/rb_nanosaur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nanosaur by Road Balance

| πŸ¦• The smallest NVIDIA Jetson dinosaur robot πŸ¦– - Reborn by Road Balance for education.

Original project from Raffaello Bonghi's Nanosaur

System information

Jetson Nano 2GB

  • LT4 with Ubuntu 18.04
  • ROS2 Eloquent
  • CUDA & TensorRT (ongoing)

Brief Packages Explanation

β”œβ”€β”€ STL => Contains all 3D printing Parts
β”œβ”€β”€ nanosuar_camera => Handling Image data For RPI Camera  
β”œβ”€β”€ nanosaur_hardware
β”‚  └─ nanosaur_hardware
β”‚     β”œβ”€ display.py => OLED Display Control
β”‚     β”œβ”€ motor.py => Pololu DC Motor Control
β”‚     └─ nanosaur.py => ROS2 Node for Cmd_vel Subscriber 
β”œβ”€β”€ Images
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
└── STL

Future Work

  • Camera Processig with DeepStream + ROS
  • [*] Camera Streaming Through WebRTC
  • Stereo Camera & ReDesign
  • ROS2 Foxy with Docker
  • Reactive Eyes Control

Installation

  • Quick install with Shell Scripts
# 1. Install Parts Dependencies
$ cd rb_nanosaur\install
$ sudo ./install_parts.sh

# 2. Install ROS2
$ sudo ./install_ros2.sh

# Then, Setup Colcon workspace
$ mkdir -p ~/ros2_ws/src
$ cd ~/ros2_ws/src
$ cd ../
$ colcon build

# 3. Install Dependencies for Camera GPU Acceleration
$ sudo ./install_ai_depend.sh

Check connection for All Parts

oled test

# OLED shold be connected with 27 28 pin

$ sudo i2cdetect -y -r 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

# Try test
cd tests
sudo python3 stats.py

motor test

# Motor Driver shold be connected with 3 5 pin

$ sudo i2cdetect -y -r 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: 70 -- -- -- -- -- -- --

# Try test
cd tests
sudo python3 motor_test.py

RPI Cam

# RPI Cam Must be connected before OS Booting

# Try test
cd tests
sudo python3 camera_test.py
  • Grab Swap Area

| for more detail, watch this video

free -m

# Disable ZRAM:
sudo systemctl disable nvzramconfig

# Create 4GB swap file
sudo fallocate -l 4G /mnt/4GB.swap
sudo chmod 600 /mnt/4GB.swap
sudo mkswap /mnt/4GB.swap

# Append the following line to /etc/fstab
sudo vi /etc/fstab
sudo echo "/mnt/4GB.swap swap swap defaults 0 0" >> /etc/fstab

# REBOOT!

free -m
              total        used        free      shared  buff/cache   available
Mem:           3956         865        2551          29         539        2907
Swap:          4095           0        4095

[New!] WebRTC Nanosaur for all around world.

With this Example, you can broadcast your Nanosaur's View onto All Around the World!

colcon build --packages-select webrtc_pkg

Run

sudo apt-get install ros-eloquent-teleop-twist-keyboard

# Ternimal 1
colcon build --symlink-install --packages-select nanosaur_hardware
. install\setup.bash
ros2 run nanosaur_hardware nanosaur

# Ternimal 2
ros2 run teleop_twist_keyboard teleop_twist_keyboard
pip3 install wheel setuptools Adafruit_MotorHat
pip3 install -U wstool

cd /opt && \
    git clone https://github.com/dusty-nv/jetson-utils.git && \
    mkdir -p jetson-utils/build && cd jetson-utils/build && \
    cmake ../ && \
    make -j$(nproc) && \
    make install && \
    ldconfig

My Notepad (Ignore belows)

colcon build
. install/setup.bash
ros2 run nanosaur_hardware nanosaur

sudo apt-get install ros-eloquent-teleop-twist-keyboard

ros2 topic pub /cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.8}}"


Creator

About

πŸ¦• The smallest NVIDIA Jetson dinosaur robot πŸ¦– - Reborn by Road Balance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published