Hi, I did some work on jerk-limited jogging a while ago, but it turned out that even if one has got a jerk-limiting jog planner, replacing the simple_tp planner in motmod is not so easy: its internal state is touched everywhere. User rmu on the LinuxCNC forum fittingly called it a "bowl of spaghetti, pluck a noodle and everything moves" - and I have to agree.
So I've started working on making this better, and I have a first patch series now that I'd like comments on. https://github.com/arvidbrodin/linuxcnc/tree/motmod-refactoring There are three patches: 1) Whitespace fixes in emc/motion/ & emc/tp/tp.c (remove trailing whitespace). 2) Remove STRUCTS_IN_SHMEM so that joint and axis internal data is not kept in shared mem. This flag was supposedly added to aid debugging but it was left on indefinitely which was then "abused" by the trajectory planner (tp). 3) Move machine axis-related (not Axis the GUI!) data structures and code into its own source file emc/motion/axis.c to greatly reduce the scope of emcmot_axis_t and axis_hal_t. The code seems to build on both uspace and rtai (i.e. my rtai kernel is detected by './configure --with-realtime=uspace' and the following 'make' is successful), and passes runtests (under uspace). (The startup-state test found a major bug for me, so thanks to whoever wrote that test!) Other than that I've done basic testing: started LinuxCNC/Axis, jogged a joint, homed, jogged an axis and ran some MDI commands. NOTE: I could use some advice about what to do with motion-logger non-uspace builds. motion-logger now needs to be linked to axis.o, which in turn requires -lm. No problem with uspace builds, but how is this done with rtai? For now, motion-logger builds only in uspace. If this patch is received well, my intention is to do the same thing with joint-related data (i.e. move data and code to a joint.c file). This will be harder since joints are more complex, with homing and all. The next step is then to make the details of simple_tp_t private so that a new planner can be dropped into place without too much trouble. So please review, test, and let me know if I should create a pull request. Thanks! _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers