Code Monkey home page Code Monkey logo

controller's Introduction

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.

Basic setup

If this is your first time working with a Raspberry Pi or Linux, we recommend following our initialization tutorial to get started.

Installing remotv control scripts on a Raspberry Pi

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!

  1. 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 python-serial python-dev libgnutls28-dev espeak python-smbus python-pip git
  2. Download the remotv control scripts from our github

    git clone https://github.com/remotv/controller.git ~/remotv
  3. Install python requirements

    sudo python -m pip install -r ~/remotv/requirements.txt
  4. Open the new remotv directory

    cd remotv
  5. Copy controller.sample.conf to controller.conf

    cp controller.sample.conf controller.conf

Configure the controller

  1. Edit the controller.conf file created in the previous section.

    nano controller.conf
  2. Configure the [robot] section

    • owner should be the username you have registered the robot under on the remo.tv site.
    • robot_key is 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.
    • turn_delay is only used by the motor_hat and mdd10. This changes how long your bot turns for. I suggest you leave this at the default value until after you bot is moving.
    • straight_delay is only used by the motor_hat and mdd10. This changes how long your bot turns for. I suggest you leave this at the default value until after you bot is moving.
    • type should be the hardware type for the motor controller of your bot. Available types are currently.
      • adafruit_pwm
      • cozmo
      • gopigo2
      • gopigo3
      • l298n
      • maestro-serv
      • max7219
      • mc33926
      • mdd10
      • motor_hat
      • motozero
      • none
      • owi_arm
      • pololu
      • serial_board
      • telly
      • thunderborg
      • megapi_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.
  3. Configure the [camera] section

    • no-mic This allows the microphone to be disabled.
    • no-camera This allows the camera to be disabled.
    • type This sets the audio / video handler to use. Currently only ffmpeg and ffmpeg-arecord are supported.
    • x_res Sets the resolution for the x axis.
    • y_res Sets the resolution for the y axis.
    • camera_device Sets the device name for the camera.
    • audio_hw_num Set the audio hardware number for the microphone.
  4. Configure the [tts] section

    • tts_volume This is the volume level you want your bot to start with.
    • anon_tts This allows you to enable or disable anonymous users access to your bots TTS features.
    • filter_url_tts This option allows URLs pasted into chat to be blocked from the TTS function.
    • ext_chat This enables or disables the extended chat functions.
    • hw_hum This is the ALSA hardware number for your pi. 0 is the first sound card and should work for most bots.
    • type should 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.
      • espeak
      • fesitval
      • pico
      • Amazon Polly (polly)
      • cozmo_tts
      • google_cloud

Setting up your start_robot file on the Raspberry Pi

  1. Copy the start_robot script to your home directory.

    cp ~/remotv/scripts/start_robot ~
  2. Add the startup script to the crontab

    crontab -e

    Note: If you accidently use the wrong editor try

    EDITOR=nano crontab -e
  3. Insert the following text at the bottom

    @reboot /bin/bash /home/pi/start_robot

    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/pi/start_robot
  4. Now just plug in the Camera and USB Speaker and reboot

    sudo reboot

Hardware Compatibility

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.

Chat Commands

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 X Set 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 X Sets if anonymous users can drive your bot [on|off].
  • .anon tts X Sets if anonymous users messages are passed to TTS [on|of].
  • .anon X Sets both anonymous control and tts access [on|off].
  • .tts X Mute the bots TTS [mute|unmute]
  • .ban NAME Ban user NAME from controlling your bots
  • .unban NAME remove user NAME from the ban list
  • .timeout NAME Timeout user NAME from controlling your bots for 5 minutes
  • .untimeout NAME remove user NAME from the timeout list.
  • .brightness X set the camera brightness [0..255]
  • .contrast X set the camera contrast [0..255]
  • .saturation X set the camera saturation [0..255]
  • .stationary Toggles stationary mode on and off. When enabled, forward / backward commands will be blocked.

Hardware modules can have their own hardware specific TTS commands.

Instructions for Specific Hardware Configurations

Cozmo

For Anki Cozmo on Mac or Linux, please see the intructions here. For Windows instructions, please see the instructions here.

GoPiGo3

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 reboot

