Code Monkey home page Code Monkey logo

piro's Introduction

piro's People

Contributors

benbusby avatar dependabot[bot] avatar ewegene 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  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

piro's Issues

test_motors.sh missing

Hello and thanks for the neat project!

In the Readme you write something about a test_motors.sh in the utils folder, as of now there is no test_motors.sh in the utils folder

App assumes it is running from under the pi user directory

I'm running raztot under a different user account (root instead of pi) and when I try to enable the video stream it fails.

I know I shouldn't be running it as root, but if I used a different user (e.g. ewegene) this problem still would have surfaced.

[2019-06-04 23:52:34,180] ERROR in app: Exception on /camera [POST]
Traceback (most recent call last):
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 2311, in wsgi_app
    response = self.full_dispatch_request()
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1834, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1737, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/_compat.py", line 36, in reraise
    raise value
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1832, in full_dispatch_request
    rv = self.dispatch_request()
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1818, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/root/raztot/venv/lib/python3.5/site-packages/flask_login/utils.py", line 261, in decorated_view
    return func(*args, **kwargs)
  File "/root/raztot/app/routes.py", line 157, in camera
    subprocess.Popen(stream_proc.split())
  File "/root/raztot/venv/lib/python3.5/site-packages/gevent/subprocess.py", line 627, in __init__
    restore_signals, start_new_session)
  File "/root/raztot/venv/lib/python3.5/site-packages/gevent/subprocess.py", line 1505, in _execute_child
    raise child_exception
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/raztot/utils/stream.sh'

Can get 1 second of video and then dead?

Hi,

Followed your tutorial but when I connect to my RazTot via Dataplicity I only see around 1-2 seconds of video before the feed dies and I see the following getting spammed in my terminal (on my pi):

[ERR] [ice.c:janus_ice_outgoing_traffic_handle:4118] [5714788999919634] ... only sent -1 bytes?

Any idea of what would cause it to work for a split second and then just stop suddenly? If I watch my "wormhole" page even after the video cuts out I can see the steamrate going up and down, but no video. I tried it in Chrome and Safari on my Mac and both times I see that above error on the pi almost immediately.

Thanks!

Janus problem.

I have an issue running the raztot app after succesful install. I get stuck here, and Janus reports errors, I hope someone can spot my mistake, i'm quite new to linux:

pi@raspberrypi:/ $ cd /raztot
pi@raspberrypi:
/raztot $ python3 -m venv ./venv
pi@raspberrypi:/raztot $ source ./venv/bin/activate
(venv) pi@raspberrypi:
/raztot $ source run.sh local
Starting pigpiod...
Using api key: 58lRMY3r0FMAoZxPv8ADVZj6Bo3sJAka
Janus commit: 5665a5be27222ff4957819f9d8b360b67afb12ab
Compiled on: Thu Jun 6 23:18:46 CEST 2019


Starting Meetecho Janus (WebRTC Server) v0.7.2

Checking command line arguments...
Debug/log level is 4
Debug/log timestamps are disabled
Debug/log colors are enabled
Adding 'vmnet' to the ICE ignore list...
Using 192.168.0.109 as local IP...
[WARN] Token based authentication disabled
Initializing recorder code
Initializing ICE stuff (Full mode, ICE-TCP candidates disabled, half-trickle, IPv6 support disabled)
TURN REST API backend: (disabled)
[WARN] Janus is deployed on a private address (192.168.0.109) but you didn't specify any STUN server! Expect trouble if this is supposed to work over the internet and not just in a LAN...
Crypto: OpenSSL >= 1.1.0
[WARN] No cert/key specified, autogenerating some...
Fingerprint of our certificate: EF:DB:25:19:31:F9:22:EA:3C:9E:C4:06:E8:BD:AD:61:C5:5D:70:CD:3B:65:0F:55:5C:9A:83:C4:C4:7F:0B:E0
[WARN] Data Channels support not compiled
Joining Janus requests handler thread
[WARN] Event handlers support disabled
Plugins folder: /opt/janus/lib/janus/plugins
Sessions watchdog started
Loading plugin 'libjanus_nosip.so'...
JANUS NoSIP plugin initialized!
Loading plugin 'libjanus_videocall.so'...
JANUS VideoCall plugin initialized!
Loading plugin 'libjanus_textroom.so'...
JANUS TextRoom plugin initialized!
Loading plugin 'libjanus_voicemail.so'...
JANUS VoiceMail plugin initialized!
Loading plugin 'libjanus_streaming.so'...
JANUS Streaming plugin initialized!
Loading plugin 'libjanus_echotest.so'...
JANUS EchoTest plugin initialized!
Loading plugin 'libjanus_sip.so'...
JANUS SIP plugin initialized!
Loading plugin 'libjanus_audiobridge.so'...
JANUS AudioBridge plugin initialized!
Loading plugin 'libjanus_videoroom.so'...
JANUS VideoRoom plugin initialized!
Loading plugin 'libjanus_recordplay.so'...
JANUS Record&Play plugin initialized!
Transport plugins folder: /opt/janus/lib/janus/transports
Loading transport plugin 'libjanus_http.so'...
HTTP webserver started (port 8088, /janus path listener)...
[WARN] HTTPS webserver disabled
[WARN] Admin/monitor HTTP webserver disabled
[WARN] Admin/monitor HTTPS webserver disabled
JANUS REST (HTTP/HTTPS) transport plugin initialized!
Loading transport plugin 'libjanus_pfunix.so'...
[WARN] Unix Sockets server disabled (Janus API)
[WARN] Unix Sockets server disabled (Admin API)
[WARN] No Unix Sockets server started, giving up...
[WARN] The 'janus.transport.pfunix' plugin could not be initialized
Initializing...
Running SocketIO app on 127.0.0.1...

