-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
joints-axes branch not yet merged #48
Comments
Comment by mhaberler problems which will likely pop up:
|
Comment by luminize Would you want me to split these in separate issues? For keeping focus and make the work more manageable?
|
Comment by mhaberler well it's roughly as I remember them; I'm not sure all of them are still present and relevant |
Comment by mhaberler I've learned some more parts are in the queue, and they relate to this issue:
so we need to decide which code and in which order, and in which relation to jaX (micges suggests: first jaX, then tp mods) both projects suggest there be a method to runtime-load complex code pieces like a tp or kinematics, and multiple instances of those if possible; this suggests HAL support for a new kind of object (basically classes which are instantiable, but not components proper, and export a function switch table similar to the c++ vtable or the kernel's device switch; I am looking into that now |
Comment by mhaberler Michal has suggested that - either way - we first make tp a loadable module in my never-ending quest for grandiose coding, I'm working on support for loading code which can be instantiated more than once like a class, and added HAL support to it (called HAL classes and vtables); some notes on the idea: issue:
approach:
using code (e.g. motion loading a tp or kins) would call hal_reference_class(name, version, **vtable) and return the class id and set vtable pointer; also increase the refcount there'd be a matching hal_unreference_class(class_id) to drop the refcount; zero refcount permits unloading the class on rtapi_app_exit plus some basic halcmd support to view the new objects in a sensible context once using code has a handle on the switch struct, it would be able to reference say tp API functions by handle->tpFuncX(params..) just like the rtapi_switch does the whole thing is pretty much a C++ vtable in C, with HAL loading draped around it; the intent is to have those modules instatiable right through the switch struct as designed (other than the hokey halcomps with their confused instance idea) use case would be RT, but with a minor twist such classes could be loaded into a userland component as well (it would be private to the userland comp, and not callable from RT, also the other way around using code needs adapting from calling (params) to handle->(params); for tp that's some 30-40 refs or so, and for kins maybe 2, so much less than the RTAPI migration behind us halcmd would list class names, comment string, version, refcount, RT (not sure if userland loaded classes should be registered in HAL since they'd be strictly process-local so no reuse or reference possible anyway) note a HAL class does exactly nothing unless called through the switch struct, which includes instantiation; I'm not promising this be a way to migrate to instantiable comps but it's very close to this idea - separate instantiation from loading - besides exporting any kind of API regardless of the load-time symbol resolution restrictions |
Comment by mhaberler this branch adds the HAL library, and halcmd support for vtables (I dropped the pathetic 'class' name for what is essentially a typed, named, refcounted pointer intended for level 0 class support). Example included: https://github.com/mhaberler/machinekit/commits/hal-vtable-support Next step are:
(kins first since simpler API) |
Comment by mhaberler step 1 done - changed trivkins to vtable API: mhaberler/machinekit@51a2de3 changed motion to use it: mhaberler/machinekit@41db5a5 that looks like a pretty simple migration. TP next.. |
Comment by mhaberler status: halfway through disentangling emcmotstatus and emcmotconfig globals access in tp so the tp code can be compiled without referencing those structures realistically I can get to it only 3rd week of Feb |
Comment by mhaberler this is where I'm at in state sharing between tp and using code; it seems unraveling the emcmotstatus and emcmotconfig globals access into what could be HAL pins is the most sensible thing to do; they dont have to, but they could be pins one would pass such an all-pointers-initialized tp_shared struct to tpInit(), and TP_STRUCT would hold a pointer to it: */ access can be wrapped as static inlines like so: static inline int get_num_dio(TP_STRUCT *tp) { return *(tp->shared->num_dio); } not sure I like it yet.. comments? // this holds all shared data between using code and the tp struct tp_shared {
}; |
Comment by mhaberler joint vel/acc limiting with non-trivkins is an issue in the current planner I had a chat with Michal this morning and he had an interesting idea which might simplify things significantly. Current ideas were so far focused on joint vel/acc limiting in the motion/tp complex. But it might be easier to prevent moves which exceed joint limits actually hitting tp/motion. One way this could be done is:
as usual feed override gets in the way, but one way to deal with that is to worst-case joint-plan in canon using MAX_FEED_OVERRIDE so moves would still be within joint limits if f/o is cranked up to the maximum one aspect which gets in the way a bit is the fact that many kins modules use HAL for configuration, meaning any kins must run on a HAL/RT host if left unchanged |
Comment by cdsteinkuehler I like the idea, and I've been hitting issues with the joint vs. axis http://conceptforge.org/images/Wally.jpg ...which makes the delta-printer kinematics seem simple by comparison. Also, since adding this would probably touch the world vs. joint motion Charles Steinkuehler |
Comment by mhaberler that sounds like a wonderful vtable application to me - a comp which exports a function, gets a pose (or two to test a line), and returns bool motion could use that function NB there's another limit check in tastk, needs investigating if both need to be replaced |
Comment by yishinli Merge LCNC.joint_axes9 with MK.master to MK.joints_axes9. Current work:
Open issues:
|
Comment by yishinli I got the following error messages while launching Machineface with joints_axes9:
Is this because the EmcStatusMotionAxis of status.proto needs to be revised for joints_axes9? -Yishin |
Comment by mhaberler @yishinli - there is a serious issue with this branch - this is a merge of all of linuxcnc into machinekit you need to isolate the parts which are needed and merge or cherry pick just those which are relevant to the issue - just merging doesnt cut it there should be code being merged outside motion, any support in task, and possibly UI's and related code |
Comment by yishinli @mhaberler - please give a guide about what should be done for merging joints_axes9 - I'm willing to follow your instructions, and restart the merging process.
The git commands I used were:
|
Comment by mhaberler @yishinli if this is already merged into linuxcnc mainline and bugs are being worked out then I'd say yes; if it is still out on a limb like it has been for several years now the answer might be "no" - not sure what the status is, I still need to look the branch you pointed to suggests "still diverged": This branch is 212 commits ahead, 137 commits behind master. (212 commits is a lot of code out on a branch - which means we could be importing a huge maintenance problem if we did. We better get Michal Geskiewicz's opinion on the case to be sure. the changes are not just motion but all the way to conversion of config files, so that is major breakage (!) and needs handholding and testing one open problem was jogging, dont know where that stands now assuming the answer is yes - just merging that branch is not an option because it merges all the other changes in linuxcnc since we forked, which is not what we want what you'd do is to isolate the relevant sequence of commits (first guess - the 212 commits mentioned above, which is a sequence commits expressed like sha1..sha2) you'd review that sequence and make sure they only apply to joints_axes functionality in principle you have two options now: you could
the first is easier (just one time resolution of conflicts) but you'd loose the history which is bad (but worth it for a quick first stab if things work out) the second is more work but recommended as debugging /review lateron is easier; I would assume a significant number of these cherry-picks would fail due to a diverged code base, and need manual resolution. |
Comment by micges Hello, It's not possible to just merge linuxcnc jax branch to mk, linuxcnc is too far diverged. Jax is qick'n'dirty branch that's why lcnc still didn't merge it to master even that they worked alltogether on it. |
Comment by micges You can make small steps like it was done to make ja3 to work.
|
Comment by yishinli Assume joints_axes9 is NOT a ready branch for a merge. |
Comment by mhaberler @yishinli yes, unfortunately I have to agree happy to discuss in more detail tomorrow say on skype, just a few ideas & notes here:
we might not be all that far away from tying machinekit into the very vivid world of ROS ! |
Comment by saeugetier @mhaberler any progress here? |
Comment by saeugetier I saw that there is some progress on the topic. See issue machinekit/machinekit#689 |
Comment by ArcEye @saeugetier This issue is 17 months old and the one you say has some progress is 14 months old. Linuxcnc are still having issues with the joints/axes code and unless someone with a particular need/interest in it steps up to the plate and offers to do the work to adapt and merge it, seems unlikely any time soon . |
Comment by luminize
@saeugetier that's an issue on ROS and Machinekit and is not related to this issue. |
Comment by saeugetier @ArcEye The issue is open for a while. I just want to know if there are any news which have not been posted here. @luminize the last post from @mhaberler was about ROS. So I thought that this topic is related to ROS. |
Comment by luminize
Well, partly :) ROS off-line planning already takes care of these joint constrains when calculating the trajectory (and it does not violate these). The trajectory is not calculated in realtime |
Issue by mhaberler
Wed Jan 14 23:56:29 2015
Originally opened as machinekit/machinekit#438
current code (mostly motion and jogging-related upper layers) has some fundamental confusion about axes versus joints. Cleaning this up is an important prerequisite for supporting non-trivial kinematics better, and also to clean up dark corners like jogging.
There has been work ongoing for several years mostly by Michal Geskiewicz to remedy this, it's in branches termed 'joints-axes' or 'jaX' both in git.linuxcnc.org and my own machinekit fork on github (possibly others too). The code is mostly in place, but bits and pieces are missing.
Of the options - have those branches linger around on end, or go for an accelerated merge with a likely bumpy period thereafter, I think the second option is the better (and motivation for fixes will be higher).
A likely base branch could be this: https://github.com/mhaberler/machinekit/tree/ja6-candidate-1 which rebases the git.linuxcnc.org ja6 branch onto machinekit while keeping the jog-while-paused feature working
The text was updated successfully, but these errors were encountered: