Let's Robot

Welcome to the Let's Robot network. You'll find comprehensive guides and documentation to help you start working with Let's Robot as quickly as possible, as well as support if you get stuck. Let's jump right in!

Robot Programming

Robots on LetsRobot.tv are basically running two scripts on the Raspberry Pi, controller.py and send_video.py

Previously we set up a file (start_robot) to start these two scripts with some of the arguments (they come after the script in the format of --argument {option}) needed to configure your robot. There are lots more arguments that can be utilized.

If you are having issues or would like to isolate problems it is best to run the controller.py or send_video.py separately with just the argument(s) you are testing.

To do that start with by connecting to your robot (via SSH) and killing all scripts running. Also go into the folder the scripts are stored

~/runmyrobot/scripts/kill_command
cd runmyrobot

Then run just the controller.py or send_video.py adding your robot or camera id and then any arguments like this:

python controller.py ROBOTID --ARGUMENT OPTION

or

python send_video.py YOURCAMERAID 0 --stream-key YOURSTREAMKEY

Here are a list of other arguments for you to try. Be sure to join the Letsrobot.tv Discord to ask for help. There are lots of very helpful people in the community to help troubleshoot your issues.

controller.py Arguments

The only mandatory argument for controller.py is your robot ID. If you do not yet have a robot ID, please click here. Don’t type the [ or ] just what is in them.

--ARGUMENT [OPTION]
Description

robot_id

Your robot ID

--info-server [letsrobot.tv]

Server that robot will connect to for information about servers and things.

--type [motor_hat]

serial, motor_hat, gopigo2, gopigo3, l298n, motozero, pololu, mdd10

--serial-device [/dev/ttyACM0]

Serial device if type is ‘serial’.

--male

Male tts voice.

--female

Female tts voice.

--voice-number [1]

Voice 1-4

--led [None]

Presently only supports ‘max7219’.

--ledrotate [None]

Rotates the LED Matrix. e.g.: 180

--tts-volume [80]

Sets the volume for TTS if enabled

--secret-key [None]

Secret passphrase to connect to Let’s Robot

--turn-delay [0.4]

--straight-delay [0.5]

--driving-speed [90]

--day-speed [255]

--night-speed [255]

--forward [‘[-1,1,-1,1]’]

--left [‘[1,1,1,1]’]

--festival-tts

--auto-wifi

--no-anon-tts

--no-chat-server-connection

--no-secure-cert

--filter-url-tts

--slow-for-low-battery

--reverse-ssh-key-file [‘/home/pi/reverse_ssh_key1.pem’]

--reverse-ssh-host [‘ubuntu@52.52.204.174’]

--charge-hours [3.0]

--discharge-hours [8.0]

--right-wheel-forward-speed
--right-wheel-backward-speed
--left-wheel-forward-speed
--left-wheel-backward-speed

--led-max-brightness

--speaker-device [2]

--tts-delay-enabled

--tts-delay-seconds [5]

--woot-room []

Send_video.py Arguments

The only mandatory parameter for send_video.py is your camera ID. You should have gotten one when you created your Robot

camera_id

Is usually 0

--info-server [letsrobot.tv]

Handles thing such as rest API requests about ports, for example 1.1.1.1:8082

--info-server-protocol [https]

Either http or https

--app-server-socketio-host [letsrobot.tv]

Wherever app is running

--app-server-socketio-port [8022]

Typically use 8022 for prod, 8122 for dev, and 8125 for dev2

--api-server [api.letsrobot.tv]

Server that robot will connect to listen for API update events

--xres [768]

--yres [432]

video_device_number [0]

--audio-device-number [1]

--audio-device-name [C920]

--kbps [350]

Set it to 1024 for better video on good wifi

--brightness

Camera brightness

--contrast

Camera contrast

--saturation

Camera saturation

--rotate180 [False]

Rotate image 180 degrees

--env [prod]

--screen-capture

--no-mic

--no-camera

--dry-run

--mic-channels [2]

Microphone channels, typically 1 or 2

--stream-key [YOURSTREAMKEY]

--mic-gain [80]

--pipe-audio

Recommended to make the mic sound better