I followed and sat up everything according to the guide, but it does not seem that i can open the Raztot webapp even though my Dataplicity server link is working fine. I have also tried to run the app locally, but with same result. Hopefully it's ok to ask this here, also new to github :)

Setup script issues

Hello again! Here are a few things I found:

  • In setup.sh under "Generate self-signed certificates" you generate certificates and try to copy them to the /etc/nginx/ path before installing nginx (so this will fail)
  • You seem to install a large amount of unneeded packages. Over 200 packages including the x-server for some reason
  • In the nginx part of the setup.sh you copy the nginx config to sites-available but never link this file to sites-enabled which means the file will never be used. You could install it directly to sites-enabled which is not best pactice but gets the job done for this project
  • The nginx config includes the link to the certificate files but it will never use them because you specified that the server will only listen on port 80 so all https requests will result in "connection refused" errors. adding "listen 443 ssl;" will fix that

3rd Servo?

Will it be possible to have a third servo controlled through the app? I want to have a servo activating a laserpointer while you press the up key on the keyboard in the webapp, so it will activate while the RazTot is moving forward. It is working now on GPIO pin 17, and running on the 3v output, but I wanted to be able to run it simultaneously with the wheels.

So my question is: What do I have to change in the code to run GPIO pin 27 as if it was 22 and 17, but all at the same time? I will look through the code and see if I can figure it out, but if you have time to help a coding noob it would be awesome :)

Recordings fail when raztot/app/static/captures/ doesn't exist

The captures output directory doesn't exist by default. When trying to create a recording it fails:

[raztot-streaming] New video stream! (ssrc=2945139143, index 0)
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstFileSink:filesink0: Could not open file "/home/pi/raztot/app/static/captures/2019-06-04-23_57_11.mp4" for writing.
Additional debug info:
gstfilesink.c(438): gst_file_sink_open_file (): /GstPipeline:pipeline0/GstFileSink:filesink0:
system error: No such file or directory
Setting pipeline to NULL ...
Freeing pipeline ...

Additionally, when trying to view a list of the recordings it also fails:

[2019-06-04 23:58:51,425] ERROR in app: Exception on /static/captures/ [GET]
Traceback (most recent call last):
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 2311, in wsgi_app
    response = self.full_dispatch_request()
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1834, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1737, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/_compat.py", line 36, in reraise
    raise value
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1832, in full_dispatch_request
    rv = self.dispatch_request()
  File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1818, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/root/raztot/venv/lib/python3.5/site-packages/flask_login/utils.py", line 261, in decorated_view
    return func(*args, **kwargs)
  File "/root/raztot/app/routes.py", line 222, in list_captures
    files = os.listdir(CAPTURES_FOLDER)
FileNotFoundError: [Errno 2] No such file or directory: '/root/raztot/app/static/captures'

No motor

You are not using a H bridge.. a motor driver. Won't you burn the raspberry pi ?
How did you solve this ?

Arrow Keys don't trigger wheels

Thank you so much for this wonderful app! I actually bought my first pi just to install and play with raztot.

The installation went smoothly, the ./test_motors.sh 17 22 works as expected, the wheels turn, I can start the stream, capture images and video and play them back but nothing happens when I press the arrow keys on the keyboard. This is true for both source run.sh local and remote. I also checked out the feature/mobile-controls branch but also here nothing happens when i swipe on my iphone. Another thing I noticed is that no stats appear in the right hand corner it says:

Camera Status: Offline
Recordings: N/A
Stream Status: Live
Temperature: ???
Stream Rate: 3099 kbits/sec
Storage: ??? / ??? GB remaining
Version: 1.0.0

I would really appreciate your support on how to debug this issue further to get it up and running.

Thanks in advance.

Mobile servo controls

Me and my kid had a great time with raztot so far, thank you again for that! We checked out your mobile-controls branch and while it works, it feels buggy as the commands (i.e. touchend) don't seem to be transmitted directly and the robot keeps on driving after the touch is ended. While searching for a smoother solution I stumbled accross the following repo: https://github.com/ufulu/robotcontrol-javascript and wanted to know your thoughts if this could and should be integrated? While I have been tinkering around with python, flask and JavaScript for a bit in other mini projects I am not quite sure how to incorporate these controls on my own.. :/

Only works with HTTPS connections

All working browsers now require SSL encryption for WebRTC. This basically means iOS will not work with this unless you go through a very convoluted process of creating a CA cerificate, then a self signed cert using that CA and then installing that CA in iOS. Android is less an issue since you can just bypass the warning, but you can't go full screen if the SSL cert has an error so if you want full screen video on a phone/tablet you are stuck with the same workaround needed for iOS to work at all.

Note I've built effectively this same app and am looking for an alternative workaround. Eg low latency streaming to a browser. WebRTC is just not going to do it.

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.