Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Post by manuelkrause »

kbwbe wrote: Tue Jul 31, 2018 7:43 pm ...
P.S.: Sorry, did not answer this post correctly.
If saving in transparent mode and close the file, it is saved as 'is' at this moment. After reloading, hit toggleTransparency again. All parts will become intransparent again.
No, that's why I've written. The parts stick at the 80% (button active/ inactive). Although all parts are at 0, themselves, and the assembly previous to saving was, too.
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Post by manuelkrause »

manuelkrause wrote: Tue Jul 31, 2018 8:00 pm
kbwbe wrote: Tue Jul 31, 2018 7:43 pm ...
P.S.: Sorry, did not answer this post correctly.
If saving in transparent mode and close the file, it is saved as 'is' at this moment. After reloading, hit toggleTransparency again. All parts will become intransparent again.
No, that's why I've written. The parts stick at the 80% (button active/ inactive). Although all parts are at 0, themselves, and the assembly previous to saving was, too.
Yes, I now see, that you may not be able to reproduce it. I've tested a bit more.
You need to close the FreeCAD completely to get this erratic behaviour. Restart it and load the .fcstd assembly previously saved in "transparent mode". I've unfortunately/ fortunately done so to test your recent improvements step by step, revision to revision. Meaning, exiting and restarting FreeCAD after each new devel-A2plus revision in place.

I really hope this gives a hint on where to search...
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Post by kbwbe »

Turro75 wrote: Tue Jul 31, 2018 6:10 pm @kbwbe

just downloaded latest devel branch, amazing job, You were able to reduce a lot the number of step needed to solve my assembly and it is really precise now.
Standard solving mode is now "partial system", if you do not change it in preference page of A2plus. It is much faster and precise, but cannot solve everything. (e.g. 6DOF-platform-example). But i think for many users this mode is ok. You can switch within WB to the solvermode "magnetic=all together", which needs more solving steps.
Turro75 wrote: Tue Jul 31, 2018 6:10 pm Since I expect the dof handling a little bit "invasive" against current code I'll keep that release as code base avoiding further sync.
Anyway I'll create a new file in order to keep as low as I can the impact on solversystem.py
I can open a new branch especially for your modifications. If you do PR's to this branch, i can review and help. If everything is working, we can merge. What do you think about this ?
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Post by kbwbe »

manuelkrause wrote: Tue Jul 31, 2018 8:25 pm Yes, I now see, that you may not be able to reproduce it. I've tested a bit more.
You need to close the FreeCAD completely to get this erratic behaviour. Restart it and load the .fcstd assembly previously saved in "transparent mode". I've unfortunately/ fortunately done so to test your recent improvements step by step, revision to revision. Meaning, exiting and restarting FreeCAD after each new devel-A2plus revision in place.

I really hope this gives a hint on where to search...
Please create an issue on github/kbwbe/a2plus, so that topic will not to be get lost. This thread is growing to fast...
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Turro75
Posts: 179
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Post by Turro75 »

kbwbe wrote: Tue Jul 31, 2018 9:21 pm
Turro75 wrote: Tue Jul 31, 2018 6:10 pm @kbwbe

just downloaded latest devel branch, amazing job, You were able to reduce a lot the number of step needed to solve my assembly and it is really precise now.
Standard solving mode is now "partial system", if you do not change it in preference page of A2plus. It is much faster and precise, but cannot solve everything. (e.g. 6DOF-platform-example). But i think for many users this mode is ok. You can switch within WB to the solvermode "magnetic=all together", which needs more solving steps.
Turro75 wrote: Tue Jul 31, 2018 6:10 pm Since I expect the dof handling a little bit "invasive" against current code I'll keep that release as code base avoiding further sync.
Anyway I'll create a new file in order to keep as low as I can the impact on solversystem.py
I can open a new branch especially for your modifications. If you do PR's to this branch, i can review and help. If everything is working, we can merge. What do you think about this ?
Ok
Turro75
Posts: 179
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Post by Turro75 »

@Kbwbe
@project4

Is there a way to check every x thousand steps if the solver is doing well and movement rotation are acctually reducing the gap to the target?
project4
Posts: 237
Joined: Fri Jul 12, 2013 12:53 pm

Re: Another approach to assembly solver (A2plus)

Post by project4 »

Turro75 wrote: Wed Aug 01, 2018 5:58 am @Kbwbe
@project4

Is there a way to check every x thousand steps if the solver is doing well and movement rotation are acctually reducing the gap to the target?
Good thinking!
That way the calculations could be stopped in case there is a problem with the solver logic...

It shouldn't be a problem. Just need to save previous errors and compare to the current ones.
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Post by kbwbe »

Turro75 wrote: Wed Aug 01, 2018 5:58 am @Kbwbe
@project4

Is there a way to check every x thousand steps if the solver is doing well and movement rotation are acctually reducing the gap to the target?
Hi Turro, project4
i will try to implement it this evening.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Turro75
Posts: 179
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Post by Turro75 »

kbwbe wrote: Wed Aug 01, 2018 6:25 am
Turro75 wrote: Wed Aug 01, 2018 5:58 am @Kbwbe
@project4

Is there a way to check every x thousand steps if the solver is doing well and movement rotation are acctually reducing the gap to the target?
Hi Turro, project4
i will try to implement it this evening.
Good! If it work we would also try to implement a progress bar and more important we would remove the limit on steps.
IMHO it is not a big problem taking a while on solving an assembly, but the solver should give a feedback on what's happening. Just to avoid a failure when 110k steps were needed with limit set to 100k.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Another approach to assembly solver (A2plus)

Post by Kunda1 »

Turro75 wrote: Wed Aug 01, 2018 11:41 am Good! If it work we would also try to implement a progress bar and more important we would remove the limit on steps.
IMHO it is not a big problem taking a while on solving an assembly, but the solver should give a feedback on what's happening. Just to avoid a failure when 110k steps were needed with limit set to 100k.
Progress bar would be a nice feature in general for FC. There are a few tickets open requesting it:
issue #1176 and issue #2571
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply