remo.tv is an open telerobotics platform designed for controling and sharing control of robots online in real time.
WARNING: This software is currently under development, so you may encounter frequent issues as updates are made. You can check out the wiki for a more indepth view of what's currently supported.
This controller software is designed to run on your robot and will connect with our development server. It's tuned to support Raspberry Pi based robots, however there is extensive support for other hardware configurations.
If this is your first time working with a Raspberry Pi or Linux, we recommend following our initialization tutorial to get started.
If doing things manually isn't your style, we made an optional guided installation script that handles mostly everything for you.
The RasPi will need the following things install so it can talk to your motors and talk to the internet. Make sure you don’t get any errors in the console when doing the step below. If you have an issue, you can run this line again, and that will usually fix it!
-
Install the required software libraries and tools. Make sure you don’t get any errors in the console when doing the step below. If you have an issue, you can run this line again, and that will usually fix it!
sudo apt update sudo apt upgrade -y sudo apt install ffmpeg python3-serial python3-dev libgnutls28-dev espeak python3-smbus python3-pip git
-
Download the remotv control scripts from our github
git clone https://github.com/remotv/controller.git ~/remotv -
Open the new
remotvdirectorycd remotv -
Create and activate a new python3 virtual environment
python3 -m venv .venv && source .venv/bin/activate
Optionally, add the environment to your .bashrc
echo "export PATH=\"/home/your_username/remotv/.venv/bin:\$PATH\"" >> ~/.bashrc
-
Install python requirements
python3 -m pip install -r requirements.txt
-
Copy
controller.sample.conftocontroller.confcp controller.sample.conf controller.conf
-
Edit the
controller.conffile created in the previous section.nano controller.conf
-
Configure the
[robot]sectionownershould be the username you have registered the robot under on the remo.tv site.robot_keyis the API key for your robot that you made on the site.- Your API key is LONG. It should look something like
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InJib3QtNTVjZjJmMjUtNjBhNS00ZDJkLTk5YzMtOGZmOGRiYWU4ZDQ1IiwiaWF0IjoxNTczNTExMDA2LCJzdWIiOiIifQ.LGXSBSyQ4T4X5xU_w3QJD6R3lLjrrkw_QktOIDzRW5U. If it is not this long, you have not copied the full key.
- Your API key is LONG. It should look something like
turn_delayis only used by themotor_hatandmdd10. This changes how long your bot turns for. I suggest you leave this at the default value until after you bot is moving.straight_delayis only used by themotor_hatandmdd10. This changes how long your bot turns for. I suggest you leave this at the default value until after you bot is moving.typeshould be the hardware type for the motor controller of your bot. Available types are currently.adafruit_pwmcozmogopigo2gopigo3l298nmaestro-servmax7219mc33926mdd10motor_hatmotozerononeowi_armpololuserial_boardtellythunderborgmegapi_board
- Configure your hardwares section. Each hardware type can have their own section it the controller. Look through the file for a section named the same as your hardware controller. If the section exists, read through it and adjust the variable as required.
-
Configure the
[camera]sectionno-micThis allows the microphone to be disabled.no-cameraThis allows the camera to be disabled.typeThis sets the audio / video handler to use. Currently only ffmpeg and ffmpeg-arecord are supported.x_resSets the resolution for the x axis.y_resSets the resolution for the y axis.camera_deviceSets the device name for the camera.audio_hw_numSet the audio hardware number for the microphone.
-
Configure the
[tts]sectiontts_volumeThis is the volume level you want your bot to start with.anon_ttsThis allows you to enable or disable anonymous users access to your bots TTS features.filter_url_ttsThis option allows URLs pasted into chat to be blocked from the TTS function.ext_chatThis enables or disables the extended chat functions.hw_humThis is the ALSA hardware number for your pi. 0 is the first sound card and should work for most bots.typeshould be the type of TTS software you are using. The currently supported TTS types are. espeak was installed in the previous steps, and makes a good default tts.espeakfesitvalpico- Amazon Polly (
polly) cozmo_ttsgoogle_cloud
-
Copy the
start_robotscript to your home directory.cp ~/remotv/scripts/start_robot ~
-
Add the startup script to the
crontabcrontab -e
Note: If you accidently use the wrong editor try
EDITOR=nano crontab -e
-
Insert the following text at the bottom
@reboot /bin/bash /home/pi/start_robot
If your username is different than the default "pi", make sure to change it here.
Example:
# Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system # daemon's notion of time and timezones. # # Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command @reboot /bin/bash /home/username_here/start_robot
-
Now just plug in the Camera and USB Speaker and reboot
sudo reboot
The following hardware is supported.
- Adafruit Motor Hat
- Adafruit PWM / Servo Hat
- Anki Cozmo
- Cytron MDD10 10 Amp Motor Driver
- GoPiGo 2
- GoPiGo 3
- L298N Dual Motor Controller
- Pololu Maestro Servo Controller (experimental)
- MAX7219 SPI Led Driver
- MotoZero 4 Motor Controller
- MQTT Publish commands to a local MQTT Broker
- OWI 535 Robotic Arm (USB controller)
- Serial Based controllers (Parallaxy or Arduinos)
- PiBorg ThunderBorg Motor Driver
- Pololu Dual MC33926 Motor Driver (experimental)
- Pololu DRV8835 Dual Motor Driver
- MegaPi by Makeblock
Missing something? You can add it, open source! Instructions for adding new hardware can be found here.
When ext_chat is enabled, the following chat commands are available. To use, just type them into the chat box on your bots page. These chat commands have no effect on how the site behaves, they only affect the bot. There are some functions that duplicate functions on the site. These changes are not saved and are lost on reboot.
.devmode XSet dev mode. In dev mode, only the owner can drive. If demode is set to mods, your local mods can also drive [on|off|mods]..anon control XSets if anonymous users can drive your bot [on|off]..anon tts XSets if anonymous users messages are passed to TTS [on|of]..anon XSets both anonymous control and tts access [on|off]..tts XMute the bots TTS [mute|unmute].ban NAMEBan user NAME from controlling your bots.unban NAMEremove user NAME from the ban list.timeout NAMETimeout user NAME from controlling your bots for 5 minutes.untimeout NAMEremove user NAME from the timeout list..brightness Xset the camera brightness [0..255].contrast Xset the camera contrast [0..255].saturation Xset the camera saturation [0..255].stationaryToggles stationary mode on and off. When enabled, forward / backward commands will be blocked.
Hardware modules can have their own hardware specific TTS commands.
For Anki Cozmo on Mac or Linux, please see the intructions here. For Windows instructions, please see the instructions here.
For GoPiGo3, you will need to install the gopigo3 python module (which is different than older versions). It will need to be installed with the installation script from Dexter. Also, PYTHONPATH needs to be set to /home/pi/Dexter/GoPiGo3/Software/Python
Refer to this: https://github.com/DexterInd/GoPiGo3
sudo git clone http://www.github.com/DexterInd/GoPiGo3.git /home/pi/Dexter/GoPiGo3
sudo bash /home/pi/Dexter/GoPiGo3/Install/install.sh
sudo rebootInstall motor HAT software:
Install PWM / Servo hat software
Install Maestro Servon controller library into the hardware/ subdirectory.
Install DRV8835 Motor Driver library
Install MC33926 Motor Driver library
Check out the Wiki for more information
Sometimes enabling the Raspberry Pi Camera module in raspi-config doesn't completely load the kernel drivers for it. If you don't see /dev/video0 on your system, or controller.py complains about not finding it, then do the following:
- Enable the kernel module for your current session:
sudo modprobe bcm2835-v4l2- Tell the operating system to load the kernel module at boot going forward:
sudo cat 'bcm2835-v4l2' >> /etc/modulesNow you should see video0 if you do ls /dev/ | grep video