ODrive GUI Beta Release

I used the compiled exe, downloaded 2 days ago.
I get the same if i run the build. from the output terminal (anaconda) i get this:


lost odrive
lost odrive
Found 206639884D4D
odrive list: [‘odrive0’, ‘odrive1’]
Exception in thread Thread-834:
Traceback (most recent call last):
File “C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\threading.py”, line 917, in _bootstrap_inner
self.run()
File “C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\threading.py”, line 865, in run
self._target(*self._args, **self._kwargs)
File “C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\socketio\server.py”, line 682, in _handle_event_internal


And from the debug output from the application I get this:


lost odrive
lost odrive
Found 206639884D4D odrive list: [‘odrive0’, ‘odrive1’]
Exception in thread Thread-834: Traceback (most recent call last): File “C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\threading.py”, line 917, in _bootstrap_inner self.run() File “C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\threading.py”, line 865, in run self._target(*self._args, **self._kwargs) File “C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\socketio\server.py”, line 682, in _handle_event_internal r = server._trigger_event(data[0], namespace, sid, *data[1:]) File “C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\socketio\server.py”, line 711, in trigger_event return self.handlers[namespace]event File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\flask_socketio_init.py", line 283, in handler *args) File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\site-packages\flask_socketio_init.py", line 713, in _handle_event ret = handler(*args) File “C:\Users\xxx\OneDrive - SINTEF\Ocean\Projects\BLDC\ODrive\git\ODrive-gui-0.0.1-beta1\GUI\server\odrive_server.py”, line 119, in get_odrives odriveDict[key] = dictFromRO(globals()[‘odrives’][key]) File “C:\Users\xxx\OneDrive - SINTEF\Ocean\Projects\BLDC\ODrive\git\ODrive-gui-0.0.1-beta1\GUI\server\odrive_server.py”, line 170, in dictFromRO returnDict[key] = {“val”: str(RO._remote_attributes[key].get_value()), File “C:\Users\xxx\AppData\Local\Continuum\anaconda3\lib\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\Continuum\anaconda3\lib\site-packages\fibre\protocol.py”, line 315, in remote_endpoint_operation raise ChannelBrokenException() # Too many resend attempts fibre.protocol.ChannelBrokenException


Im running with FW 0.5.1 RC5 (if that matters).
Is there a disconnect button? I just unplug the ODrive and reconnects a new one when this happens.

On the devel branch of the ODrive repo, this issue is fixed. Can you pull the repo and launch it from there and see if it fixes your issue?

In general, if you are disconnecting and reconnecting ODrives often, I strongly recommend to fully close the GUI and reopen it. The USB backend (shared by the GUI and odrivetool) currently works for that but has some issues - there are changes on the way to fix that, but that is not within the scope of the GUI. In other words, the GUI won’t crash, but if you disconnect and reconnect 10 different ODrives, strange things might happen.

1 Like

For some reason I was not cloning the devel branch, but I am now. When I run the GUI from ‘npm run electron:serve’ it connects and disconnects properly. But the values are not updating, they turn into NAN when i connect Odrive1 (the bar is green and it says connected). If I reconnect to ODrive0 the values show up again.

If I build the application I get this error message:


args from python:
Traceback (most recent call last): File “C:\Users\xxx\AppData\Local\Temp\1jPZR7l2DHLJKgutzaY3qlopb7x\resources\server\odrive_server.py”, line 260, in
import odrive ModuleNotFoundError: No module named ‘odrive’


I can start the odrive server by running ‘python3 odrive_server.py’ from anaconda. If i do the motor is connected in the exe-file (but I get NaN if i connect a new one…)

Edit: Running the last command from anaconda, not python…

Is there away to use the GUI with an ODrive connected over UART?

Based this advice from PJohnson on Discord, I got it to work:

I think the issue with the GUI has to do with how I’m checking for the correct command to launch python 3 (python on windows, python3 on linux). I did not anticipate python 2 not being present on an Ubuntu 20.04 install! For now, can you try this change to get it to work?
In background.js, line 25, there is a function getPyCmd(). Can you change the contents of that function to

function getPyCmd() {
return ‘python3’;
}

And see if it works?
I’m fairly sure that that will work. I have some other tasks that I need to do today and tomorrow, so it will be a few days before I can make a proper fix and re-release the GUI binaries on the git repo.

==> That fixed the issue for me! Please, also fix that in the code, eventually, so it will work for others in the future!

Hi, all!

now that I could execute the GUI on my Linux, I am stuck in the last page of the wizard: ‘Review Choices:’ All data good but, can’t ‘Apply’ it, can’t press ‘Next’, can’t press ‘Finish’ either. No reactions, no errors, no warnings, or hints…

What should I do?

Thanks,

Dan

PS: I am using the newest version newest commit version of devel branch.

As discussed on Discord (with you? Someone else)? Since nothing is green, there are no changes to make. So you’re good to go :slight_smile:

Discussed with me. Thanks.

You may want to change that though for the future. Should be able to press Next or Finish here, in that case…

@9220
Yeah, the end of the config wizard could be cleaned up a bit. But if you are at the end of the wizard, and there are no changes to be applied, what should Next or Finish do? There’s nothing “next” in the wizard and the last page is already where you Finish at.

The python version check should work now, too! Can you check it out on devel?

@SG-O
This is feasible, but not currently supported. Right now the GUI server has a “discovery loop” over USB. That could be modified to search for a serial bus device, but you’d need to know the port ahead of time. I have a feeling that it would be slow. See this post for more details: Usb-to-serial device

On the other hand, if you have a usb isolator, you could use a USB connection for the GUI while simultaneously sending UART commands. They shouldn’t conflict.

@Kakskiv
I’ve done some testing with that and have attempted some fixes. Until the new fibre backend is ready, this behavior will just have to be strange for the GUI on windows. If you disconnect and the values turn to NaN, and stay NaN when you reconnect, switch to the Start page and back to Tuning (or your custom dashboard) and the values should update correctly.

On windows, with the usb driver we use, the “connection lost” signal in the USB stack flat-out does not work. With the new backend, it does work. To get this behavior working now would be extremely messy in the code (have to poll the ODrive to see if it is connected for every single data request).

@robo_geo
Sorry for getting back to you so late! Can you also try the devel branch? I have not been able to replicate that bug with the brake resistor.

It could say, ‘No changes to apply!’, and the Finish button could be enabled. Pressing Finish, would take user to tuning page or so.

Or it could say, ‘No changes to apply. Wizard completed!’,

A really crucial feature for the GUI is supporting lines in plots, that are computed of multiple values (e.g. ‘3 * m1.input_pos - m0.input_pos’)! – Without that the Plotting is not really useful. Plotting in the new UI is so awesome, it would be a shame, if it did not have that capability.

Are you planning to add that (when)? If not: could I add it myself somehow (e.g. by modifying the backend or frontend)?

Beta 3 has just been released! The changes are documented on the release page linked at the top of this thread.

To use the newest version of the GUI, the flask_socketio python dependency must be upgraded to the latest version. This can be done by running pip install flask_socketio --upgrade.

@9220
I hoped to get around to “calculated values” as a feature, but it’s not in this release.

1 Like

Hi all.

I’ve just managed to get the GUI to launch on MacOSX Catalina. I tried to run it from ODriveGUI.zip but got ‘this application can’t be opened’; changing permissions on it didn’t help and there was a reference to electron in the error log.
I tried following the above instructions to build from source and got this error:" npm ERR: missing script: electron:serve"
which seems to be fixed by running the global install command for electron:
npm install electron -g
after doing that, deleting and redownloading the ODrive-gui-0.0.1-beta3.zip file, and re-running the instructions above, the GUI has launched.
Fingers crossed for connecting the ODrive itself :slight_smile:

1 Like

Not sure if this has been mentioned before, but it would be nice if you could manually set the buffer-size for the graphs, i.e. the size of the x-axis.

Good morning,

I have tried to install GUI. Sounds good but it can not find my Odrive board and I have the following message:


Can you help me?
Thanks :slightly_smiling_face:

Hi Ludo,

It looks like you are running the GUI from the git repo. To launch it and have it find the correct version of fibre, use this command: npm run electron:serve -- ../tools/. I’ll update the first post of this thread to reflect that.

2 Likes

Hi , thanks a lot, that worked perfectly. :smile:

1 Like

GUI does not seem to work on Nvidia Jetson Xavier. Building works fine, but running the finished .appimage produces an error saying that it is unable to import flask, despite flask being available. It can not find the ODrive, even though it is is plugged in and powered on. What gives?

1 Like

I don’t quite know what OS the Xavier uses so it might be wrong but it does sound like an environment issue - make sure the correct version of python is actually used by the GUI. I for insctance use anaconda python on my PC using windows and need to use the conda command prompt to launch the gui as otherwise (for instance just double clicking the .exe) another python environment (from system path) is used that lacks libraries that however are available with the correct python version.

1 Like

Hi all,
I hope I haven’t missed something simple here. I have installed the python libs but when I run the GUI I get the following error:

socketio.run(app, host=‘0.0.0.0’, port=5000) File “C:\Users\T�ge\AppData\Local\Programs\Python\Python39\lib\site-packages\flask_socketio_init_.py”, line 588, in run

app.run(host=host, port=port, threaded=True, File “C:\Users\T�ge\AppData\Local\Programs\Python\Python39\lib\site-packages\flask\app.py”, line 990, in run

run_simple(host, port, self, **options) File “C:\Users\T�ge\AppData\Local\Programs\Python\Python39\lib\site-packages\werkzeug\serving.py”, line 1052, in run_simple

inner() File “C:\Users\T�ge\AppData\Local\Programs\Python\Python39\lib\site-packages\werkzeug\serving.py”, line 996, in inner

srv = make_server( File “C:\Users\T�ge\AppData\Local\Programs\Python\Python39\lib\site-packages\werkzeug\serving.py”, line 847, in make_server

return ThreadedWSGIServer( File “C:\Users\T�ge\AppData\Local\Programs\Python\Python39\lib\site-packages\werkzeug\serving.py”, line 740, in init

HTTPServer.init(self, server_address, handler) File “C:\Users\T�ge\AppData\Local\Programs\Python\Python39\lib\socketserver.py”, line 452, in init

self.server_bind() File “C:\Users\T�ge\AppData\Local\Programs\Python\Python39\lib\http\server.py”, line 140, in server_bind

self.server_name = socket.getfqdn(host) File “C:\Users\T�ge\AppData\Local\Programs\Python\Python39\lib\socket.py”, line 791, in getfqdn

hostname, aliases, ipaddrs = gethostbyaddr(name) UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xfc in position 1: invalid start byte

Does anyone know anything about this type of error?