Adafruit Motor Hat

Install motor HAT software:

Adafruit PWM / Servo Hat

Install PWM / Servo hat software

Pololu Maestro Servo Controller

Install Maestro Servon controller library into the hardware/ subdirectory.

Pololu DRV8835 Motor Driver

Install DRV8835 Motor Driver library

Pololu MC33926 Motor Driver

Install MC33926 Motor Driver library

Check out the Wiki for more information

A note about the Raspi Cam Module

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:

  1. Enable the kernel module for your current session:
sudo modprobe bcm2835-v4l2
  1. Tell the operating system to load the kernel module at boot going forward:
sudo cat 'bcm2835-v4l2' >> /etc/modules

Now you should see video0 if you do ls /dev/ | grep video

controller's People

Contributors

20repsej avatar bwookieeeee avatar gcurtis79 avatar gedyy avatar jillytot avatar jjhritz avatar landonh12 avatar makomk avatar mrspoon avatar nocturnal42 avatar papershaper avatar reltham avatar simukdev avatar skyeofbreeze avatar tgcfabian avatar vprime avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

controller's Issues

Need handler for when a channel has not / cannot be gotten before ffmpeg starts

A handler should be implemented for when a channel could not be gotten. This normally happens when an API key is not valid. Currently the only way to tell is that the site does not get anything from the robot.

Example output:

20:58:03 - ffmpeg-arecord.py : audioCommandLine : /usr/bin/arecord -D hw:3,0 -c 1 -f S16_LE -r 44100 | /usr/bin/ffmpeg -i - -ar 44100 -f mpegts -codec:a mp2 -b:a 128k -bufsize 8192k -muxdelay 0.001 -nostats http://dev.remo.tv:1567/transmit?name=None-audio
20:58:03 - controller.py : Loading extended chat commands
20:58:04 - extended_command.py : Moderators : 
20:58:03 - controller.py : Unable to find chat_custom.py
20:58:03 - controller.py : RemoTV Controller Started

getAudioDeviceByName fails when given "Device" as input

Setting speaker_device in controller.conf to Device returns a fatal exception,

AttributeError: 'NoneType' object has no attribute 'group'

Steps to reproduce the behavior:

  1. set [tts] speaker_device to Device in controller.conf
  2. Run controller manually
  3. See error

Expected behavior
getAudioDeviceByName should have gotten (in my case) card 2, returns AttributeError instead.

Log

