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

Cannot access the gesture control in the web server #2

Open
minhduy105 opened this issue Jul 17, 2018 · 7 comments
Open

Cannot access the gesture control in the web server #2

minhduy105 opened this issue Jul 17, 2018 · 7 comments

Comments

@minhduy105
Copy link

Hi,
I tried to access the gesture control in the web server, but it did not show anything. In the terminal that I used to start the robot, it showed those lines

[2018-07-16 19:05:27,595] ERROR in app: Exception on /sequences [GET] Traceback (most recent call last):
File "/home/zi/wp/blossom/venv/local/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request()
File "/home/zi/wp/blossom/venv/local/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e)
File "/home/zi/wp/blossom/venv/local/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb)
File "/home/zi/wp/blossom/venv/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request()
File "/home/zi/wp/blossom/venv/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args)
File "/home/zi/wp/blossom/blossom-public/src/server.py", line 170, in get_sequences seqs = server.master_robot.get_time_sequences()
AttributeError: 'SequenceRobot' object has no attribute 'get_time_sequences'

The robot work fine with all of the video example, it just show those errors whenever I clicked on the "Gesture Control"
Finally, I am using VMWare to run the code in Linux.

Thank you,
~Duy

@msgtn
Copy link
Contributor

msgtn commented Jul 19, 2018

Pushed the missing functions, they should work now

@minhduy105
Copy link
Author

Sorry for the late update. I just try it again and there is a few things happen

  1. there are no errors shows up in my terminal
  2. the web browser is just a black page, there is no windows or anythings. (This is different than before you updated the code. Before it, I saw two windows in the browser, but there is no items in those windows)

@msgtn
Copy link
Contributor

msgtn commented Aug 1, 2018

Try running yarn install in the blossom_web directory?

@minhduy105
Copy link
Author

minhduy105 commented Aug 1, 2018

Hi,
I did run the yarn install. I think that I have not explained my problem clearly.
When I run this line of code python start.py -n woody.

  • A new tab pop-up in my browser.
  • I could see the six videos, and when I click on the video, the robot reacted to the video.
  • When I want to create new action and click on the "Go to gesture control", all I see is the black space, which is different than before.

This is the versions of the software that I used, in case you want to know, Node 8.11.3, Yarn 1.9.2, Python 2.7.15, and Anacondo instead of virtualenv

Thank you,
~Duy

Edited: additionally, I tried it in both Firefox and Chrome.

@msgtn
Copy link
Contributor

msgtn commented Aug 1, 2018

I'm running similar versions, apart from a slightly newer version of Node (10.7).

You can't create new movements in Gesture Control, it's only there for playing gestures similar to typing them in the command line interface.

I added the code for the Expo application so that you can control the robot using the phone and make / record new gestures:
https://github.com/hrc2/blossom-public/tree/master/BlossomApp

@minhduy105
Copy link
Author

I downloaded the new code and tried to run it.
Every time I turned the "Control Robot" on, I got this error on my terminal:

[2018-08-07 04:04:54,017] ERROR in app: Exception on /position [POST]
Traceback (most recent call last):
File "/home/zi/wp/blossom/venv/local/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/home/zi/wp/blossom/venv/local/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/zi/wp/blossom/venv/local/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/zi/wp/blossom/venv/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/home/zi/wp/blossom/venv/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/zi/wp/blossom/blossom-public/src/server.py", line 109, in set_position
imu = get_imu_data(raw_data)
File "/home/zi/wp/blossom/blossom-public/src/server.py", line 160, in get_imu_data
imu[i] = float(raw_data[i_s + 1:i_e])
ValueError: could not convert string to float: false


Additionally, would you mind make a quick tutorial video on how to use the app? I only saw controlling button for the height and ears of the robot. I would love to learn how to control the other DOF of the robot.

Thank you

@msgtn
Copy link
Contributor

msgtn commented Aug 9, 2018

Pushed updates to the control files; I'm currently out of town so I don't have an actual robot to test with but it seems to not throw errors testing just the app connected to the server.

To control the robot with the app, just move the phone around (screen up, with top of the screen pointing in the same direction as the front of the head so the robot should be facing away from you) and the head should follow the movements. The height and ears are controlled with the sliders. Press 'Reset Height' until the head and phone are aligned. You can also turn on 'Mirror' under 'Settings' to make it easier to control with the robot facing you instead of away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants