ODrive GUI - first release for testing

We got a lot of good feedback from you on the Request for Comments thread a while back. Today, a very early version of the ODrive GUI is available for testing!

You can find it here.

And a demo video here

Currently, it uses python 3 for the server. Before using the tool, the following python 3 prerequisites must be installed: flask flask-socketio flask-cors odrive

The GUI is packaged as an Electron app, using Vue for the frontend and a simple python server for the backend. In the default use case, this is seamless. You can also launch the odrive_server.py file from the github repo on one device and run the GUI on a separate device.

If you want to use versions of the odrive and fibre packages that are different from what’s available on pip, you can direct the GUI to use those instead.

./odrive_gui_win.exe C:/Users/<you>/ODrive/tools C:/Users/<you>/ODrive/Firmware

Let us know what you think!

6 Likes

The GUI is so cool!
I downloaded it and try to use now,
Not connected to odrive yet. The first thing i tried is add action . i want to add odrives.odrive0.axis0.controller.vel_setpoint


1 small window appear on top left but i cannot change thing. i click on odrives in that window. 1 more “blank” line for action appear

what do i need to do to add action for velocity setpoint control

Hi Vu Tran,

The address bar on the Start page must be green before you can add items to the dashboard. The list of items comes from the ODrive, so it doesn’t know what items are available until the ODrive connects. This can change in the future.

Debugging is difficult at this stage. Did you install the python prerequisites as shown in the 1st post?

To debug connectivity issues, clone the repo and launch odrive_server.py from the server folder by running this command:

python3 odrive_server.py

On Windows 10, you might need to do python instead of python3. When you run the server, what output do you get? It should look something like this:

Also, note that it takes roughly 15 to 20 seconds to find an ODrive with the default version of odrivetool.

Yes (in Anaconda)
After connecting to odrive and wait for about 10 second, the address was green as you said. And now i can add function of odrive tool.
I got error when calibration, what i need to do to use reboot function and dump error(or see what is error)
What do you mean when said “clone”

i dont know how to do what you said.

Thanks for testing the GUI! It is in a very early state of development. Right now, the GUI does not support good error debugging or rebooting the ODrive. Those features will be added soon.

The “clone the repo” instruction was for fixing a GUI connection issue. If you can connect to the ODrive (address bar is green), ignore that.

If you are getting errors during calibration, I recommend you use odrivetool to figure out what’s going on.

i tried odrivetool executed calibration without any error (many times before) (maybe we can ignore this problem)
i get one 1 more problem: after GUI connected to Odrive, i go to play around about 3-4 minutes, can use these command
odrv0.axis0.controller.pos_setpoint = 100000
odrv0.axis0.controller.pos_setpoint = 0
and then when i click go tab, nothing change, after that i come back to the start page. GUI not connect to odrive. And then i disconnected everything even power source, reconnect it, and use the GUI, it can connect to ordive however, after about 3-4 minutes. it disconnected again.


i think i need to come back to clone the repo instruction to fix the GUI connection

@vu_tran nothing wrong with the GUI (except perhaps for not making it clear that pos_setpoint is now a read-only value in the new firmware)
You need to use input_pos instead of pos_setpoint.

Hi Vu Tran,

towen may be on to something - is your ODrive running the default firmware or something else?

For the clone the repo question: we use git for version control and github to store our code. To “clone a repo” is to download the source code, from github (or elsewhere), using git. You can also download the source code from github as a zip file if you don’t have git installed.

If you go to this page: https://github.com/PAJohnson/odrive_gui/tree/master you should see a green button labeled “code.” You can download it as a zip file, or run this command:

git clone https://github.com/PAJohnson/odrive_gui.git in a terminal to get the source code.

After you have the source code, there is a file called odrive_server.py in the server folder. You can run that with python odrive_server.py to see what the output is. I recommend doing this without starting the GUI - the GUI also launches this file, and I believe the current version of the ODrive usb utilities only supports one connection at a time (If the GUI is running, odrive_server.py will never connect to your ODrive).

I think you are having connection issues with your ODrive, with your 3-4 minute disconnection problem. I think you would have the same issue with odrivetool as you do with the GUI - the GUI doesn’t really do anything special, it communicates with the ODrive the same way as odrivetool.

2 Likes

Thank you so much @PJohnson. Sorry, my English and technical knowledge are not good. But your reply is very specific and clear. i will follow your instruction and check the result.
@towen, I am using the default firmware.

1 Like

Very nice, started playing around with it on OSX today. UI comes up but does not connect to odrive. I also tried launching odrive_server.py from clone repository, but it also hangs at “looking for odrives”, even though odrive is there and I can connect using odrivetool. How can I best troubleshoot odrive.find_any()?

Up and running on OSX! Misunderstood the Python server part. With the Python server running, ODrive is reliably detected after few seconds and GUI fully functional. GUI is awesome!

2 Likes

Awesome! Thanks for trying it out. Glad to hear that it works under OSX. Are you manually launching the Vue app and the server separately? I have no way to test the GUI on a Mac.

If you have the repo cloned and you are set up for development, you should be able to run npm run electron:serve to test the electron version and npm run electron:build to package it into an executable. I’ll add that info to the readme.

Yes, started Vue app and server separately. Also happy to confirm that npm run electron:serve and npm run electron:build both work as designed. App comes up and is functional. I also ended up with a working installer. Installation suceeded, executable installed connects successfully and is functional. Sole complaint so far: no ODrive icon yet configured for the executable app :wink:

I’m on a Win7 x64 machine and have installed the GUI prerequisites using ‘pip install flask’ etc. The GUI loads, but is not connecting to oDrive. My oDrive is flashed with RC-0.5.1.

Hi llrjt100,

I don’t have a windows 7 machine to test on. Here’s something you can try to verify that the server is working correctly: if you clone the repo, you can run odrive_server.py by itself by

python3 odrive_server.py

That should pop up some information about whether or not the server can find your ODrive. If it can, you should be able to go to 0.0.0.0:5000 in a browser and see a page saying “ODrive GUI Server”. If that works, also try 127.0.0.1:5000. The GUI uses the latter address by default - it is a little faster for some reason (I’m not a networking guru). If you can access both of those addresses from your browser and see the test page, the GUI should work.

If only the first address works, you can manually point the GUI towards 0.0.0.0:5000 entering it in the address box on the GUI start page.

From some googling, it seems like 127.0.0.1 might act funny on windows 7.

1 Like

@PJohnson Thanks - I cloned the repo and ran odrive_server directly and get:
image

When did you install the odrive python utilities? Upgrading them might fix this issue -

pip install --upgrade odrive

@PJohnson Thanks! That did the trick :slight_smile:

1 Like