Skip to content

ucl-nlnt/virtualttbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NLNT Turtlebot System

A guide for setting up and using NLNT's Turtlebot Data Gathering system scripts

Table of Contents

Requirements
Device Setup
    A. Client PC
    B. Virtual Turtlebot
    C. Real Turtlebot
  Conducting Data Gathering
    Turtlebot
    Client PC
How to Use Data Annotator

Requirements

  • Clean Install of Ubuntu 20.04 LTS

Device Setup

A. Client PC

  1. Install git on your PC
sudo apt update
sudo apt install git

# confirm installation worked correctly
git --version
  1. Install Github CLI on your PC (Official Guide) This is for easier authentication with our repos since they are set to Private in our ucl-nlnt Github Organization
sudo mkdir -p -m 755 /etc/apt/keyrings && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
  1. Install ROS2 Foxy by following the official guide

make sure to select Foxy

# install ros2 foxy packages
wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros2_foxy.sh
sudo chmod 755 ./install_ros2_foxy.sh
bash ./install_ros2_foxy.sh

# install gazebo/cartographer/nav2 packages
sudo apt-get install ros-foxy-gazebo-*
sudo apt install ros-foxy-cartographer
sudo apt install ros-foxy-cartographer-ros
sudo apt install ros-foxy-navigation2
sudo apt install ros-foxy-nav2-bringup

# install turtlebot3 packages
source ~/.bashrc
sudo apt install ros-foxy-dynamixel-sdk
sudo apt install ros-foxy-turtlebot3-msgs
sudo apt install ros-foxy-turtlebot3

# build turtlebot3 packages from source code
sudo apt remove ros-foxy-turtlebot3-msgs
sudo apt remove ros-foxy-turtlebot3
mkdir -p ~/turtlebot3_ws/src
cd ~/turtlebot3_ws/src/
git clone -b foxy-devel https://github.com/ROBOTIS-GIT/DynamixelSDK.git
git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3.git
cd ~/turtlebot3_ws
colcon build --symlink-install
echo 'source ~/turtlebot3_ws/install/setup.bash' >> ~/.bashrc
source ~/.bashrc

# missing gazebo package from our lord and savior stack overflow
sudo apt-install ros-foxy-turtlebot3-gazebo
cd ~/turtlebot3_ws/src/
git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
cd ~/turtlebot3_ws && colcon build --symlink-install

export TURTLEBOT3_MODEL=burger
ros2 launch turtlebot3_gazebo empty_world.launch.py
  1. Login to the Github CLI using your account
gh auth login
  1. Select a working directory for this project. Usual convention is to put it in the Desktop folder. Clone the repository here:
git clone https://github.com/ucl-nlnt/virtualttbot.git
  1. Install miniconda3 on your device using the official guide

Miniconda is a lighteweight package manager and environment management system for Python.

  • create a virtual environment for this repo
conda create --name vttbot
conda activate vttbot
  • Install Python 3.8
conda install python=3.8

# verify installation
python --version
  • Install the project's package dependencies
pip install -r requirements.txt

B. Virtual Turtlebot

You don't need to do further setup as these are already discussed in Client PC Setup

C. Real Turtlebot

Follow the SBV setup on the Turtlebot3 quickstart guide. NOTE: requires a MicroSD Card reader. https://emanual.robotis.com/docs/en/platform/turtlebot3/sbc_setup/#sbc-setup

  • MAKE SURE TO FOLLOW THE INSTRUCTIONS FOR FOXY.

  • use the appropriate image file for your Raspberry pi.

Conducting Data Gathering

Turtlebot

  1. Open a terminal in the Turtlebot's working directory
  • If using Virtual Turtlebot, cd into the virtualttbot working directory made during setup

  • If using Real Turtlebot, connect to it using ssh

ssh ubuntu@<turtlebot_ip>
  1. Run bringup to initiate the bot's sensors and servos
ros2 launch turtlebot3_bringup robot.launch.py

There can be issues expected when restarting the bot (such as during development). It is best to relaunch bringup every time

  1. Run script for sending data
python workspace/src/sensors/sensors/capstone.py

Client PC

  1. To select a webcam, run the helper script to view your device's available cameras
conda activate vttbot
python scripts/webcam_helper.py

Take note of the index that you will use

  1. Run the Pygame GUI
python workspace/src/sensors/sensors/annotator.py

For MacOS, there are issues with multithreading support with Pygame. It is recommended to use Ubuntu instead

How to use Data Annotator

TODO: add instructions here

About

UCL Capstone Project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •