ODrive GUI Beta Release

This GUI is outdated and no longer supported. Please check out our new web browser GUI


We received good feedback from you about the first testing version of the ODrive GUI here.

Now, a newer version is available! In addition, the GUI has been moved to the ODrive git repo on the devel branch.

You can find the beta testing releases here for Windows, Linux, Mac, and Raspberry Pi

And a short demo video here.

Please use this thread to report on what you like, what you don’t like, what’s broken, and what you would like to see!

Dependencies

The GUI requires python 3 to run. In addition, you must install the following python modules: flask, odrive, flask-socketio, flask-cors

On windows, you can do that by running this command: pip install odrive flask flask-socketio flask-cors

On linux, use pip3 install odrive flask flask-socketio flask-cors

Python must be available on your system path for the GUI to find it. During installation of python, via anaconda or “vanilla” python, it will ask you if you wish to add it to PATH - choose “yes”.

Beta 3 Changes

Correct handling of infinity as a value
ODrive config import/export
Menu added to header
Version bump of socket.io dependencies
ODrive enums are now autogenerated and included on build
Slider component fixes
Numeric values automatically switch between decimal formatting and scientific notation

Beta 2 Changes

Numerous improvements to the handling of disconnecting and reconnecting ODrives. This functionality is now much more stable.
Input modes now have the proper enums, courtesy of mdhom on github! (first PR to the GUI!)

Beta 1 features:

Output from the server is available on the Start page for debugging
Parameters like axis.requested_state that have enums (AXIS_STATE_IDLE, etc) now show those enums in the GUI
Numeric control inputs support arithmetic input
Axis errors are available, similar to dump_errors() in odrivetool
A Configuration Wizard has been added
The Parameter Tree popup is now filtered depending on what it is being used for
Disconnect/reconnect of ODrives is supported
Connecting to multiple ODrives is supported
Application now has an icon

Building from source

To build the GUI, you must install nodejs. After that, clone the devel branch of the ODrive github repo. Open the GUI directory in the folder where you cloned the repo, and run npm install and then npm run electron:serve to run the GUI. If it works, you can use npm run electron:build to build an executable for your platform. The executable file is available in ODrive/GUI/dist_electron.

Running from source

On the devel git branch, there may be unreleased changes to dependencies like fibre or the ODrive enumerations. Use this command to launch the GUI with the dependencies from the repo:
npm run electron:serve -- ../tools/

3 Likes

Thanks for the Update.
Some feedback:
I really like that the tool reconnects if Odrive thows an error ( previous one didn’t )
Wizard -> Brake resistor selection : there’s a bug probably - I only see “I don’t have brake resistor” as an option - Win 10 machine

image

2 Likes

If somebody with OSX doesn’t know how to build an OSX version of the GUI, I have build one.
@PJohnson I can send you one to add to the release if you like.

@robo_geo Thanks for letting me know, I’ll take a look.

@Toon_Nelissen I would appreciate you sending it to me! Eventually the GUI will be set up with CI to build for all platforms, but we’re not quite there yet.

1 Like

@PJohnson I have tested the GUI yesterday, and noticed some issues with the python server and some python (flask, flask socketio) dependencies.
Eventually I got it running.
Do you want me to make a pull request?

Sure, what issues were you seeing? Did you install those dependencies with pip before running the GUI?

Yes I installed all dependencies, when I use npm run electron:serve everything is working, when building with npm run electron:build and I try to run the app, it can’t find flask.

import flask ModuleNotFoundError: No module named 'flask'

Basically OSX has a standard python3 installed. In the past I have installed different versions of python with pyenv. For some reason when running the build electron app its using /usr/bin/python3 although when I use python3 or pip it is using the pyenv installed version. I even tried /usr/bin/pip3 to install those dependencies but it returns errors.
Seems like a problem with python on my machine.

To get it running with npm run electron:serve I only changed the last line of odrive_server.py from socketio.run(app, host='0.0.0.0', port=5000) to socketio.run(app, port=5000)

Interesting, I have never heard of that! The host='0.0.0.0' part is a result of a problem I had in windows (but not linux) - for some reason, ‘0.0.0.0’ is a much faster localhost connection than ‘127.0.0.1’. I can add an OS check for that line.