23:30:28 - controller.py : RemoTV Controller Starting up
23:30:28 - controller.py : command line arguments : {nothing important}
23:30:28 - controller.py : loading tts
23:30:28 - audio_util.py : devices : **** list of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
   Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 2: Device [USB2.0 Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 3: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

23:30:28 - audio_util.py : Found Audio Device : **** List of PLAYBACK Hardware Devices ****
23:30:28 - controller.py : Unhandled exception of type : <type 'exceptions.AttributeError'>
Traceback (most recent call last):
  File "controller.py", line 303, in <module>
    tts.setup(robot_config)
  File "/home/pi/remotv/tts/tts.py", line 61, in setup
    temp_hw_num = audio_util.getSpeakerByName(audio_device.encode('utf-8'))
  File "/home/pi/remotv/audio_util.py", line 25, in getSpeakerByName
    return(getAudioDeviceByName(name, ["aplay", "-l"]))
  File "/home/pi/remotv/audio_util.py", line 15, in getAudioDeviceByName
    return int(result.group(1))
AttributeError: 'NoneType' object has no attribute 'group'

Configurations

  • controller.conf.txt

  • repo version:

    commit 14d59d2478aa4b8ff22c144c4f42fed121ffc25f (HEAD -> master, origin/master, origin/HEAD)
    Author: Peter Steele <[email protected]>
    Date:   Mon Sep 9 18:54:26 2019 +1000
    
    Only respond to chat messages in the appropriate channel.
    
    - One line change to controller.py that drops messages that aren't flagged as coming from the channel the controller connected to.
    

Additional context
It appears to be grabbing the first line where "Device" exists, in this case "**** List of PLAYBACK Devices ****"

Refactor repeat_start needed

When a robot fails to enter a ready state, it should not say the boot message. That is to say, when a robot fails to authenticate, it should not continue saying "OK" until it's killed.

This appears to be somewhat addressed in networking.py, however I've failed to observe the termination actually terminating; although it may be an overzealous repeat_start starting the script after it's terminated, I'm not quite sure.

Issue when starting controller with cozmo

When I fire up remo controller on Windows, I get this error from python:
p_build_version=00003.00004.00000
2020-02-29 15:03:19,037 cozmo.general INFO Found robot id=1
2020-02-29 15:03:19,039 cozmo.general INFO Connected to iOS device_id=1 serial=d8ce66a1a256da38b0f1b35e72046c9452a466f2
2020-02-29 15:03:19,269 cozmo.general INFO Robot id=1 serial=02e11d84 initialized OK
not coz
15:03:19 - controller.py : Unhandled exception of type : <class 'ModuleNotFoundError'>
Traceback (most recent call last):
File "controller.py", line 356, in
video_module = importlib.import_module('video.'+commandArgs.video)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.752.0_x64__qbz5n2kfra8p0\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'video.cozmo'

Please help, I want to get this working.

Also, I can't figure out how to use cozmo's integrated camera as a video device, and cozmo_tts doesn't fully work.

`tts vol` command does not work when using headphone jack (audio device 0)

Describe the bug
When controlling the audio via the headphone jack. Audio volume control does not appear to work. Running .tts vol 50 does not do anything. However, entering amixer cset numid=1 80% or 50% in the terminal will change the volume

To Reproduce
Steps to reproduce the behavior:

  1. Set the speaker_num in the controller.conf to 0,0.
  2. Plug in speakers to the headphone jack
  3. Run the .tts vol 50, then .tts vol 80. Notice no change

Expected behavior
Volume level is adjustable

Screenshots
n/a

Logs
n/a

Configurations

  • Raspberry Pi 3a+
# ALSA HW number for your playback device
# For Tellys this is 2.
# If you have trouble with the playback device changing hardware numbers,
# use the audio device name. Otherwise, leave it blank.
speaker_num=0,0
speaker_device=

Not quite sure how we should implement this in the code, as the alsa HW number is 0, but the command id is 1 for amixer cset numid=1 80%. Not sure how USB speakers handle this, or what they appear as.

No Camera Video Stream when Running on Beaglebone Blue

Describe the bug:
A clear and concise description of what the bug is.
When running controller.py on a BeagleBone Blue I am unable to see a video stream on the website but I do get an audio stream.


To Reproduce:
Steps to reproduce the behavior:

  1. Connect a webcam to the BeagleBone Blue USB.
  2. Configure controller.conf with username, api key, and check that camera_device = /dev/video0 does exist and matches. (I like to use ls /dev/video*). Save and close.
  3. Run python3 controller.py.
  4. I can hear audio through the website fine but video stays black. Below is the output of running python3 controller.py.
debian@beaglebone:~/remotv$ python controller.py
04:48:27 - controller.py : RemoTV Controller Starting up
modprobe: FATAL: Module bcm2835_wdt not found in directory /lib/modules/4.14.71-ti-r80
aplay: main:788: audio open error: No such file or directory
04:48:29 - controller.py : RemoTV Controller Started
04:48:29 - controller.py : Unknown event type

For comparison, I performed the same steps on a Raspberry Pi and was able to stream both audio and video perfectly fine. Below is the output of python3 controller.py.

pi@robopi:~/remotv $ python controller.py
14:25:02 - controller.py : RemoTV Controller Starting up
Failed to start watchdog.service: Unit watchdog.service not found.
aplay: main:788: audio open error: No such file or directory
14:25:04 - controller.py : RemoTV Controller Started
14:25:04 - controller.py : Unknown event type
14:25:06 - watchdog.py : Process FFmpegAudioProcess not running, restarting
14:25:06 - watchdog.py : Process FFmpegCameraProcess not running, restarting

Controller Version:

Running sh git log -1 outputs:

        commit 68bc77f7c9591cd678b5158f0b30c91c462ce42f (HEAD -> master, origin/master,origin/HEAD)
        Author: Bryan Morrison <[email protected]>
        Date:   Wed Oct 23 13:52:46 2019 -0700

            Fix error where ThunderBorg bots would be unable to move

            In my supreme laziness back on LR, I forced all directions to upper case so when we switched to all lowercase commands, no direction would fire.

Installation failure

Describe the bug
During Motor Hat install following command fails. See Additional Context
sudo python setup.py
To Reproduce

Steps to reproduce the behavior:

Use Raspberry Pi imager to flash Raspberry Pi OS (32-bit)
Released 2021-10-30
Online -1.1 GB download

Follow remo.tv documentation installation procedure.

Expected behavior

Expected successful installation.

Screenshots
Screenshots of the console are appreciated.

Logs
Always try to share logs if you can, or an output of the console.

Configurations

  • Sharing a pared down version of your controller.conf file could help. We obviously don't need things like your API key, username, etc.

Sample Configuration file for the RemoTV python controller

Global robot variables

[robot]

This is your username on the remotv site. This is the user that is allowed

to issue commands via chat

owner=silker

Your robots API key. The site will provide you with this when you create a

new robot.

robot_key= Gandalf's key here

The name of the channel you want the robot to join. This is optional. If the

named channel cannot be found, the robot will join the first channel.

channel=

Motor controller type for your robot. Current valid types are serial_board,

motor_hat, gopigo2, gopigo3, l298n, motozero, pololu, adafruit_pwm, owi_arm,

diddyborg, megapi_board or none.

type=motor_hat

Only used for motor_hat and mdd10

turn_delay=0.4
straight_delay=0.5

[camera]

Disable video

no_camera=false

Disable mic

no_mic=false

Specify the audio / video encoder you are using here. Currently ffmpeg,

ffmpeg-arecord and none. Note: Only robots with Raspberry Pi's or other Linux

based controllers should use ffmpeg-arecord. All others should use ffmpeg or

none.

type=ffmpeg-arecord

X and Y resolution to capture video at

#x_res = 640
#y_res = 480
x_res = 768
y_res = 432
#x_res = 1280
#y_res = 720

Video device

camera_device = /dev/video0

windows device example

#camera_device = video="USB Webcam"

Audio device. Generally the hardware number is preferred, but if you have

issues with that changing, using the device name will probably help.

otherwise, leave it blank.

mic_num = 1,0
mic_device=
#windows
#mic_device = audio="Microphone (Logitech G533 Gaming Headset)"

[ffmpeg]

Combined ffmpeg options for audio and video

ffmpeg_location = /usr/bin/ffmpeg

Windows path example

#ffmpeg_location = c://ffmpeg//bin//ffmpeg.exe

Path to v4l2-ctl

v4l2-ctl_location=/usr/bin/v4l2-ctl

Audio codec ffmpeg should use, only mp2 is supported but twolame will work

when compiled in to ffmpeg.

audio_codec = mp2

Audio channels, 1 for mono 2 for stereo.

audio_channels = 1

Bitrate for the audio stream in kilobytes

audio_bitrate = 32

Sample rate fot the audio stream in hertz

audio_sample_rate = 44100

Video codec ffmpeg should use. Currently only mpeg1video is supported.

video_codec = mpeg1video

Bitrate for the video stream in kilobytes

video_bitrate = 350

Video filter options. To rotate the video 180 degree, uncomment this line

#video_filter = transpose=2,transpose=2

Optional additional ffmpeg options for audio input and output. leave

audio_input_device blank if using alsa for audio format

windows

#audio_input_format = dshow
#audio_input_options = -audio_buffer_size 250
audio_input_format = alsa
audio_input_options =
audio_output_options = -nostats

Optional additional ffmpeg options for video input and output

video_input_format = v4l2

windows

video_input_format = dshow

video_input_options =
video_output_options = -nostats -threads 2

frame rate option. DO NOT CHANGE THIS unless you know what you are doing.

it's not really about changing the framerate from the camera as it is

changing the framerate of the video being sent to the server. The video

encoder gets grumpy if this is set wrong.

video_framerate = 25

[ffmpeg-arecord]
arecord_path=/usr/bin/arecord
arecord_format=S16_LE

[tts]

Specify the TTS engine you are using here. Current valid types are espeak,

festival and none

type=espeak

TTS volume

tts_volume=80

Allow anonymous users chat messages to be broadcast over TTS. Set to false to

block them.

anon_tts=true

Block URLS from being broadcast over TTS. Set to true to block them.

filter_url_tts=true

Enable extended chat commands

ext_chat=true

ALSA HW number for your playback device

For Tellys this is 2.

If you have trouble with the playback device changing hardware numbers,

use the audio device name. Otherwise, leave it blank.

speaker_num=1,0
speaker_device=

What the robot should say when it is ready to receive commands.

No need to encapsulate in quotes.

boot_message=ok

Announce the IPv4 address. This is useful for debugging

especially in new environments.

announce_ip=False

Announces when the cloned repo is out of date and by how many commits.

annouce_out_of_date=False

Enable delayed TTS, this allows a window for moderators to remove messages

before they get passed to TTS. Messenger must be enabled for this to function.

delay_tts = false
delay = 10

[espeak]

espeak specific TTS settings go here

voice gender, male or female

male = True

voice number

voice_number=1

espeak path. Option setting, for when espeak is not installed in the expected

place.

#espeak_path=

Windows path

#espeak_path=C://Program Files (x86)//eSpeak//command_line//

[festival]

Festival specific TTS settings go here

[pico]
voice=en-US

[polly]

polly requires you to have an amazon aws account and have setup a IAM user

with access to polly

robot_voice=Matthew
owner_voice=Russell
random_voices=true
access_key=
secrets_key=
region_name=us-east-1

[google_cloud]
ssml_enabled=False
key_file=
voice=en-US-Wavenet-A
#pitch can be between -20.0 and 20.0, 0.0 is default pitch for chosen voice
voice_pitch=0.0
#speaking rate can be between 0.25 and 4.0, 1.0 is default rate
voice_speaking_rate=1.0

All the settings below only work if random_voices is enabled

random_voices=False

Enable standard_voices to disable the use of Wavenet voices.

standard_voices=False

A comma separated list of approved language codes.

strict_languages= en-US,en-GB,en-AU

[cozmo]
forward_speed = 75
turn_speed = 50
volume = 100
charge_high = 4.79
charge_low = 3.6
send_online_status = 1
stay_on_dock = 0
annotated = 0
colour = 0

[adafruit_pwm]
address=0x40
pwm_freq=60
more_debug=False

[owi_arm]

[serial]
serial_device=/dev/ttyACM0
#serial_device=COM3 # Windows example serial device

#Option value, that will search for a serial port with a specific hardware
#name or id. Overwrites serial_device with the correct value if found.
#serial_name=Arduino

baud_rate=9600

[motor_hat]
day_speed = 255
night_speed = 255
turning_speed = 250
forward=[-1,1,-1,1]
left=[1,1,1,1]

Enable charging behaviours

slow_for_low_battery = false

Charging stuff

charge_hours = 3.0
discharge_hours = 8.0
chargeCheckInterval=5
chargeIONumber = 17

[gopigo2]
drive_time=0.35
turn_time=0.15

[gopigo3]
drive_time=0.35
turn_time=0.15

Settings specific to the l298n dual h-bridge motor driver

[l298n]
StepPinForward=12,16
StepPinBackward=11,15
StepPinLeft=15,12
StepPinRight=11,16

Change sleeptime to adjust driving speed

Change rotatetimes to adjust the turning. Will be multiplied with sleeptime.

IMPORTANT NOTE: How this is handled has changed, your values may no longer be

correct if using settings from an older controller.

sleeptime=0.2
rotatetimes=5

[motozero]
MotorDelay = 0.3

Motor1 is back left

Motor1A is reverse

Motor1B is forward

Motor1A = 24
Motor1B = 27
Motor1Enable = 5

Motor2 is back right

Motor2A is reverse

Motor2B is forward

Motor2A = 6
Motor2B = 22
Motor2Enable = 17

Motor3 is ?

Motor3A is reverse

Motor3B is forward

Motor3A = 23
Motor3B = 16
Motor3Enable = 12

Motor4 is ?

Motor4A is reverse

Motor4B is forward

Motor4A = 13
Motor4B = 18
Motor4Enable = 25

[pololu]
drivingSpeed=90

[mc33926]
drivingSpeed=180

[max7219]
ledrotate=180

[thunderborg]

maximum is 1.0, minimum is 0.0

left_motor_max=1.0
right_motor_max=1.0
sleep_time=0.4

[megapi_board]

Default time per message

motor_time = 0.2

Speed of drive motors (0 to 255)

driving_speed = 150

Speed of arm drive (0 to 255)

arm_speed = 50

Speed of grabber (0 to 255)

grabber_speed = 50

Motor controller ports

left_track_port = 2
right_track_port = 3
grabber_port = 4
arm_port = 1

[mqtt_pub]

If you are using MQTT you need to supply the host IP address, port, and Topic

host should be the IP address where the MQTT broker is running (i.e. 192.168.xx.xx)

the port typically is 1883 for MQTT

the topic is your choice, but it needs to match with the robot subscribers

host = YourBrokerID
port = 1883
topic = LR/command

#username for MQTT server.
#Not needed unless the server is accessible from outside the local network
#user = remo
#password for user on MQTT server. This can be blank. This also sets MQTT to try to use ssl
#if using SSL, the port should be 8883
#pass = hunter2

Logging settings

[logging]

Name of the log file to be written to

log_file=controller.log

log levels in order of importance are CRITICAL, ERROR, WARNING, INFO, DEBUG

file_level=WARNING
console_level=ERROR

log size is in bytes

max_size=100000

Number of old log files to hang onto.

num_backup=2

This is mostly stuff you probably shouldn't be touching

[misc]

host server to connect to

server = remo.tv

API version is the version of the API.

api_version = dev

video server to connect to so you can use local websocket and remote video server

video_server = remo.tv:1567

Enable the controller to look for custom handler code

custom_hardware = True

Enable the controller to look for custom TTS handler code

custom_tts = True

Enable the controller to look for custom chat handler code

custom_chat = True

Enable the controller to look for custom video handler code

custom_video = True

Enable the watchdog timer, if you are not using a raspberry pi, you won't want

this.

watchdog = True

Enable async handling of commands, your handler will either need to be able to

function asyncronously or it will need it's own blocking.

enable_async=False

Periodically check internet connection status, and report failure / connect

over tts

check_internet=True
check_freq=120

  • We need to know what version of the controller you're running. Run the following in the repo directory:
    git log -1
    • Paste the output here.

pi@raspberrypi:~/remotv $ git log -1
commit 36ac390 (HEAD -> master, origin/master, origin/HEAD)
Merge: 160a968 13a4b36
Author: Nocturnal42 [email protected]
Date: Tue Apr 20 03:15:49 2021 +1000

Merge pull request #37 from MrSpoon/master

Bug fix for pololu drive 

Additional context
Add any other context about the problem here.
During installation sudo python setup.py install fails. See following:

pi@raspberrypi:/usr/local/src $ cd /usr/local/src/Adafruit-Motor-HAT-Python-Library && sudo python setup.py install
running install
running bdist_egg
running egg_info
creating Adafruit_MotorHAT.egg-info
writing requirements to Adafruit_MotorHAT.egg-info/requires.txt
writing Adafruit_MotorHAT.egg-info/PKG-INFO
writing top-level names to Adafruit_MotorHAT.egg-info/top_level.txt
writing dependency_links to Adafruit_MotorHAT.egg-info/dependency_links.txt
writing manifest file 'Adafruit_MotorHAT.egg-info/SOURCES.txt'
reading manifest file 'Adafruit_MotorHAT.egg-info/SOURCES.txt'
writing manifest file 'Adafruit_MotorHAT.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/Adafruit_MotorHAT
copying Adafruit_MotorHAT/Adafruit_PWM_Servo_Driver.py -> build/lib.linux-armv7l -2.7/Adafruit_MotorHAT
copying Adafruit_MotorHAT/Adafruit_MotorHAT_Motors.py -> build/lib.linux-armv7l- 2.7/Adafruit_MotorHAT
copying Adafruit_MotorHAT/init.py -> build/lib.linux-armv7l-2.7/Adafruit_Mot orHAT
creating build/bdist.linux-armv7l
creating build/bdist.linux-armv7l/egg
creating build/bdist.linux-armv7l/egg/Adafruit_MotorHAT
copying build/lib.linux-armv7l-2.7/Adafruit_MotorHAT/Adafruit_PWM_Servo_Driver.p y -> build/bdist.linux-armv7l/egg/Adafruit_MotorHAT
copying build/lib.linux-armv7l-2.7/Adafruit_MotorHAT/Adafruit_MotorHAT_Motors.py -> build/bdist.linux-armv7l/egg/Adafruit_MotorHAT
copying build/lib.linux-armv7l-2.7/Adafruit_MotorHAT/init.py -> build/bdist. linux-armv7l/egg/Adafruit_MotorHAT
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_MotorHAT/Adafruit_PWM_Servo Driver.py to Adafruit_PWM_Servo_Driver.pyc
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_MotorHAT/Adafruit_MotorHAT
Motors.py to Adafruit_MotorHAT_Motors.pyc
byte-compiling build/bdist.linux-armv7l/egg/Adafruit_MotorHAT/init.py to i nit.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying Adafruit_MotorHAT.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG- INFO
copying Adafruit_MotorHAT.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/E GG-INFO
copying Adafruit_MotorHAT.egg-info/dependency_links.txt -> build/bdist.linux-arm v7l/egg/EGG-INFO
copying Adafruit_MotorHAT.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/ EGG-INFO
copying Adafruit_MotorHAT.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg /EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/Adafruit_MotorHAT-1.4.0-py2.7.egg' and adding 'build/bdist.linux- armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing Adafruit_MotorHAT-1.4.0-py2.7.egg
Copying Adafruit_MotorHAT-1.4.0-py2.7.egg to /usr/local/lib/python2.7/dist-packa ges
Adding Adafruit-MotorHAT 1.4.0 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/Adafruit_MotorHAT-1.4.0-py2.7.e gg
Processing dependencies for Adafruit-MotorHAT==1.4.0
Searching for Adafruit-GPIO>=0.7
Downloading https://github.com/adafruit/Adafruit_Python_GPIO/tarball/master#egg= Adafruit-GPIO-0.7
Best match: Adafruit-GPIO 0.7
Processing master
Writing /tmp/easy_install-v76fWi/adafruit-Adafruit_Python_GPIO-a12fee3/setup.cfg
Running adafruit-Adafruit_Python_GPIO-a12fee3/setup.py -q bdist_egg --dist-dir / tmp/easy_install-v76fWi/adafruit-Adafruit_Python_GPIO-a12fee3/egg-dist-tmp-D6Sxc 1
Adafruit GPIO Library
Works best with Python 2.7
THIS INSTALL SCRIPT MAY REQUIRE ROOT/ADMIN PERMISSIONS
Especially if you installed python for "all users" on Windows

try the following in your systems terminal if ensurepip is not sufficient:
$ python -m ensurepip --upgrade
$ python -m pip install --upgrade pip setuptools
zip_safe flag not set; analyzing archive contents...
Moving Adafruit_GPIO-1.0.4-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding Adafruit-GPIO 1.0.4 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/Adafruit_GPIO-1.0.4-py2.7.egg
Searching for adafruit-pureio
Reading https://pypi.org/simple/adafruit-pureio/
Downloading https://files.pythonhosted.org/packages/df/ca/9162d4648669d12af16d5a 66d808bdef6967eb684cbed9b1a3ebc19b361a/Adafruit_PureIO-1.1.9.tar.gz#sha256=2caf2 2fb07c7f771d83267f331a76cde314723f884a9570ea6f768730c87a879
Best match: Adafruit-PureIO 1.1.9
Processing Adafruit_PureIO-1.1.9.tar.gz
Writing /tmp/easy_install-wfr1Br/Adafruit_PureIO-1.1.9/setup.cfg
Running Adafruit_PureIO-1.1.9/setup.py -q bdist_egg --dist-dir /tmp/easy_install -wfr1Br/Adafruit_PureIO-1.1.9/egg-dist-tmp-QILjuZ
Traceback (most recent call last):
File "setup.py", line 30, in
packages = find_packages())
File "/usr/lib/python2.7/dist-packages/setuptools/init.py", line 145, in s etup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 67 , in run
self.do_egg_install()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 11 7, in do_egg_install
cmd.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 443, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 685, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 732, in install_item
self.process_distribution(spec, dist, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 777, in process_distribution
[requirement], self.local_index, self.easy_install
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 782, i n resolve
replace_conflicting=replace_conflicting
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1065, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1077, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 704, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 730, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 915, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 1183, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 1169, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 253, in ru n_setup
raise
File "/usr/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in se tup_context
yield
File "/usr/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 166, in sa ve_modules
saved_exc.resume()
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 141, in re sume
six.reraise(type, exc, self._tb)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 154, in sa ve_modules
yield saved
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in se tup_context
yield
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 250, in ru n_setup
_execfile(setup_script, ns)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 45, in _ex ecfile
exec(code, globals, locals)
File "/tmp/easy_install-wfr1Br/Adafruit_PureIO-1.1.9/setup.py", line 51, in

File "/usr/lib/python2.7/dist-packages/setuptools/init.py", line 144, in s etup
_install_setup_requires(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/init.py", line 139, in _ install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 724, in fetch _build_eggs
replace_conflicting=True,
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 782, i n resolve
replace_conflicting=replace_conflicting
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1065, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1077, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 791, in fetch _build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 704, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 730, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 915, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 1183, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", li ne 1169, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 253, in ru n_setup
raise
File "/usr/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in se tup_context
yield
File "/usr/lib/python2.7/contextlib.py", line 35, in exit
self.gen.throw(type, value, traceback)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 166, in sa ve_modules
saved_exc.resume()
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 141, in re sume
six.reraise(type, exc, self._tb)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 154, in sa ve_modules
yield saved
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in se tup_context
yield
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 250, in ru n_setup
_execfile(setup_script, ns)
File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 44, in _ex ecfile
code = compile(script, filename, 'exec')
File "/tmp/easy_install-wfr1Br/Adafruit_PureIO-1.1.9/temp/easy_install-uWckwE/ setuptools_scm-6.3.2/setup.py", line 22
f"{type(self).name} is forbidden, "
^
SyntaxError: invalid syntax

FFmpeg error when running controller.py on windows

i have a problem running one of my bots

when i try to run the controller.py file it says in cmd on windows because i'm running it on windows
09:40:41 - controller.py : RemoTV Controller Starting up 09:40:43 - controller.py : Unknown event type 09:40:43 - controller.py : RemoTV Controller Started 09:40:43 - ffmpeg.py : ffmpeg Video : [] 09:40:44 - watchdog.py : Process FFmpegCameraProcess not running, restarting 09:40:44 - ffmpeg.py : ffmpeg Video : [] 09:40:45 - watchdog.py : Process FFmpegCameraProcess not running, restarting 09:40:45 - ffmpeg.py : ffmpeg Video : [] 09:40:46 - watchdog.py : Process FFmpegCameraProcess not running, restarting 09:40:46 - ffmpeg.py : ffmpeg Video : [] 09:40:47 - watchdog.py : Process FFmpegCameraProcess not running, restarting 09:40:47 - ffmpeg.py : ffmpeg Video : [] 09:40:48 - watchdog.py : Process FFmpegCameraProcess not running, restarting 09:40:48 - ffmpeg.py : ffmpeg Video : [] 09:40:49 - watchdog.py : Process FFmpegCameraProcess not running, restarting 09:40:49 - ffmpeg.py : ffmpeg Video : []

i once got that yesterday when it wasn't working on the pi but i just had to bash kill commands

controller.txt

Add info for Anki Vector in the Wiki.

I was trying to get my Anki Vector up and streaming on Remo, and it looks like the controller files already have python files for vector in every category!
In the /video folder...
image
In the TTS folder...
image
and even in the hardware folder!
image

Problem is when I use those parameters in controller.conf, it still thinks I want to stream a Cozmo, (probably because the new vector robot controller, is a duplicate copy of my original cozmo controller folder) even though I set everything to vector stuff. (e.g. type=vector under robot, tts=vector_tts under tts, and type=vector_vid under camera)

Please help

Git repo version checking

Implement version checking via git status and have it announce an out of date repo via TTS. Default off.

May turn default ON after "release"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.