RoboKings (Pakistan)
We’re the RoboKings, a passionate team from Pakistan on a mission to conquer the WRO Future Engineers 2024 challenge by building a fully autonomous self-driving car! Inspired by the magic of Santa’s industrious elves, our car is designed to navigate a designated track and complete three laps without human intervention. This project embodies our commitment to robotics, innovation, and the future of intelligent transportation.
The WRO Future Engineers category emphasizes the entire engineering process. Teams earn points for their final product and for documenting their journey within a public GitHub repository. This year’s exciting challenge features a randomly changing track, testing our car’s adaptability!
We’re focusing on these key areas to build our autonomous car:
Component | Description | Image | Link |
---|---|---|---|
NVIDIA Jetson Nano | Provides processing power for complex deep learning models. | https://bit.ly/3wKg5TG | |
LiDAR Sensor | Creates a detailed 3D map of the environment for precise navigation and obstacle detection. | https://amzn.to/3SXeS2I | |
2-3 Raspberry Pi Cameras | Capture rich visual data used for object detection, lane tracking, and path planning. | https://amzn.to/4c0Tv9o | |
RC Car Chassis | The physical foundation for our self-driving elf car. | https://amzn.to/3uPM0Bz | |
Adafruit Motor Shield | Enables precise motor control for smooth and reliable movements and steering. | https://bit.ly/4a2cHle |
The RoboKings welcome collaboration! Reach out to us through discussions, pull requests, or issues to share your expertise, suggest improvements, or report any challenges you encounter. We’re excited to be part of the WRO community and are committed to sharing our progress and lessons learned.
[!IMPORTANT] We may not be able to disclose certain implementation details related to our deep learning model or proprietary algorithms to safeguard our competitive edge.
Installing Visual Studio Code
Since the Jetson Nano has an ARM-based architecture, you’ll need to get VS Code in a few different ways:
Setting Up for C++ Development
Install C/C++ Extension: Follow the same instructions as the general guide.
Install a C++ Compiler:
sudo apt-get install g++
Testing Your Setup:
[!NOTE] Additional Considerations for Jetson Nano
- Performance: The Jetson Nano has limited resources compared to a desktop. You might experience some limitations in terms of speed for large projects.
- Cross-Compilation: If you prefer working on a desktop PC, you can set up cross-compilation to build code specifically targeting the Jetson Nano’s ARM architecture.
[!IMPORTANT] Prerequisites
- Operating System: Ubuntu 18.04 (Bionic Beaver) or Ubuntu 20.04 (Focal Fossa). Check your OS version using
lsb_release -a
.- NVIDIA Hardware: A compatible NVIDIA device (e.g., Jetson Nano, Jetson Xavier NX, etc.).
- NVIDIA JetPack: If you’re using a Jetson device, ensure you have JetPack installed appropriately for your hardware.
Installation Steps
Set Up Sources
Add the ROS repository:
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
Install ROS
Update your package lists:
sudo apt update
Choose your desired ROS installation:
Desktop-Full Install: (Recommended for comprehensive use)
sudo apt install ros-YOUR-DISTRO-desktop-full
Desktop Install: (Core tools and libraries)
sudo apt install ros-YOUR-DISTRO-desktop
Base Install: (Bare bones ROS)
sudo apt install ros-YOUR-DISTRO-ros-base
Replace YOUR-DISTRO
with either melodic
(Ubuntu 18.04) or noetic
(Ubuntu 20.04)
Initialize rosdep
sudo rosdep init
rosdep update
Environment Setup
echo "source /opt/ros/YOUR-DISTRO/setup.bash" >> ~/.bashrc
source ~/.bashrc
(Optional) Build Tools
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
Testing Your Installation
roscore
:
roscore
Here’s a bash script that automates the installation of ROS, Visual Studio Code (using the Remote Development approach), and the C++ setup on an Ubuntu-based NVIDIA Jetson Nano.
[!IMPORTANT]
- Customization: You’ll likely need to adjust paths and versions based on your specific requirements.
- JetPack: I’m assuming you have JetPack installed.
- Remote Machine: This script assumes you have a desktop machine ready for remote development with VS Code installed.
- ROS Distribution: I’ve used ‘melodic’ (for Ubuntu 18.04). Replace with ‘noetic’ if you’re using Ubuntu 20.04.
The Script (jetson_setup.sh
)
#!/bin/bash
# ROS Installation
echo "== Installing ROS =="
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt update
sudo apt install ros-melodic-desktop-full -y
sudo rosdep init
rosdep update
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
# VS Code Remote Development Setup
echo "== Setting up VS Code Remote Development =="
sudo apt install openssh-server -y # Install SSH server if not already present
sudo apt install -y libssl-dev libxkbfile-dev build-essential # Install dependencies
# Install the Remote Development Extensions on your Jetson Nano (refer to the official documentation for the latest URLs)
wget -O vscode_remote.deb "https://update.code.visualstudio.com/latest/linux-arm64-deb/stable" # Replace with the latest version URL
sudo apt install ./vscode_remote.deb
# C++ Setup
echo "== Installing C++ Compiler =="
sudo apt install g++ -y
echo "== Installation Complete =="
echo "**Important:**"
echo "- On your desktop VS Code, connect to your Jetson Nano using Remote Development."
echo "- Ensure necessary C++ build tools are configured on your desktop machine."
How to Use
jetson_setup.sh
on your Jetson Nano.chmod +x jetson_setup.sh
./jetson_setup.sh
[!NOTE] Remember to adjust versions, paths, and setup your desktop VS Code for Remote Development to complete the process!
This repository is a work in progress. Follow our development journey as we build and refine our self-driving car for the WRO Future Engineers 2024 challenge!