UI for Odrivetool

Thanks!
I totally agree. Making it dynamic is necessary, considering that odrive V4.0 would be for single motor.
My python development skills would be put to test on this one. But I am up for it.

Having a tree view is a really good idea, and being able to customize your windows is really an ultimate goal. As I encountered these needs already while trying to tune motors, needing to switch between config tabs and graphs.

So, in QT there are treeview and MDI area widgets that would allow to have custom windows to be added and moved by user. I will have to play around with them to learn more and understand it’s limitation. But I suppose I can start working on these things and slowly build a new app.

3 Likes

Hi,

I thought I will give an update on what I have been working on.

So, I am trying to redo the app so it works in dynamic way. Without coding any manual variables.
In Qt I had to figure out how to use treeview objects, models, etc. Parsing data via drag and drop functions and window assembly via MDI area. I manage to make some basics work.

Another component was to extract data from odrive remote object. In the video link you can see the basic principle. Just drag and drop from a treeview and appropriate window will be generated. I just basically need to filter out that if it’s function add a button, if data is from config it can be editable spinbox, or it’s just a label, or a checkbox. For some values there will be an option to add a graph instead.
Key is that all data is dynamically generated.

5 Likes

Beautiful! Looks amazing!
A suggestion: for float type variables, instead of spinbox, make a slider (with default endpoints say at 50% and 150% of current value), and have some spinboxes for the ends to set custom endpoints of the slider.
Great work, thanks for doing this ;D

2 Likes

Oh man that looks really great! I look forward to the finished product :smiley:

Thank you for the feedback!

I will try with the sliders, but I think working with the sliders one of the important bits is to define a single step size too. And for this reason I foresee that there probably should be a whole preferences/settings menu. But single step can also be added into spinboxes. I experimented with it in a control section previously where velocity single step was 1024, so just by using a mouse wheel you could quickly adjust.

Only next week I will be able to continue. But I can already see that once basics things are functional, the first necessary thing would be to save/load your custom layout. And maybe even allow to add multiple tabs with MDI area.

Anyways, I really enjoy working on it too :wink:

Slider with step sizes and a separate input box for custom values is pretty solid.

Brilliant!

Works great, Extremely helpful, Keep going!

Feature request:
Could you kindly add a verbose “tool tips” for parameters, buttons, terms…
It will help newcomers to learn faster

Thank you for open source,
How to support your development? (Beer/Cookies) Do you have a Patreon/PayPal account ?

@Wetmelon Alright, this week we will try. Slider and custom input box. And for setting up the slider limits and step size would be inside “preferences”.
Do you think preferences should be global or per custom window?

@LukeSkypewalker Adding a ToolTip is really simple, I could try following documentation comments for most. But I think mostly I would just add “Help” buttons that direct you to odrive documentation for example, troubleshooting the errors etc. since Odrive documentations is being constantly updated and new content is being added. Therefore, linking to the documentation probably would be the best source.
Thank you for the input, I will definitely consider it.
Offering a donation is very kind of you. I am very pleased that someone is appreciating it to this extent and I will not say no to this :slight_smile: https://paypal.me/pools/c/8cIfDKtOXw
Currently I am living in Montreal, Quebec if to accept beer :wink:
Since I take this intention personally, I would like to share couple more things of what I do. I am working on building a Pick and Place machine using Odrive. It’s work in progress but my goal is to make and share a detailed documentation of a build process, BOM, etc. Also, there are other smaller projects in line and I am just trying to figure out a proper way of writing documentation in order to share them.
Thanks

2 Likes

This is super exciting! Do you have it up on github?

It’s hosted on gitlab https://gitlab.com/p87942130/ui_odrivetool but this is currently “static” version for one odrive board with 2 axis. I am in a process of making “dynamic” version where user can configure the configurations to display and the layout. Hopefully by the end of this week I will post something functional.

3 Likes

