-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
improvements of simulated_home.hal #2236
Open
piflixe
wants to merge
1
commit into
LinuxCNC:master
Choose a base branch
from
piflixe:simulated_home-improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ability and added examples at both ends of the axis
[Felix Piela]
added comments, improved syntax for better readability and added
examples at both ends of the axis.
This change seem to have broken a test:
Running test: /home/runner/work/linuxcnc/linuxcnc/tests/lathe
*** /home/runner/work/linuxcnc/linuxcnc/tests/lathe: XFAIL: test run exited with 1
************** result:
Machine configuration file is 'lathe.ini'
check_config:
Unspecified [JOINT_1]MAX_VELOCITY, default used: 1.0
Unspecified [JOINT_1]MAX_ACCELERATION, default used: 1.0
Starting LinuxCNC...
emc/iotask/ioControl.cc 786: can't load tool table.
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(LIB): /home/runner/work/linuxcnc/linuxcnc/lib/hallib/core_sim.hal
Found file(LIB): /home/runner/work/linuxcnc/linuxcnc/lib/hallib/simulated_home.hal
Found file(LIB): /home/runner/work/linuxcnc/linuxcnc/lib/hallib/lathe.hal
task: machine: 'unknown' version 'unknown'
emcTaskOnce: Python plugin configured
emcTaskOnce: extract(task_instance): KeyError: 'task'
emcTaskOnce: no Python Task() instance available, using default iocontrol-based task methods
emcTrajSetJoints(3) returned 0
emcTrajSetSpindles(1) returned 0
emcTrajSetAxes(3, 5)
emcTrajSetUnits(0.0394, 1.0000)
emcTrajSetVelocity(0.0000, 1.2000) returned 0
emcTrajSetMaxVelocity(4.0000) returned 0
emcTrajSetAcceleration(1e+99) returned 0
emcTrajSetMaxAcceleration(1e+99)
emcTrajSetHome(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) returned 0
emcJointSetType(0, 1)
emcJointSetUnits(0, 0.0394)
emcJointSetBacklash(0, 0.0000) returned 0
emcJointSetMinPositionLimit(0, -10) returned 0
emcJointSetMaxPositionLimit(0, 10) returned 0
emcJointSetFerror(0, 0.0500) returned 0
emcJointSetMinFerror(0, 0.0100) returned 0
emcJointSetHomingParams(0, 0.0000, 1.0000, -1.0000, 5.0000, 1.0000, 0, 0, 1, 0, 0) returned 0
emcJointSetMaxVelocity(0, 3.3333) returned 0
emcJointSetMaxAcceleration(0, 20) returned 0
emcJointActivate(0) returned 0
emcJointSetType(1, 1)
emcJointSetUnits(1, 0.0394)
emcJointSetBacklash(1, 0.0000) returned 0
emcJointSetMinPositionLimit(1, -1e+99) returned 0
emcJointSetMaxPositionLimit(1, 1e+99) returned 0
emcJointSetFerror(1, 1.0000) returned 0
emcJointSetMinFerror(1, 1.0000) returned 0
emcJointSetHomingParams(1, 0.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0, 0, 0, 0, 0) returned 0
emcJointSetMaxVelocity(1, 1.0000) returned 0
emcJointSetMaxAcceleration(1, 1) returned 0
emcJointActivate(1) returned 0
emcJointSetType(2, 1)
emcJointSetUnits(2, 0.0394)
emcJointSetBacklash(2, 0.0000) returned 0
emcJointSetMinPositionLimit(2, -2) returned 0
emcJointSetMaxPositionLimit(2, 4) returned 0
emcJointSetFerror(2, 0.0500) returned 0
emcJointSetMinFerror(2, 0.0100) returned 0
emcJointSetHomingParams(2, 0.0000, 1.0000, -1.0000, 5.0000, 1.0000, 0, 0, 1, 1, 0) returned 0
emcJointSetMaxVelocity(2, 3.3333) returned 0
emcJointSetMaxAcceleration(2, 20) returned 0
emcJointActivate(2) returned 0
emcAxisSetMinPositionLimit(0, -10.0000) returned 0
emcAxisSetMaxPositionLimit(0, 10.0000) returned 0
emcAxisSetMaxVelocity(0, 3.3333) returned 0
emcAxisSetMaxAcceleration(0, 20.0000) returned 0
emcAxisSetLockingJoint(0, -1) returned 0
emcAxisSetMinPositionLimit(2, -2.0000) returned 0
emcAxisSetMaxPositionLimit(2, 4.0000) returned 0
emcAxisSetMaxVelocity(2, 3.3333) returned 0
emcAxisSetMaxAcceleration(2, 20.0000) returned 0
emcAxisSetLockingJoint(2, -1) returned 0
emcSpindleSetParams(0, 1.000000e+99, 0.000000e+00, 0.000000e+00, -1.000000e+99, 0.000000, 0.000000, 0, 100.000000) returned 0
NML_INTERP_LIST(0x55bde2a939e0)::append(nml_msg_ptr{size=112,type=EMC_TRAJ_SET_TERM_COND}) : list_size=1, line_number=0
NML_INTERP_LIST(0x55bde2a939e0)::append(nml_msg_ptr{size=176,type=EMC_TRAJ_SET_G5X}) : list_size=2, line_number=0
NML_INTERP_LIST(0x55bde2a939e0)::append(nml_msg_ptr{size=168,type=EMC_TRAJ_SET_G92}) : list_size=3, line_number=0
NML_INTERP_LIST(0x55bde2a939e0)::append(nml_msg_ptr{size=104,type=EMC_TRAJ_SET_ROTATION}) : list_size=4, line_number=0
emcTaskPlanInit() returned 0
Issuing EMC_TASK_SET_STATE -- ( +505,+24, +1, +2,)
NML_INTERP_LIST(0x55bde2a939e0)::clear(): discarding 4 items
NML_INTERP_LIST(0x55bde2a939e0)::append(nml_msg_ptr{size=24,type=EMC_TASK_PLAN_SYNCH}) : list_size=1, line_number=0
emcTaskPlanSynch() returned 0
NML_INTERP_LIST(0x55bde2a939e0)::get(): {size=24, type=EMC_TASK_PLAN_SYNCH}, list_size=0
emcTaskPlanLevel() returned 0
task: main loop took 0.120343 seconds
Issuing EMC_TASK_SET_STATE -- ( +505,+24, +2, +4,)
task: main loop took 0.068063 seconds
Issuing EMC_TASK_SET_MODE -- ( +504,+24, +3, +1,)
Issuing EMC_JOINT_HOME -- ( +123,+24, +4, -1,)
Cannot home while shared home switch is closed j=0
Issuing EMC_TASK_PLAN_SYNCH -- ( +516,+24, +0,)
emcTaskPlanSynch() returned 0
j2 end of move in home state 7
Shutting down and cleaning up LinuxCNC...
task: 9743 cycles, min=0.000010, max=0.068063, avg=0.001079, 2 latency excursions (> 10x expected cycle time of 0.001000s)
LinuxCNC terminated with an error. You can find more information in the log:
/home/runner/linuxcnc_debug.txt
and
/home/runner/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
Running test: /home/runner/work/linuxcnc/linuxcnc/tests/limit3/constraints
************** stderr:
+ exec linuxcnc -r lathe.ini
(time=1672654785.482291,pid=40236): Registering server on TCP port 5005.
(time=1672654785.482417,pid=40236): running server for TCP port 5005 (connection_socket = 3).
Note: Using POSIX non-realtime
link (updating variable file): No such file or directory
Cannot home while shared home switch is closed j=0j2 end of move in home state 7Traceback (most recent call last):
File "./test-ui.py", line 34, in <module>
l.wait_for_home(joints=[1,0,1,0,0,0,0,0,0])
File "/home/runner/work/linuxcnc/linuxcnc/lib/python/linuxcnc_util.py", line 102, in wait_for_home
raise LinuxCNC_Exception("timeout waiting for homing to complete:\nstatus.homed:" + str(self.status.homed) + "\nstatus.position:" + str(self.status.position))
linuxcnc_util.LinuxCNC_Exception: timeout waiting for homing to complete:
status.homed:(0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
status.position:(0.0, 0.0, 11.999999999961158, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
(time=1672654796.283061,pid=40236): Deleting 5 channels from the NML_Main_Channel_List.
(time=1672654796.283082,pid=40236): Deleting emcCommand NML channel from NML_Main_Channel_List.
(time=1672654796.283088,pid=40236): deleting NML (1)
(time=1672654796.283094,pid=40236): delete (CMS *) 0x55c1460e6330;
(time=1672654796.283106,pid=40236): rcs_shm_close(shm->key=1001(0x3E9),shm->size=8192(0x2000),shm->addr=0x7fcc164f1000)
(time=1672654796.283122,pid=40236): deleting CMS (emcCommand)
(time=1672654796.283130,pid=40236): free( data = 0x55c1460e7060);
(time=1672654796.283136,pid=40236): Leaving ~CMS()
(time=1672654796.283142,pid=40236): CMS::delete(0x55c1460e6330)
(time=1672654796.283148,pid=40236): CMS::delete successful.
(time=1672654796.283153,pid=40236): Leaving ~NML()
(time=1672654796.283158,pid=40236): NML channel deleted from NML_Main_Channel_List
(time=1672654796.283163,pid=40236): Deleting emcStatus NML channel from NML_Main_Channel_List.
(time=1672654796.283169,pid=40236): deleting NML (2)
(time=1672654796.283174,pid=40236): delete (CMS *) 0x55c1460ec540;
(time=1672654796.283180,pid=40236): rcs_shm_close(shm->key=1002(0x3EA),shm->size=20480(0x5000),shm->addr=0x7fcc164ec000)
(time=1672654796.283189,pid=40236): deleting CMS (emcStatus)
(time=1672654796.283195,pid=40236): free( data = 0x55c1460ed250);
(time=1672654796.283200,pid=40236): Leaving ~CMS()
(time=1672654796.283205,pid=40236): CMS::delete(0x55c1460ec540)
(time=1672654796.283211,pid=40236): CMS::delete successful.
(time=1672654796.283216,pid=40236): Leaving ~NML()
(time=1672654796.283221,pid=40236): NML channel deleted from NML_Main_Channel_List
(time=1672654796.283226,pid=40236): Deleting emcError NML channel from NML_Main_Channel_List.
(time=1672654796.283231,pid=40236): deleting NML (3)
(time=1672654796.283236,pid=40236): delete (CMS *) 0x55c1460f2930;
(time=1672654796.283243,pid=40236): rcs_shm_close(shm->key=1003(0x3EB),shm->size=8192(0x2000),shm->addr=0x7fcc164ea000)
(time=1672654796.283251,pid=40236): deleting CMS (emcError)
(time=1672654796.283257,pid=40236): free( data = 0x55c1460f3650);
(time=1672654796.283262,pid=40236): Leaving ~CMS()
(time=1672654796.283267,pid=40236): CMS::delete(0x55c1460f2930)
(time=1672654796.283272,pid=40236): CMS::delete successful.
(time=1672654796.283278,pid=40236): Leaving ~NML()
(time=1672654796.283283,pid=40236): NML channel deleted from NML_Main_Channel_List
(time=1672654796.283288,pid=40236): Deleting toolCmd NML channel from NML_Main_Channel_List.
(time=1672654796.283293,pid=40236): deleting NML (4)
(time=1672654796.283298,pid=40236): delete (CMS *) 0x55c1460f5d20;
(time=1672654796.283305,pid=40236): rcs_shm_close(shm->key=1004(0x3EC),shm->size=1024(0x400),shm->addr=0x7fcc16521000)
(time=1672654796.283313,pid=40236): deleting CMS (toolCmd)
(time=1672654796.283319,pid=40236): free( data = 0x55c1460f69c0);
(time=1672654796.283324,pid=40236): Leaving ~CMS()
(time=1672654796.283329,pid=40236): CMS::delete(0x55c1460f5d20)
(time=1672654796.283334,pid=40236): CMS::delete successful.
(time=1672654796.283340,pid=40236): Leaving ~NML()
(time=1672654796.283345,pid=40236): NML channel deleted from NML_Main_Channel_List
(time=1672654796.283359,pid=40236): Deleting toolSts NML channel from NML_Main_Channel_List.
(time=1672654796.283364,pid=40236): deleting NML (5)
(time=1672654796.283369,pid=40236): delete (CMS *) 0x55c1460f7440;
(time=1672654796.283375,pid=40236): rcs_shm_close(shm->key=1005(0x3ED),shm->size=1024(0x400),shm->addr=0x7fcc164e9000)
(time=1672654796.283384,pid=40236): deleting CMS (toolSts)
(time=1672654796.283390,pid=40236): free( data = 0x55c1460f80e0);
(time=1672654796.283395,pid=40236): Leaving ~CMS()
(time=1672654796.283400,pid=40236): CMS::delete(0x55c1460f7440)
(time=1672654796.283415,pid=40236): CMS::delete successful.
(time=1672654796.283420,pid=40236): Leaving ~NML()
(time=1672654796.283425,pid=40236): NML channel deleted from NML_Main_Channel_List
(time=1672654796.283432,pid=40236): deleting NML (1)
(time=1672654796.283437,pid=40236): Leaving ~NML()
(time=1672654796.283442,pid=40236): NML::operator delete(0x55c1460e60c0)
(time=1672654796.283448,pid=40236): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1672654796.283454,pid=40236): deleting NML (2)
(time=1672654796.283459,pid=40236): Leaving ~NML()
(time=1672654796.283464,pid=40236): NML::operator delete(0x55c1460ec370)
(time=1672654796.283469,pid=40236): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1672654796.283475,pid=40236): deleting NML (3)
(time=1672654796.283480,pid=40236): Leaving ~NML()
(time=1672654796.283485,pid=40236): NML::operator delete(0x55c1460f2700)
(time=1672654796.283490,pid=40236): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1672654796.283495,pid=40236): deleting NML (4)
(time=1672654796.283500,pid=40236): Leaving ~NML()
(time=1672654796.283505,pid=40236): NML::operator delete(0x55c1460f5b50)
(time=1672654796.283511,pid=40236): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1672654796.283516,pid=40236): deleting NML (5)
(time=1672654796.283521,pid=40236): Leaving ~NML()
(time=1672654796.283526,pid=40236): NML::operator delete(0x55c1460f7270)
(time=1672654796.283531,pid=40236): NML channel deleted from Dynamically_Allocated_NML_Objects
Note: Using POSIX non-realtime
**************
…--
Happy hacking
Petter Reinholdtsen
|
I had a look at this patch, trying to figure out why the test fail,
without success so far.
But I did notice something that surprised me. The description talk of
improved syntax, but seem to contain a material change of the x, y and z
end switch location from 1, 0.5 and 2 to 1, 0 and 190. Why this change?
I tried reverting the change to see if it would fix the test, but alas.
I do not understand why the homing time out during the lathe test. Do
you?
…--
Happy hacking
Petter Reinholdtsen
|
@piflixe, do you have any input on the test failure here? |
stuttgart meeting says we need to figure out why the tests fail. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
added comments, improved syntax for better readability and added examples at both ends of the axis.
This wasn't my idea but rather based on help I received in the linuxcnc forum: https://www.forum.linuxcnc.org/49-basic-configuration/47371-best-practice-for-creating-a-digital-twin-simulation-version-of-a-real-machi