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

robertalab needs porting for ev3dev-stretch #71

Open
deckers opened this issue May 6, 2019 · 6 comments
Open

robertalab needs porting for ev3dev-stretch #71

deckers opened this issue May 6, 2019 · 6 comments

Comments

@deckers
Copy link

deckers commented May 6, 2019

After installing the stable ev3dev stretch release (ev3dev-stretch-ev3-generic-2019-03-03.img, Kernel 4.14.96-ev3dev-2.3.2-ev3, followed by sudo apt-get update ; sudo apt-get upgrade => openrobertalab/stable,now 1.7.1+1.0.0 all) I had to notice that OpenRoberta Lab seems to produce incompatible python code.
Neither motor movement nor speech works because of missing arguments or methods/attributes:

ERROR:roberta.lab:Ooops:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/roberta/lab.py", line 278, in _exec_code
exec(compiled_code, scope)
File "/home/robot/NEPOprog.py", line 18, in <module>
'B':Hal.makeLargeMotor(ev3dev.OUTPUT_B, 'on', 'foreward'),
TypeError: makeLargeMotor() missing 1 required positional argument: 'side'

The corresponding program:
Zwischenablage01

ERROR:roberta.lab:Ooops:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/roberta/lab.py", line 278, in _exec_code
exec(compiled_code, scope)
File "/home/robot/NEPOprog.py", line 23, in <module>
hal.setLanguage("de")
AttributeError: 'Hal' object has no attribute 'setLanguage'

Do I have to use the old jessie distribution instead of stretch?

@ensonic
Copy link
Contributor

ensonic commented May 6, 2019

Yes, this is a known issue. So far ev3dev-strech was marked as beta and now it got marked stable all of a sudden together with a takedown of the link to the ev3dev-jessie image. Unfortunately the ev3dev-python api change in incompatible ways (so it is not us producing 'incompatible code').

We'll port things at some point, but it is a larger effort starting with the logistics of debian packaging :/

@ensonic ensonic changed the title robertalab fails on ev3dev-stretch stable robertalab needs porting for ev3dev-stretch May 6, 2019
@deckers
Copy link
Author

deckers commented May 6, 2019

Now with a fresh installation of ev3dev-jessie (ev3dev-jessie-ev3-generic-2017-09-14) I get the same error messages when using the motors.

ERROR:roberta.lab:Ooops:
...
File "/home/robot/NEPOprog.py", line 18, in <module>
'B':Hal.makeLargeMotor(ev3dev.OUTPUT_B, 'on', 'foreward'),
TypeError: makeLargeMotor() missing 1 required positional argument: 'side'

Have a look to issue #1171 in openroberta-lab: I think the previously mandatory parameter side has been deleted on March 22...

So these errors actually should occur on any ev3dev-installation out there, right?

@deckers deckers changed the title robertalab needs porting for ev3dev-stretch robertalab needs adoption to actual openroberta-lab (an needs porting for ev3dev-stretch) May 6, 2019
@deckers deckers changed the title robertalab needs adoption to actual openroberta-lab (an needs porting for ev3dev-stretch) robertalab needs adoption to actual openroberta-lab (and porting for ev3dev-stretch) May 6, 2019
@deckers
Copy link
Author

deckers commented May 6, 2019

Found in ev3.py:

# TODO(ensonic): remove 'side' param, server will stop using it >=3.3.0
# TODO(ensonic): 'regulated' is unused, it is passed to the motor-functions
# direcly, consider making all params after port 'kwargs'

@ensonic
Copy link
Contributor

ensonic commented May 6, 2019

The jessie image has an old package. If you do apt-get update and then upgrade the package this will work. I had asked to update the jessie image, but on that ask the image was taken down :/

Its really unfortunate for users and I will try to find a solution here. We'll probably put an update jessie image online on the openroberta site for the time being.

@deckers
Copy link
Author

deckers commented May 6, 2019

I am sure I updated with sudo apt-get update, sudo apt-get install openrobertalab before I posted again... (with stopping/starting the openroberta-service).

But for any reason now it works with the jessie distribution - thank you.

@deckers deckers changed the title robertalab needs adoption to actual openroberta-lab (and porting for ev3dev-stretch) robertalab needs porting for ev3dev-stretch May 6, 2019
@dlech
Copy link
Contributor

dlech commented May 6, 2019

ev3dev-stretch also has an old version of openroberta. I just copied the latest version from jessie to stretch about an hour ago, so sudo apt update && sudo apt upgrade on stretch should get the latest version there too.

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

3 participants