Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers.

JeVois Inventor Python ,change module' s parameters in GUI

0 votes
Hello

How can I change some parameters of my own Python module in the JeVois Inventor GUI.

For example HSV values for a given Opencv function ....

Thank You

Salutations
asked Dec 20, 2018 in Programmer Questions by phk010 (140 points)

1 Answer

0 votes
This is not supported yet. The abstractions we use for parameters in C++ rely on templates and I believe we cannot easily transfer them to python. We have been looking into workarounds but the priority is not so high compared to other items so it might take a while,

In the meantime, your best bet is to add custom commands, and then set the parameters using those commands from the console in the inventor.

see for example http://jevois.org/doc/PythonTutorial3_8py_source.html

you implement parseSerial() to decode received commands that use command names that are not already used by the JeVois engine. Then also implement supportedCommands() to provide some help message.

for example, you could define a new command which you would want to type in the console of the inventor:

setMinHue value

in parseSerial() you get the whole line of text that was entered in the command-line by the user. So just break it into tokens, then if the first token is "setMinHue" convert the second token to a number an update the internal parameter of your module that handles the min hue with that number.

more info about parseSerial() is here: http://jevois.org/doc/ProgrammerPython.html
answered Jan 4 by JeVois (39,960 points)
...