Here’s how to make a presence robot with Chromium 51, WebRTC, Raspberry Pi 3 and EasyRTC. It’s actually very easy, especially now that Chromium 51 comes with Raspian Jessie, although it’s taken me a long time to find the exact incantation.
If you’re going to use it for real, I’d suggest using the Jabra 410 speaker / mic . I find that audio is always the most importantpart of a presence robot, and the Jabra provides excellent sound for a meeting of 5 8 people and will work for meetings with larger groups too. I’ve had the most reliable results using a separate power supply for the Jabra, via a powered hub. The whole thing still occasionally fails, so this is a work in progress. You’ll need someone at the other end to plug it in for you.
I’ve had fair success with a “portal” type setup with the Raspberry Pi touchscreen , but it’s hard to combine the Jabra and the screen in a useful box.

As you can see, the current container needs work:

Next things for me will be some sort of expressivity and / or movement. Tristan suggests emoji. Tim suggests pipecleaner arms. Henry’s interested more generally in emotion expressed via movement. I want to be able to rotate. All can be done via the WebRTC data channel I think.
You will need
Raspberry Pi 3 + SD card + 2.5Apower supply Jabra Mic Powered USB hub (I like this one ) A pi camera I’ve only tested it with a V1 A screen (e.g. this TFT ) A server, e.g a Linode , running Ubuntu 16 LTS. I’vehad trouble with AWS for some reason, possibly a ports issue. Instructions Set up the Pi(don’t use jessie-lite, use jessie )
diskutil list diskutil unmountDisk /dev/diskN sudo dd bs=1m if=~/Downloads/2016-09-23-raspbian-jessie.img of=/dev/rdiskNLog in.
sudo raspi-configexpand file system, enable camera (and spi if using a TFT) and boot to desktop, logged in
Update everything
sudo apt-get update && sudo apt-get upgradeSet up wifi
sudo pico /etc/wpa_supplicant/wpa_supplicant.conf network={ ssid="foo" psk="bar" }Add drivers
sudo pico /etc/modules i2c-dev snd-bcm2835 bcm2835-v4l2Add V4l2 video drivers (for Chromium to pick up the camera): argh
sudo nano /etc/modprobe.d/bcm2835-v4l2.conf options bcm2835-v4l2 gst_v4l2src_is_broken=1Argh: USB audio
sudo pico /boot/config.txt #dtparam=audio=on ## comment this out sudo pico /lib/modprobe.d/aliases.conf #options snd-usb-audio index=-2 # comment this out sudo pico ~.asoundrc defaults.pcm.card 1; defaults.ctl.card 0;Add mini tft screen (see http://www.spotpear.com/learn/EN/raspberry-pi/Raspberry-Pi-LCD/Drive-the-LCD.html )
curl -O http://www.spotpear.com/download/diver24-5/LCD-show-160811.tar.gz tar -zxvf LCD-show-160811.tar.gz cd LCD-show/ sudo ./LCD35-showRename the bot
sudo pico /etc/hostname sudo pico /etc/hostsYou may need to enable camera again via sudo raspi-config
Add autostart
pico ~/.config/lxsession/LXDE-pi/autostart @lxpanel --profile LXDE-pi @pcmanfm --desktop --profile LXDE-pi @xscreensaver -no-splash @xset s off @xset -dpms @xset s noblank #@v4l2-ctl --set-ctrl=rotate=270 # if you need to rotate the camera picture @/bin/bash /home/pi/start_chromium.sh pico start_chromium.sh #!/bin/bash myrandom=$RANDOM #@rm -rf /home/pi/.config/chromium/ /usr/bin/chromium-browser --kiosk --disable-infobars --disable-session-crashed-bubble --no-first-run https://your-server:8443/bot.html#$myrandom &Assemble everything:
Connect the USB hub to the Raspberry Pi Connect the Jabra to the USB hub Attach the camera and TFT screen On the serverAdd keys for login
mkdir ~/.ssh chmod 700 ~/.ssh pico ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keysInstall and configure Apache (I used this guide for letsencrypt)
sudo apt-get install apache2 sudo mkdir -p /var/www/your-server/public_html sudo chown -R $USER:$USER /var/www/your-server/public_html sudo chmod -R 755 /var/www nano /var/www/your-server/public_html/index.html sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/your-server.conf sudo nano /etc/apache2/sites-available/your-server.conf <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName your-server ServerAlias your-server ErrorLog ${APACHE_LOG_DIR}/your-server_error.log CustomLog ${APACHE_LOG_DIR}/your-server_access.log combined RewriteEngine on RewriteCond %{SERVER_NAME} = your-server RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] </VirtualHost> sudo a2ensite your-server.conf sudo service apache2 reload sudo service apache2 restartAdd certs
You can’t skip this part Chrome and Chromium won’t work without https
sudo apt-get install git sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt cd /opt/letsencrypt ./letsencrypt-auto --apache -d your-server /opt/letsencrypt/letsencrypt-auto renew >> /var/log/le-renew.log sudo /opt/letsencrypt/letsencrypt-auto renew >> /var/log/le-renew.log sudo mkdir /var/log/ sudo mkdir /var/log/lets-encryptAuto-renew certs
sudo /opt/letsencrypt/letsencrypt-auto renew >> /var/log/lets-encrypt/le-renew.log crontab -e # m h dom mon dow command 30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew >> /var/log/lets-encrypt/le-renew.logGet and install the EasyRTC code
Install node
curl -sL https://deb.nodesource.com/setup | sudo bash - sudo apt-get install -y nodejsInstall the easyrtc api
cd /var/www/your-server/ git clone https://github.com/priologic/easyrtcReplace the server part with my version
cd server rm -r * git clone https://github.com/libbymiller/libbybot.git cd .. sudo npm installRun the node server
nohup node server.js & FinallyBoot up the pi, and on your other machine go to
https://your-s