Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrow Keys don't trigger wheels #12

Closed
ufulu opened this issue Jun 19, 2019 · 3 comments
Closed

Arrow Keys don't trigger wheels #12

ufulu opened this issue Jun 19, 2019 · 3 comments
Labels
user support User needs help with their build

Comments

@ufulu
Copy link

ufulu commented Jun 19, 2019

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.

@ufulu
Copy link
Author

ufulu commented Jun 19, 2019

A quick follow up:

After a clean restart I noticed that during the installation of the required python libraries the following error occurs:
...

  Running setup.py bdist_wheel for psutil ... error
  Complete output from command /home/pi/raztot/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-idyqfdll/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp8kamthsopip-wheel- --python-tag cp35:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
 
  error: invalid command 'bdist_wheel'
 
  ----------------------------------------
  Failed building wheel for psutil

it then goes on:

...
Failed to build psutil alembic SQALchemy cryptography Mako cffi
...
 Running setup.py install for psutil ... done
  Running setup.py install for Mako ... done
  Running setup.py install for SQLAlchemy ... done
  Running setup.py install for alembic ... done
  Running setup.py install for cffi ... done
  Running setup.py install for cryptography ... done
Successfully installed Flask-1.0.3 Flask-SocketIO-4.1.0 Jinja2-2.10.1 Mako-1.0.12 MarkupSafe-1.1.1 SQLAlchemy-1.3.5 WTForms-2.2.1 Werkzeug-0.15.4 alembic-1.0.10 asn1crypto-0.24.0 cffi-1.12.3 click-7.0 cryptography-2.7 dnspython-1.16.0 eventlet-0.25.0 flask-login-0.4.1 flask-migrate-2.5.2 flask-selfdoc-1.1.0 flask-sqlalchemy-2.4.0 flask-wtf-0.14.2 gevent-1.4.0 greenlet-0.4.15 itsdangerous-1.1.0 monotonic-1.5 pigpio-1.42 psutil-5.6.3 pycparser-2.19 pyopenssl-19.0.0 python-dateutil-2.8.0 python-editor-1.0.4 python-engineio-3.8.1 python-socketio-4.1.0 six-1.12.0 wheel-0.33.4
Initializing...

and I seem to be able to successfully finish the installation....

None the less why are these error thrown and could they have an impact on the keybaord input not turning the wheels?

@benbusby
Copy link
Owner

So if you see "???" anywhere in the status panel, that means there isn't an active websocket connection, which is how the servo commands are sent with the arrow keys. From your second comment it looks like there are some problems installing the required python libraries, which could explain the websocket issues.

Can you try running

cd ~/pi/raztot
source venv/bin/activate
pip install -r config/requirements.txt

and send me what you get back from that? The fact that 'bdist_wheel' isn't found is weird, since wheel is the first package installed in requirements.txt.

@benbusby benbusby added the user support User needs help with their build label Jun 19, 2019
@ufulu
Copy link
Author

ufulu commented Jun 19, 2019

Thank you for getting back to me so fast.

It turns out my issue was due to a failed CORS request. I started looking at the developer console output and saw a "CORS request did not succeed" error message. Then I started to notice that the problem was that up until now I opend raztot with http://192.168.178.111... As soon as I used the https protocol, the stats showed up a lo and behold the keyboard and touch input work and the wheels turn! Great job! :)

Any how still not sure why I see the bdsit error message during install but this doesn't seem to be the source of the issue.

pip install -r config/requirements.txt produces the following output:

