Open lmoellendorf opened 3 years ago
Like like a bug in the code generator (https://github.com/OpenRoberta/openroberta-lab/blob/develop/RobotEV3/src/main/java/de/fhg/iais/roberta/visitor/codegen/Ev3PythonVisitor.java) - I am not sure where the [0]
is coming from. I've tried to recreate the program and I don't get the '[0]', but I can't plug the '0 into the logic comparision block (different issues). Could you attach a screenshot of your program too?
Another issue could be the version of the robertalab package on your ev3dev image. I never had the resources to update it beyond stretch and the stretch images itself are not updated :/ So you'll need to ssh in and update the package.
We're in the process of including the hal functions in the code directly to avoid this problem, but we're not done with it yet.
I am not sure where the
[0]
is coming from. I've tried to recreate the program and I don't get the '[0]', but I can't plug the '0 into the logic comparision block (different issues). Could you attach a screenshot of your program too?
Yes, you cannot plug the '0' into the logic block because ORL treats the return value of getInfraredSensorSeek()
as a List. This is how my program looks like:
Another issue could be the version of the robertalab package on your ev3dev image. I never had the resources to update it beyond stretch and the stretch images itself are not updated :/ So you'll need to ssh in and update the package.
Do I have to add a special repository to update it? I already tried updating:
robot@ev3dev:~$ sudo apt update
[sudo] password for robot:
Get:1 http://security.debian.org stretch/updates InRelease [53.0 kB]
Ign:2 http://httpredir.debian.org/debian stretch InRelease
Hit:3 http://httpredir.debian.org/debian stretch Release
Hit:4 http://archive.ev3dev.org/debian stretch InRelease
Get:6 http://security.debian.org stretch/updates/main armel Packages [614 kB]
Fetched 667 kB in 39s (16.9 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
86 packages can be upgraded. Run 'apt list --upgradable' to see them.
robot@ev3dev:~$ sudo apt install openrobertalab
Reading package lists... Done
Building dependency tree
Reading state information... Done
openrobertalab is already the newest version (1.7.4+1.0.0).
0 upgraded, 0 newly installed, 0 to remove and 86 not upgraded.
can anybody tell me how i am Beginner in Open source Can you tell me How I can also Contribute
Steps to reproduce
1) On an EV3 running ev3dev-stretch-ev3-generic-2020-04-10 attach the LEGO EV3 IR sensor to sensor port 4. 2) run this program (composed in ORL):
Expected result
The code should evaluate the first item in the list returned by
getInfraredSensorSeek()
.Actual result
getInfraredSensorSeek()
seems to return a float.This is the traceback:
Further information
Maybe #56 is related?
If I change the python code like this it works as expected:
If the beacon is left of the sensor (when looking from behind the sensor) the values are positive (up to 25?) else negative (down to -25?).
Further Questions
How is the sensor supposed to work? Is it similar to lejos getSeekMode?