The programming environment »Open Roberta Lab« by Fraunhofer IAIS enables children and adolescents to program robots. A variety of different programming blocks are provided to program motors and sensors of the robot. Open Roberta Lab uses an approach of graphical programming so that beginners can seamlessly start coding. As a cloud-based application, the platform can be used without prior installation of specific software but runs in any popular browser, independent of operating system and device.
Apache License 2.0
122
stars
118
forks
source link
Python Code Generation - Initialize Variable with use of isPrime (or any other Generated Helper Method) not working #1650
Describe the bug
When using a Python-Robot, initializing a variable with the help of a function that needs a generated helper function the program will crash. One of these functions is the isPrime function.
To Reproduce
Steps to reproduce the behavior:
Select a Python-Robot here Lego Spike
Add global Variable to NEPO-Program
Add isPrime with any number as input here 3 as Initiatal value
Add a show text on LED Matrix with the created variable
Upload the Program to the Robot
See error
Expected behavior
"True" will be shows by the LED-Matrix.
Screenshots
Reason for behaviouritem = isPrime(3) will be called before the ___isPrime() method was visitied by the python interpreted.
Additional context
To check weather or not a function is a generated Helper Function check the Source Code of the NEPO-program.
Describe the bug When using a Python-Robot, initializing a variable with the help of a function that needs a generated helper function the program will crash. One of these functions is the isPrime function.
To Reproduce Steps to reproduce the behavior:
Expected behavior "True" will be shows by the LED-Matrix.
Screenshots![Screenshot from 2024-03-20 12-09-02](https://github.com/OpenRoberta/openroberta-lab/assets/82971538/f6274890-f7ef-43f1-8e9b-d0b5d78e6179)
Reason for behaviour item = isPrime(3) will be called before the ___isPrime() method was visitied by the python interpreted.
Additional context To check weather or not a function is a generated Helper Function check the Source Code of the NEPO-program.
Device Information