Great work! I’ve downloaded it for Windows 10, using @Isaac_Ben’s advice. Also I was getting errors with the pip install -r requirements.txt , I removed pkg-resources==0.0.0 which kept throwing

“Could not find a version that satisfies the requirement pkg-resources==1.0.0 (from -r requirements3.txt (line 18)) (from versions: )
No matching distribution found for pkg-resources==1.0.0 (from -r requirements3.txt (line 18))”

So after removing pkg-resources==0.0.0, I then got “jupyter-console 5.2.0 has requirement prompt_toolkit<2.0.0,>=1.0.0, but you’ll have prompt-toolkit 2.0.8 which is incompatible.”

But changing the version of prompt-toolkit from 2.08 to something between 2.0.0 and 1.0.0 gave another error…

“ipython 7.2.0 has requirement prompt-toolkit<2.1.0,>=2.0.0, but you’ll have prompt-toolkit 1.0.15 which is incompatible.”

So I manually installed each requirement without a revsion number and it all seems to work. :smile:

Thanks for the feedback.
As you are not the first one who had these issues. And after just installing correct packages it seems to work I will change the setup instructions.
There are only three main pip installations required.

  • odrive
  • pyqtgraph (library for graphing)
  • pyqt5 (required for pyqtgraph)

Previously I had some issues with the packages while migrating between different Ubuntu versions and different python versions. As PyQt5 has dependencies where depending on python version it was looking for packages in different places, so since I had some issues before I just kept with the requirements that were working for me.
But this morning I tried setting up new environment and just installing these three packages listed above and it worked. Thanks again.

pip install odrive
pip install pyqtgraph
pip install pyqt5
2 Likes

Slider limits and step size should be per item. Every item has different limits, and the scale changes, so no sense in making it a global thing.

I agree. I meant global per item settings.
For example, if we connect multiple odrives or for different axis. For item ramp_up_distance, should the slider settings should be for each axis or global for all axis.

Ooh, that can be global for all axes I think.

A small update.

I prepared functions that generate windows. Functions get a button and properties gets a label, unless the parent of item is config then it gets appropriate spinbox or radiobutton accordingly if it’s a float or a bool etc.
There are still a bunch of exceptions needed like buttons to control machine states or that like firmware version is a single label instead of split between minor, major. etc

Tonight I am planning of making settings window, so when generating config items it would use values from settings.
Also, since retrieved values from the remote object are in a dictionary, they are not sorted so every single time the layout is random. Have to include some functions to reorganize the view.

2 Likes

Hello,
a small update.
I have setup settings window for various preferences, including slider settings etc. But since the app was all dynamic just managing how to store and transfer data between all the settings, and sliders and current values and finding object paths to write settings to the board, I had to rewrite some code so it took me a while.
Another thing was that it was generating sliders for all integers and all floats and obviously for motor modes or directions etc. we don’t need sliders so it I had to figure out where is the best way to filter out these conditions. So it’s taking me a while. But there is progress.
And now I am going for two week holiday, I was really hoping to have it functional before this time. But oh well :confused: I wasn’t allowed to bring odrive board with me.
Anyways, I am just noting that I have not forgotten about this project, there is work in progress and few delays.
Thanks!

3 Likes

Excellent! Will give it a try soon

One excellent point of comparison is vesc_tool for configuring VESC board.

I encourage you in particular to review its excellent motor confg wizard: a must have!

I can donate one odrive 3.2 for you to have fun during holidays if you’re willing to give such a wizard a try
(mmmm if it’s your wife/husband who forbid it, it may not be a good idea :smiley:)

2 Likes

Hi

Thank you this is great, I found one bug. It doesn’t allow me to set a negative speed for encoder index search speed, which is usually used in case you want to search for index in the opposite direction.

2 Likes

Thanks, previously spin boxes were set to have minimum value of 0.
Negative values were added. Let me know if all works out I am still away, can’t test it out.
Thanks

1 Like