Minibot is a modular robotics kit designed for students from age 6 - 18 developed in partnership with DaVinci Robotics. This repository contains a web app for controlling the Minibot and sample scripts that allow users to run simple algorithms on their Minibot.
This repository is currently in development.
Please install the following:
Note: Windows users are highly recommended to install on Windows Native rather than Ubuntu WSL.
- Git (Ubuntu | MacOS | Windows 10)
- Python version 3.8 and pip3 (Ubuntu | MacOS | Windows 10)
- Anaconda (Highly recommended for developers) (MacOS | Windows 10)
- Cmake (MacOS | Windows 10)
- Node.js (the Javascript runtime library) and npm (the Javascript package manager) (Ubuntu | MacOS | Windows 10)
- Windows only - Build Tools for Visual Studio 2022
Click on the links below for Operating System-specific guides on how to install the above dependencies:
Ubuntu 18 Installing Initial Requirements guide
Mac OS Installing Initial Requirements guide
Windows 10 Installing Initial Requirements guide
Please clone (download) the respository onto your local machine. On Windows open Powershell and run the following command from the directory where you would like the cs-reminibot
repository to be located. On Linux or MacOS open the terminal and run the command.
git clone https://github.com/cornell-cup/cs-reminibot.git
Please choose either Anaconda OR Base environment installation.
Anaconda is a Python environment and package manager.
After installing Anaconda, create a new Python 3.8 Anaconda environment named cup
with the following command in your shell:
conda create -n cup python=3.8
To activate this environment and install the required Python packages, run the following commands:
conda activate cup
cd basestation
python -m pip install -r requirements.txt
Note: After installing the packages within the Anaconda environment, you must run conda activate cup
on a newly opened shell window to activate the environment before starting the GUI. You'll know the environment is activated if the name of the environment (cup)
is displayed before the shell prompt. Example of what the Windows Powershell prompt should look like: (cup) C:\Users\YourName
The command to deactivate the current environment and return to the base environment is conda deactivate
.
Run the following commands to navigate to the basestation directory in and install the Python3 dependencies. On Windows open Windows Powershell and run the following commands. On Linux or MacOS open terminal and run the following commands:
cd basestation
python -m pip install -r requirements.txt
cd ..
Navigate to the cs-reminibot directory and run the following commands to navigate to the gui directory in static/gui and install the JavaScript dependencies.
cd static/gui
npm install
cd ../..
See Vision System Troubleshooting section of this troubleshooting guide for visual steps
- Open cs-reminibot directory in File Explorer.
- Navigate to the installation_scripts directory.
- Right click on the Vision_system_install file.
- Select the Open with option from the resulting drop down.
- Select the Git for Windows option from the resulting sub-drop down
Run the following commands to navigate to the apriltag-py directory in vision/apriltag-py and install JavaScript dependencies. On Linux or MacOS open terminal and run the commands. You should currently be in the cs-reminibot directory
cd vision/apriltag-py
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4
sudo make install
cd ../..
config.py
in the basestation
folder contains configuration variables that might vary from user to user. Please refer to this file and set any necessary configurations before running.
After all dependencies are successfully installed, you can run the WebGUI on your computer and start working with the Minibot.
From the terminal, navigate to the home cs-reminibot
directory and run the following command.
Note: Anaconda users should activate the cup
environment before running the GUI.
./run_bs.sh
Wait until you see the message ======= STARTING BASESTATION======== in your terminal. Open Google Chrome and go to localhost:8080/start to see the GUI in action.
Windows users who are having trouble with this step can try installing the python dependencies via Anaconda.
To stop running the program, press Ctrl+C in the terminal window.
Many features on the GUI require a connection to a Minibot. In the absence of a physical Minibot, we can simulate a virtual Minibot which can receive commands from the GUI with the following script. Open a new shell and run the following command from the root cs-reminibot
directory:
python minibot/minibot.py -t
Note: Anaconda users should activate the cup
environment before running the script.
To stop running the program, press Ctrl+C in the terminal window.
To run the Vision system, run the following command. You should currently be in the cs-reminibot directory.
On Windows
./run_vision.sh
On MacOS/Linux
cd vision/apriltag-py/python
python3 calibrationgui.py
cd ../../..
In a terminal run:
sudo apt install git
Python 3 should already be installed. Run the following command in a terminal and you should see the python interpreter open.
python3
Run quit() in the interpreter to exit out of it.
In a terminal run:
sudo apt install python3-pip
In a terminal run:
sudo apt update
sudo apt install nodejs
sudo apt install npm
Upgrade npm to the lastest version by running:
sudo npm install npm@latest -g
Continue with the remaining installation steps
- Press Cmd + Space to open Spotlight Search. Search for Terminal and open it.
- Visit brew.sh in your browser to install Homebrew. Copy the command specified in the installation section into your terminal and run it.
- After installation is complete, run the following command in your terminal:
brew upgrade
In a terminal run:
brew install git
In a terminal run:
brew install python
Installing Anaconda is highly recommended to simplify management of Python virtual environments and packages.
Follow the instructions to install Anaconda through homebrew found here.
In a terminal run:
brew install node
Upgrade npm to the lastest version by running:
npm install npm@latest -g
In a terminal run:
brew install cmake
Continue with the remaining installation steps
Follow the instructions under Install Git on Windows found here.
Download the official Python distribution found here. This step should install pip automatically.
After proper installation of Python and pip, the following commands should show the installed version, such as Python 3.8.0
and pip 21.2.4 from C:\Users\User\...
.
python --version
python -m pip --version
Installing Anaconda is recommended to simplify Python version and package management.
Download the official Anaconda distribution found here.
Download and install the official CMake distribution found here.
Please follow the official Windows NodeJS and npm installation instructions found here.
Downgrade markupsafe to version 2.0.1:
python -m pip install markupsafe==2.0.1
Try running the following command to fix this:
sudo chown -R $(whoami) ~/.npm
And then run your npm command with sudo in front of it if it still doesn't work. For example:
sudo npm install
Please see the Minibot Software Install Troubleshooting Guide for other common installation problems.