GithubHelp home page GithubHelp logo

roboportal / bot_box Goto Github PK

View Code? Open in Web Editor NEW
42.0 2.0 5.0 517 KB

Universal remote control for robots. Works via the internet.

Home Page: https://roboportal.io

License: MIT License

Go 98.00% Shell 2.00%
robotics robots streaming webrtc raspberry-pi raspberrypi roboportal pion golang ros

bot_box's People

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

Watchers

 avatar  avatar

bot_box's Issues

Does not compile on Raspberry Pi OS 64 Bit

Using go 19.4 arm64 on Raspberry Pi OS 64bit 2023-05-03

$ uname -smor
Linux 6.1.21-v8+ aarch64 GNU/Linux
$go version
go version go1.19.4 linux/arm64

When compiling, I get this unrecognized instruction error:

$ CGO_LDFLAGS="-latomic" go build -tags=arm
[... snipped ...]
# runtime/internal/syscall
/usr/local/go/src/runtime/internal/syscall/defs_linux_arm64.go:7:7: SYS_FCNTL redeclared in this block
        /usr/local/go/src/runtime/internal/syscall/defs_linux_arm.go:7:7: other declaration of SYS_FCNTL
# math
/usr/local/go/src/math/sqrt_arm.s:13: unrecognized instruction "SQRTD"
asm: assembly of /usr/local/go/src/math/sqrt_arm.s failed

How do I config the env file and main.go file for an IP camera

this is my .env file:
srv_url = "wss://api.roboportal.io:8001"

public_key = ""
secret_key = ""

stun_urls = "stun:stun.l.google.com:19302"
video_codec_bit_rate = 1000000
frame_format = "RGBA"
video_width = 640
video_frame_rate = 30

audio_input_enabled = false
audio_output_enabled = false

output_mode = ipc

video_source_ip = ""
video_source_port = 8080

bot_box_ipc_port = 5555
robot_ipc_port = 5556
robot_ipc_host = 127.0.0.1

camera_multiplexor_i2c_bus = 1

debug = false

idk how to config my main.go file for these settings because there are things like baud rate and not video source ip inside

Audio Not Transmitting from Raspberry Pi to Browser in Webrtc Bot

Thank you for this great project.

I've been working on setting up a Webrtc bot following the provided instructions. The project works wonderfully overall. However, I've encountered an issue with audio transmission from the Raspberry Pi to the browser.
I can successfully talk on my PC, and the Raspberry Pi is playing the sound. However, the audio is not transmitted from the Raspberry Pi to the browser. The camera and controls work as expected.

I've tested the audio recording on the Raspberry Pi using the arecord command, and it works fine. I can record and playback without any issues. I have also tried the gen2brain/malgo example code capture which was also working fine.

.env file:

srv_url = "wss://api.roboportal.io:8001"

public_key = "xxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxx"
secret_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

stun_urls = "stun:stun.l.google.com:19302"
video_codec_bit_rate = 1000000
frame_format = "RGBA"
video_width = 800
video_frame_rate = 30

audio_input_enabled = true
audio_output_enabled = true

output_mode = console
port_name = "/dev/serial/by-id/..."
baud_rate = 115200

bot_box_ipc_port = 5555
robot_ipc_port = 5556
robot_ipc_host = 127.0.0.1

camera_multiplexor_i2c_bus = 1

debug = true

I am using a generic USB audio card for capturing and playing the audio, which I have set as the default card in /usr/share/alsa/alsa.conf

My setup:

  • Raspberry Pi 4B
  • OS: 32bit Raspbian GNU/Linux 12 (bookworm)
  • go version 1.21.4

Let me know if you need more details. Appreciate your help!

Does not work with Raspberry Pi Camera Module 3

Hi,

I am trying to run this on Raspberry pi OS 64 bit (thanks for the update!) on a Pi4 with Camera Module 3, and a HDMI display.

On startup, it connects to the web portal, then immediately crashes with a GetUserMedia error. Here is the debug output:

2023/09/17 11:51:56 Arena: WS connected
2023/09/17 11:51:56 GetUserMedia error inappropriate ioctl for device
panic: inappropriate ioctl for device

goroutine 37 [running]:
github.com/roboportal/bot_box/pkg/arena.(*AnArena).Run(0x400011da00)
        /home/pi/bot_box/pkg/arena/arena.go:220 +0x1c10
created by main.main in goroutine 1
        /home/pi/bot_box/main.go:167 +0x8b4

With legacy camera support enabled instead, I get a similar error, though not exactly the same.

2023/09/17 11:58:45 GetUserMedia error Failed to start streaming: invalid argument
panic: Failed to start streaming: invalid argument

goroutine 23 [running]:
github.com/roboportal/bot_box/pkg/arena.(*AnArena).Run(0x40000ad860)
        /home/pi/bot_box/pkg/arena/arena.go:220 +0x1c10
created by main.main in goroutine 1
        /home/pi/bot_box/main.go:167 +0x8b4

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.