Requirement already satisfied: wheel in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 1))
Requirement already satisfied: Flask_SocketIO in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 2))
Requirement already satisfied: Flask in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 3))
Requirement already satisfied: psutil in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 4))
Requirement already satisfied: flask_selfdoc in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 5))
Requirement already satisfied: python-socketio in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 6))
Requirement already satisfied: eventlet in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 7))
Requirement already satisfied: pigpio in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 8))
Requirement already satisfied: gevent in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 9))
Requirement already satisfied: flask_wtf in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 10))
Requirement already satisfied: flask-login in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 11))
Requirement already satisfied: flask-migrate in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 12))
Requirement already satisfied: flask-sqlalchemy in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 13))
Requirement already satisfied: pyopenssl in ./venv/lib/python3.5/site-packages (from -r config/requirements.txt (line 14))
Requirement already satisfied: itsdangerous>=0.24 in ./venv/lib/python3.5/site-packages (from Flask->-r config/requirements.txt (line 3))
Requirement already satisfied: Werkzeug>=0.14 in ./venv/lib/python3.5/site-packages (from Flask->-r config/requirements.txt (line 3))
Requirement already satisfied: Jinja2>=2.10 in ./venv/lib/python3.5/site-packages (from Flask->-r config/requirements.txt (line 3))
Requirement already satisfied: click>=5.1 in ./venv/lib/python3.5/site-packages (from Flask->-r config/requirements.txt (line 3))
Requirement already satisfied: six>=1.9.0 in ./venv/lib/python3.5/site-packages (from python-socketio->-r config/requirements.txt (line 6))
Requirement already satisfied: python-engineio>=3.8.0 in ./venv/lib/python3.5/site-packages (from python-socketio->-r config/requirements.txt (line 6))
Requirement already satisfied: greenlet>=0.3 in ./venv/lib/python3.5/site-packages (from eventlet->-r config/requirements.txt (line 7))
Requirement already satisfied: monotonic>=1.4 in ./venv/lib/python3.5/site-packages (from eventlet->-r config/requirements.txt (line 7))
Requirement already satisfied: dnspython>=1.15.0 in ./venv/lib/python3.5/site-packages (from eventlet->-r config/requirements.txt (line 7))
Requirement already satisfied: WTForms in ./venv/lib/python3.5/site-packages (from flask_wtf->-r config/requirements.txt (line 10))
Requirement already satisfied: alembic>=0.7 in ./venv/lib/python3.5/site-packages (from flask-migrate->-r config/requirements.txt (line 12))
Requirement already satisfied: SQLAlchemy>=0.8.0 in ./venv/lib/python3.5/site-packages (from flask-sqlalchemy->-r config/requirements.txt (line 13))
Requirement already satisfied: cryptography>=2.3 in ./venv/lib/python3.5/site-packages (from pyopenssl->-r config/requirements.txt (line 14))
Requirement already satisfied: MarkupSafe>=0.23 in ./venv/lib/python3.5/site-packages (from Jinja2>=2.10->Flask->-r config/requirements.txt (line 3))
Requirement already satisfied: python-editor>=0.3 in ./venv/lib/python3.5/site-packages (from alembic>=0.7->flask-migrate->-r config/requirements.txt (line 12))
Requirement already satisfied: python-dateutil in ./venv/lib/python3.5/site-packages (from alembic>=0.7->flask-migrate->-r config/requirements.txt (line 12))
Requirement already satisfied: Mako in ./venv/lib/python3.5/site-packages (from alembic>=0.7->flask-migrate->-r config/requirements.txt (line 12))
Requirement already satisfied: asn1crypto>=0.21.0 in ./venv/lib/python3.5/site-packages (from cryptography>=2.3->pyopenssl->-r config/requirements.txt (line 14))
Requirement already satisfied: cffi!=1.11.3,>=1.8 in ./venv/lib/python3.5/site-packages (from cryptography>=2.3->pyopenssl->-r config/requirements.txt (line 14))
Requirement already satisfied: pycparser in ./venv/lib/python3.5/site-packages (from cffi!=1.11.3,>=1.8->cryptography>=2.3->pyopenssl->-r config/requirements.txt (line 14))

Thanks again for your kind contribution and fast support

@ufulu ufulu closed this as completed Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user support User needs help with their build
Projects
None yet
Development

No branches or pull requests

2 participants