Removed optimization bug that was causing large overshoots and
some acceleration spikes.
Remaining issues:
* infinity norm is used to calculate limiting acceleration for a given TC.
The trajectory planner needs to know machine limits if it is to
compensate.
* Occasional segfault appears on load after a clean shutdown. No issues
while running so far.
Parabolic blending was crashing out due to an improper estimate of being
on the final deceleration. The final decel calculation assumed that we
were on the final deceleration if the ideal new velocity was close to
what we could actually reach based on machine limits. This should only
be true when we are decelerating to a stop.
TODO: what exactly changed that made this assumption not work anymore?
Works with simple rapid test, because we're not falling back to
parabolic blends. Something is still wrong with the refactored parabolic
blends, though. Next step is to force a failure every time. We should be
able to fall back, but currently that may not be working.
Faster update frequency does improve blend performance as expected,
since the effective sampling rate of the trajectory is increased.
Unfortunately, this configuration has uncovered another issue. There is
a divide-by-zero happening rarely, but the random walk G-code reveals
it. It's likely due to very small line segments being created during
some of the blends.
TODO: add a check to the arc blend that bounds the blend arc size based
on requested velocity, acceleration, length, and cycle time.
more appropriate directories:
configs/sim/axis/iocontrolv2
configs/sim/axis/spindle_orient
configs/sim/axis/orphans
There may still be problems with some files in the reorganized
configs/sim tree, but comparing to a commit that predates the
rearrangement the problems may have pre-existed.
configs/sim/axis/iocontrolv2
-----------------|------------------------------|------------------------------|
ini_file |master_with_this_patch |commit_before_configs_reorg |
| |(1c688d on 4dec2013) |
-----------------|------------------------------|------------------------------|
m66track.ini |runs both (shortened) |fails after first loop in |
|loops in t3.ngc |t3.ngc too few tools for loop |
|using [EMCIO]EMCIO = iov2 | |
-----------------|------------------------------|------------------------------|
g8812.ini |toolchange without |toolchange needs intervention |
|intervention for | |
|iocontrol.0.start-change-ack | |
|using [EMCIO]EMCIO = iov2 | |
-----------------|------------------------------|------------------------------|
axis-iocontrolv2 |runs as before |main running demo |
-demo.ini | | |
-----------------|------------------------------|------------------------------|
owordm6-ui.ini |runs but may be damaged |fails to run: missing pin: |
|since removed postgui_halfile | gladevcp.fail-next-op |
|using [EMCIO]EMCIO = iov2 | |
-----------------|------------------------------|------------------------------|
owordm6-ui-ns.ini|runs |runs, intervention needed |
|using [EMCIO]EMCIO = iov2 | |
-----------------|------------------------------|------------------------------|
Notes:
1) using: [EMCIO]EMCIO = iov2
lets ini work from pickconfig without user intervention for the pin
iocontrol.0.start-change-ack
added a note in README so user can learn how to modify
configs/sim/axis/spindle_orient
-----------------|------------------------------|------------------------------|
ini_file |master_with_this_patch |commit_before_configs_reorg |
| |(1c688d on 4dec2013) |
-----------------|------------------------------|------------------------------|
orient.ini |seems to work |seems to work |
-----------------|------------------------------|------------------------------|
These are problematic -- they havent worked for a long time:
configs/sim/axis/orphans
-----------------|------------------------------|------------------------------|
ini_file |master_with_this_patch |commit_before_configs_reorg |
| |(1c688d on 4dec2013) |
-----------------|------------------------------|------------------------------|
py.ini | not working (did it ever?) |fails: core_sim_test.hal:46: |
renamed: | | 'iocontrol.0.user-enable-out'|
py.ini.notworking| | does not exist |
-----------------|------------------------------|------------------------------|
pyiocontrol.ini | not working (did it ever?) |fails: core_sim_test.hal:46: |
renamed: | | 'iocontrol.0.user-enable-out'|
pyiocontrol.ini. | | does not exist |
notworking | | |
-----------------|------------------------------|------------------------------|
axis_noio.ini | same behavior | runs after delay, in estop |
-----------------|------------------------------|------------------------------|
The subdir: configs/sim/axis/orphans/pysubs/ probably duplicates
files in other places and could be removed.
Possible duplicates (or redundancies):
configs/sim/axis/orphans/pysubs/customtask.py
configs/sim/axis/remap/iocontrol-removed/python/customtask.py
configs/sim/axis/orphans/pysubs/nulluserfuncs.py
configs/sim/axis/remap/iocontrol-removed/python/nulluserfuncs.py
configs/sim/axis/orphans/pysubs/oword.py
configs/sim/axis/remap/getting-started/python/oword.py
configs/sim/axis/remap/iocontrol-removed/python/oword.py
configs/sim/axis/orphans/pysubs/plugins.py
configs/sim/axis/orphans/pysubs/sqltoolaccess.py
configs/sim/axis/remap/iocontrol-removed/python/sqltoolaccess.py
configs/sim/axis/orphans/pysubs/task.py
configs/sim/axis/remap/iocontrol-removed/python/task.py
configs/sim/axis/orphans/pysubs/tooltable.py
configs/sim/axis/remap/iocontrol-removed/python/tooltable.py
configs/sim/axis/orphans/pysubs/userfuncs.py
configs/sim/axis/remap/iocontrol-removed/python/userfuncs.py
configs/sim/axis/orphans/pysubs/remap.py
many
Adapted from trochoidal.gcmc by Bertho Stultiens
Note: full advantage will come with future trajectory planning
as in the circular-blend-arc-rc3 branch
loadtool.ngc is a nc_files/ngcgui_lib/utilitysubs/ helper subroutine
for use with ngcgui_lib demonstration subroutines.
Add options for subroutine invocation:
#<use_g43>
#<h_for_g43>
#<verbose>
to allow user to control behavior.
Also, allow toolno==0
Minor: use shorthand names for some call parameters since line length
limit is exceeded with additional items used.
new: involute-gear.gcmc adapted for ngcgui from B. Stultien's example
new: ensure_mode.gcmd include file to resolve potential conflict
with preamble and gcmc code (gcmc wins)
with updates:
1) popup msg error if entry box for gcmc not a number
2) allow comment after tag when tagging a gcmc option
3) handle gcmc_include_path for new custom tab additions
4) incorporate ensure_mode in .gcmc examples
5) update ngcgui.txt for ensure_mode
(squashed commits from test branch: dgarr/ngcgui-gcmc)
Add support for [py]ngcgui to read .gcmc input files for the gcmc
compiler and make tab pages with entry boxes for tagged variables.
A tabpage 'info' message and compiler options can be specified
by tags too.
Ref: gcmc (G-Code Meta Compiler) http://www.vagrearg.org/content/gcmc
Note: gcmc version 1.4.3 or later must be installed separately and
available in the user PATH
--------------------------------------------------------------------
Tag formats (simplified):
Variable:
//ngcgui: vname [= value , [comment text]]
Info message:
//ngcgui: info: text message
Option:
//ngcgui: -optioname [optionvalue]
--------------------------------------------------------------------
When a feature for a gcmc tab page is created, the variables
and options are passed to the compiler and a gcode subroutine
file is produced and placed at the head of the linuxcnc subroutine
search path. These files are purged at each ngcgui restart
that uses .gcmc files.
--------------------------------------------------------------------
Example ini files for axis, touchy, and gscreen:
configs/sim/axis/ngcgui/ngcgui_gcmc.ini
configs/sim/axis/ngcgui/pyngcgui_gcmc.ini
configs/sim/touchy/ngcgui/pyngcgui_touchy_gcmc.ini
configs/sim/gscreen/ngcgui/pyngcgui_gscreen_gcmc.ini
Example gcmc files:
nc_files/gcmc_lib/drill.gcmc
nc_files/gcmc_lib/square.gcmc
nc_files/gcmc_lib/star.gcmc (Bertho Stultiens)
nc_files/gcmc_lib/wheels.gcmc (Alan Battersby)
Move one-time-usage files:
root/nc_files/foam.ngc,t3.ngc,taskcall.ngc,toolchange-demo.ngc
to the specific config local dir to support working with a deb install (and
reduce clutter by moving non-generic files from root/nc_files)
(note: deb installs:
( cp root/nc_files/* /usr/share/linuxcnc/ncfiles/
( and pickconfig creates a link:
( ~/linuxcnc/nc_files/examples --> /usr/shre/linuxcnc/ncfiles
(so configs that names that work in RIP by referring to nc_files/ by a relative
(symlink will not have the same name in a deb install. The _lib
(directories are accesible by identical relative links.
General config dir and ini updates:
specify local files with OPEN_FILE for one-time-usage cases
replace bogus OPEN_FILE specifiers (null.ngc, ~user/, etc) with ""
chmod 644 hal,tbl,ini files
Create nc_files/orphans directory to isolate abandoned and superseded .ngc
files after rearrangement (root/nc_files/on_abort.ngc)
----------------------------------------------------------------------------
Specific config dir updates:
sim/gscreen
changes to make ini files start:
remove test_postgui.hal and comment-out ini reference
remove some unused files
sim/touchy/gladevcp
use symlink for simpockets.tbl
sim/axis/python_demo/*.ini
edit ini [EMC]MACHINE for more info in titlebar labeling
add missing sim_mm_test.hal link
fix SUBROUTINE_PATH to find on_abort in remap_lib
mv orient.README to orient.txt for display in picker
sim/axis/remap/*
edit ini [EMC]MACHINE for more info in titlebar labeling
fix SUBROUTINE_PATH to find on_abort in remap_lib
add missing symlinks for halfiles and amend ini for local
allow support of remap examples in deb install
create:
nc_files/common_nc_subs
nc_files/python-stdglue
and relocate directory contents from configs/sim/axis/remap/
ver 0.9.7.1
- changed the structure of the files, so the user do not
need to copy files after an update, he only needs
to adapt his conig files.
this follows the new gscreen structure and
all files should be present after installing linuxcnc
- corrected some typos in code
- changed my way to show the entry dialog as integer only
to the gscreen way
- added a file chooser to select the jump to dir in
IconFileSelection
- file extensions are now taken from INI file and
converted from raw data to correct format in an
own function, taken in care in IconFileSelection and
file to load chooser
- solved an error in IconFileSelection, crashing the GUI
if button up was pressed being in the root dir
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
Python implementation of ngcgui functionality -- works with existing
ngcgui-compatible subroutines. File selector in gui gives improved
hints for compatibility. A numeric popup keyboard is available for
use with touchscreens. Included:
pyngcgui -- standalone application
PyNgcGui -- gladevcp widget
Also:
gremlin_view -- standalone application for gremlin with common buttons
HAL_GremlinPlus -- gladevcp widget
The gladevcp widgets can be embedded in guis like gscreen, touchy, gmoccapy
Example simulator ini files are provided for gscreen, touchy, gmoccapy
to show how to EMBED:
configs/sim/ngcgui/pyngcgui_gscreen.ini
configs/sim/ngcgui/pyngcgui_gscreen_popupkeyboard.ini
configs/sim/ngcgui/pyngcgui_touchy.ini
configs/sim/ngcgui/pyngcgui_touchy_lathe.ini
configs/sim/ngcgui/pyngcgui_axis.ini
configs/sim/gmoccapy/pyngcgui_gmoccapy.ini
configs/sim/gmoccapy/pyngcgui_gmoccapy_with_popupkeyboard.ini
g76base.ngc -- wrapper for g76
g76diam.ngc -- specify major,minor diameters calls g76base
To try to avoid problems with user changing lathe mode for
subsequent programs, invoke these behaviors:
For linuxcnc2.5.x, allow only G8 (radius mode)
For linuxcnc2.6+, restore lathe mode if altered using
introspection for #<_lathe_diameter_mode>
and #<_lathe_radius_mode>
The example for a triangular pocket -- a degenerate quadrilateral --
fails under some conditions of scaling and rotation due
to roundoff errors that lead to an illegal argument
for acos() (called by the dot product)
So, specify points so that no two lines are exactly colinear
Error for acos() was not observed on lucid/x86_64/sim
but noted on lucid/i386/sim and lucid/i386/rtai
use (AXIS,notify,msg) when input errors detected
helix.ngc: include spin_notify parameter
hole_circle.ngc: correct call args to helix
add parms for xctr,yctr
require circle diameter not radius
handle input spin_notify parmeter from caller
clarify parm name for hole diameter
helix_rtheta.ngc: handle input spin_notify parmeter from caller
parm name for hole diameter
qpocket.ngc -- gcode script
qpocket.png -- image for qpocket.ngc
qpex.ngc -- examples with builtin defaults
pointsdata.ngc -- helper, compute center, min, max, avg for n(<=8) points
modified ngcgui.ini -- removed simp.ngc since it is used in ngcgui_simp.ini