Hmm. Possibly, it is making use of a hardware buffer on your Ethernet card. Which may have mixed results, perhaps? :thinking:
Beware that setting host='0.0.0.0' in python (probably node.js too) normally means listen on all interfaces not just localhost. So anyone else on your network can connect to your ODrive.

1 Like

Hi! I have cloned the git repo just now, and built the GUI from source (in the devel branch), using ‘npm run electron:serve’. I get this WARN in the command line, and the GUI opens up, but the GUI shows an JS error message in a Dialog Box. If I click it away, the GUI can’t find my drives. I am using Ubuntu 20.04, ODrivetool 0.5.1, Python3.

Anyone knows what’s wrong?
Cheers,

Dan

Here is the JS Error Message that is shown in GUI:

That’s a strange error. I think what’s happening is this: the GUI server needs python3. Depending on the OS you use, the command to launch python3 is either python3 or python. The GUI checks this by looking at the output of python -V. Depending on the platform and python version, that output is on either stdout or stderr. Those checks use the toString() method, so if it returns null then something has gone wrong with how I’m checking for the command to launch python3.

What output do you get in a terminal if you run python -V? I’m on ubuntu 18.04 because I had some issues with the snap ecosystem in ubuntu 20.04, but I can get a live session going and see if the error is replicable in general.

Thanks for your help! When I enter ‘python -V’, I get an error:
python -V

Command ‘python’ not found, did you mean:

command ‘python3’ from deb python3
command ‘python’ from deb python-is-python3

Any ideas?

Looks to me like you don’t have python installed! You should be able to install it with sudo apt install python3.

Python3 has already been installed:

root@sol:/home/dan# apt show python3
APT-Manual-Installed: yes
Version: 3.8.2-0ubuntu2

dan@sol:~$ python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40)

When I run ‘python3 -V’ it works:
python3 -V
Python 3.8.5

But when I run ‘python -V’ it does not work!:

python -V

Command ‘python’ not found, did you mean:

command ‘python3’ from deb python3
command ‘python’ from deb python-is-python3

On windows, I always use the python launcher. It’s the most reliable way:

py -3 -v

Everything else is a crapshoot lol. We actually do a dumb check in tup to see what the user has available, by running python -v then python3 -v and seeing which one comes back positive (if either)

Nice work on the GUI, much easier than the command line…
I have a setup of 12 ODrives and need to configure all of them. If I switch USB to a new ODrive the GUI gets an error:


return self.handle_event(handler, message, namespace, sid, File "C:\Users\xxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\flask_socketio_init.py", line 713, in _handle_event
ret = handler(*args)
File “C:\Users\xxx\AppData\Local\Temp\1iURP9zHSnPIwQqaYQtYdKhKfbW\resources\server\odrive_server.py”, line 119, in get_odrives
odriveDict[key] = dictFromRO(globals()[‘odrives’][key])
File “C:\Users\xxx\AppData\Local\Temp\1iURP9zHSnPIwQqaYQtYdKhKfbW\resources\server\odrive_server.py”, line 170, in dictFromRO
returnDict[key] = {“val”: str(RO._remote_attributes[key].get_value()), File “C:\Users\xxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\fibre\remote_object.py”, line 72, in get_value
buffer = self._parent.channel.remote_endpoint_operation(self._id, None, True, self._codec.get_length()) File “C:\Users\xxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\fibre\protocol.py”, line 314, in remote_endpoint_operation
raise ChannelBrokenException() # Too many resend attempts fibre.protocol.ChannelBrokenException


If i disconnect an ODrive and connect the same I get no error. So the issue is only with a new one.
Closing the GUI.exe (windows) is not enough as i need to kill the Python process also in order to connect to a new ODrive.

Can you try to build the GUI from devel? I think this was fixed on Windows.

Which version of Windows are you using? The ODrive disconnect/reconnect will be fixed, but I am unable to replicate the dangling python process issue on Windows 10. In fact, I don’t see a python process launched at all with the GUI, it’s all rolled into “ODriveGUI.exe” in task manager. This might be from some specifics of my system. Thank you for the bug report!