Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

rovercode/rovercode

Repository files navigation

screenshot

rovercode

Slack Mailinglist Build Status Coverage Status

rovercode is easy-to-use package for controlling robots (rovers) that can sense and react to their environment. The Blockly editor makes it easy to program and run your bot straight from your browser. Just drag and drop your commands to drive motors, read values from a variety of supported sensors, and see what your rover sees with the built in webcam viewer.

rovercode runs on any single-board-computer supported by the Adafruit Python GPIO wrapper library, including the NextThingCo CHIP, Raspberry Pi, and BeagleBone Black. Once installed, head to to rovercode.com and connect to your rover.

rovercode is made up of two parts. rovercode (this repo) is the service that runs on the rover. rovercode-web (a different repo) is the web app that is hosted on the Internet. Try a live demo.

Setup

Standard Setup

First, on your rover (CHIP, Raspberry Pi, BeagleBone, etc):

$ sudo apt install git
$ git clone --recursive https://github.com/aninternetof/rovercode.git && cd rovercode
$ sudo bash setup.sh #run this only once -- it will take some time
$ # create your .env, as described in the section below
$ sudo bash start.sh #run this each time you boot the rover (or automatically start if chosen in setup)

Then, on any PC or tablet, head to rovercode.com to connect to your rover. Start playing!

Development PC Setup

When developing rovercode, you may want to run rovercode on your PC instead of a CHIP/Raspberry Pi/Beaglebone. Below are instructions for how to install and run rovercode on your PC. Everything should work fine: rovercode will automatically detect that it is not running on target hardware and will stub out the calls to the motors and sensors.

Development PC Standard Setup

First, on your development PC:

$ sudo apt install git
$ git clone --recursive https://github.com/aninternetof/rovercode.git && cd rovercode
$ sudo bash setup.sh #run this only once -- it will take some time
$ # create your .env, as described in the section below
$ sudo bash start.sh #run this each time

Then, still on your development PC, head to rovercode.com and connect to your "rover" (your PC running the service).

Development PC Alternate Setup (Docker)

Rather use Docker? First, on your development PC:

$ sudo apt install git docker.io
$ git clone --recursive https://github.com/aninternetof/rovercode.git && cd rovercode
$ sudo docker build -t rovercode .
$ # create your .env, as described in the section below
$ sudo docker run --name rovercode -v $PWD:/var/www/rovercode -p 80:80 -d rovercode

Then, still on your development PC, head to rovercode.com and connect to your "rover" (your PC running the service).

Creating Your .env

Create a .env file at the root of the project (at the same level as setup.sh and start.sh). In that file, you'll add your rovercode.com credentials and the name of your rover.

First, create a rovercode.com account here. Then, add your credentials and a name for your rover to the .env so that it looks like this:

ROVERCODE_WEB_USER_NAME=myawesomeusername
ROVERCODE_WEB_USER_PASS=mysupersecurepassword
ROVER_NAME=Curiosity

Play and Contribute

rovercode is usable now, but we have lots of great features left to be added. Check out the contributing instructions then head over to the feature tracker to see if there's something fun to contribute.

Testing

Run the tests like this:

$ pwd
> ~/rovercode
$ py.test

Or, if you're using Docker, make sure the container is running (the sudo docker run ... command above), then do:

$ sudo docker exec -it rovercode bash -c "cd ../; py.test"

Docs

Read the complete docs here.

Contact

Please join the rovercode developer mailing list! Go here, then click "register".

Also, we'd love to chat with you! Join the the rovercode Slack channel.

You can also email brady@rovercode.com.

License

GNU GPLv3 © Brady L. Hurlburt and rovercode contributors