This UI consists of a Javascript/React frontend and a ROS backend. In order to send information to the robot over ROS, you will need to start the rosbridge server -- this is what allows us to send ROS messages from a web browser. Of course, you'll also need to start the web app.
Note that the following commands must be run from an Ubuntu OS. If you have not completed the steps in System Setup/Requirements, you must do those before attempting to run the UI.
Make sure you've run git pull
and npm install
.
In a terminal window, run roslaunch rosbridge_server rosbridge_websocket.launch
.
In another terminal window, navigate to this repo on your machine. Run npm start
. A browser window should automatically open with the web UI running in it.
You must run this UI from an Ubuntu OS. We are using Ubuntu 20.04, as this is compatible with the ROS distribution that we use, but other versions of Ubuntu may also work.
Additionally, you must have ROS installed. We are using ROS noetic. If you want to try running this UI with another ROS distro, you will have to modify the command in Setting up Rosbridge Server accordingly.
To run a React web app, you will need to have Node installed. Run the following commands to install it using nvm:
sudo apt install curl
.curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
.source ~/.bashrc
.nvm install v16.17.1
.
Use git to clone the repository:
git clone [email protected]:MARS-UVA/mars-ui-web.git
ORgit clone https://github.com/MARS-UVA/mars-ui-web.git
.cd mars-ui-web
.
Run npm install
. Note that during development, you may periodically need to run this after pulling changes from the remote repo.
Run sudo apt install ros-noetic-rosbridge-server
.
Note: the ButtonPanel has been renamed to DriveModeButtonPanel.