work area doesn't recognize alt corexy kinematics

More
09 Jun 2015 16:44 #59646 by poofjunior
Hi everyone,

I just got started with LinuxCNC and wrote a kinematics module to control an old CoreXY frame I built a while back.

The new kinematics, corexykins.c, appears to be working in that the tool end effector moves +/- X and +/-Y in world space, rather than diagonally, when I hit the jog keys. The issue I'm having is that the red grid doesn't adequately represent the workarea of the machine.

My gantry workarea is a square at about 17" by 17". If I set 0,0 in the lower left corner, then joint[0]'s range is 0 to 34 and joint[1]'s range is -17 to 17. This is because the joints end up being propagated through the motion model to show their true limits, where the inverse kinematics are:

joint_0 = (delta_x + delta_y)/2
joint_1 = (delta_x - delta_y)/2

When I plug in the range for joint[0] as 0 to 34 and joint[1] as -17 to 17, though, I get a square that's four times larger than the actual workarea of the gantry. It's a red square with the lower left corner at (0,-17) and upper right corner at (34,17).

I'd like to see a red square to display the soft limits with the origin (0, 0) at the bottom left corner and (17, 17) at the upper right corner (in world coordinates). Is there any way to directly write in the work area?

Thanks!

If anyone's interested, here's the corexy equations of motion

Please Log in or Create an account to join the conversation.

More
12 Jun 2015 03:36 #59726 by andypugh
You probably need to use the joints_axes6 branch of LinuxCNC which has separate limits for axes and joints.
The following user(s) said Thank You: poofjunior

Please Log in or Create an account to join the conversation.

More
12 Jun 2015 14:13 - 12 Jun 2015 14:17 #59740 by poofjunior
Thanks andypugh; compiling and using that branch did the trick. I now have a the right size workarea with the right software limits after editting the files as described in the JointAxesBranch Wiki page .

I'm getting one remaining issue as a result of running linuxcnc from that branch.

I can run linuxcnc once just fine with the new kinematics. If I close and re-open linuxcnc, I get:
Error: could not insert module /home/jvasquez/Projects/linuxcnc-mirror/rtlib/hal_parport.ko: Device or resource busy

I've tried the fix on the wiki by adding a linuxcnc.conf file as noted. Again, linuxcnc launches once successfully, but closing it and relaunching it throws the same error.

Could linuxcnc not be releasing the parport correctly?

Thanks again for the hand!
Last edit: 12 Jun 2015 14:17 by poofjunior. Reason: I wasn't finished adding in my URLs

Please Log in or Create an account to join the conversation.

More
12 Jun 2015 15:40 #59741 by andypugh

Thanks andypugh; compiling and using that branch did the trick. I now have a the right size workarea with the right software limits after editting the files as described in the JointAxesBranch Wiki page .


Did you not dry using the automatic conversion script?

f I close and re-open linuxcnc, I get:

Error: could not insert module /home/jvasquez/Projects/linuxcnc-mirror/rtlib/hal_parport.ko: Device or resource busy


lsmod might tell you useful things if you run it after linuxCNC has exited.
I don't think that is normal behaviour, however I am not using the parallel port on my machine so wouldn't have noticed.

I wonder if it is a permissions problem? If you are running run-in-place did the output of the "sudo make setuid" step show complete success?

Please Log in or Create an account to join the conversation.

More
12 Jun 2015 21:38 #59747 by poofjunior
I did run the automatic conversion script, though I had to make a few manual changes afterwards that linuxcnc prompted me with when it attempted to start with my configuration.

The output of sudo make setuid is
chown root ../bin/linuxcnc_module_helper
chmod 4750 ../bin/linuxcnc_module_helper
chown root ../bin/pci_write
chmod 4750 ../bin/pci_write
chown root ../bin/pci_read
chmod 4750 ../bin/pci_read

Before running linuxcnc, the output of lsmod is
Module                  Size  Used by
ppdev                  12591  0 
lp                     12767  0 
rfcomm                 36117  0 
bnep                   17186  2 
bluetooth             166348  10 bnep,rfcomm
uinput                 17057  1 
nfsd                  202675  2 
nfs                   277039  0 
nfs_acl                12464  2 nfs,nfsd
auth_rpcgss            32226  2 nfs,nfsd
fscache                35490  1 nfs
lockd                  56898  2 nfs,nfsd
sunrpc                151263  6 nfs,nfsd,auth_rpcgss,lockd,nfs_acl
loop                   21832  0 
hp_wmi                 13059  0 
sparse_keymap          12681  1 hp_wmi
rfkill                 18403  3 hp_wmi,bluetooth
snd_hda_codec_realtek    53766  1 
wmi                    17148  1 hp_wmi
evdev                  17099  18 
coretemp               12771  0 
snd_hda_intel          25789  1 
snd_hda_codec          79439  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep              12911  1 snd_hda_codec
snd_pcm                69181  2 snd_hda_codec,snd_hda_intel
snd_page_alloc         12842  2 snd_pcm,snd_hda_intel
snd_seq                43338  0 
snd_seq_device         12981  1 snd_seq
snd_timer              22188  2 snd_pcm,snd_seq
crc32c_intel           12625  0 
parport_serial         16674  0 
parport_pc             21896  1 parport_serial
parport                35208  3 lp,ppdev,parport_pc
button                 12818  0 
snd                    46731  10 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_hda_codec,snd_hda_intel,snd_seq_device
psmouse                67176  0 
radeon                778067  2 
ttm                    54921  1 radeon
serio_raw              12734  0 
drm_kms_helper         26601  1 radeon
drm                   169993  4 ttm,drm_kms_helper,radeon
soundcore              12891  1 snd
power_supply           13320  1 radeon
iTCO_wdt               16918  0 
i2c_algo_bit           12648  1 radeon
i2c_core               23097  4 drm,drm_kms_helper,i2c_algo_bit,radeon
i7core_edac            22004  0 
iTCO_vendor_support    12586  1 iTCO_wdt
edac_core              34036  3 i7core_edac
ext4                  270189  1 
crc16                  12328  2 ext4,bluetooth
jbd2                   54294  1 ext4
mbcache                12899  1 ext4
hid_apple              12555  0 
usbhid                 39608  0 
hid                    72252  2 usbhid,hid_apple
sg                     25482  0 
sd_mod                 43403  3 
sr_mod                 21529  0 
crc_t10dif             12333  1 sd_mod
cdrom                  38893  1 sr_mod
floppy                 51935  0 
firewire_ohci          34902  0 
firewire_core          46798  1 firewire_ohci
crc_itu_t              12332  1 firewire_core
microcode              17386  0 
ahci                   24918  2 
libahci                22312  1 ahci
uhci_hcd               26254  0 
tg3                   129085  0 
libphy                 22438  1 tg3
libata                152992  2 ahci,libahci
scsi_mod              125436  4 sg,libata,sd_mod,sr_mod
ehci_hcd               43561  0 
usbcore               124257  4 uhci_hcd,ehci_hcd,usbhid
usb_common             12339  1 usbcore 

After running linuxcnc once successfully, after which it refuses to work, the output is identical. (I copied both outputs to text files and ran diff on them.)


(Could linuxcnc not be "releasing control" of the parallel port when it quits the first time?)

Thanks again for taking a look!

Please Log in or Create an account to join the conversation.

More
12 Jun 2015 22:08 #59748 by andypugh

After running linuxcnc once successfully, after which it refuses to work, the output is identical. (I copied both outputs to text files and ran diff on them.)
(Could linuxcnc not be "releasing control" of the parallel port when it quits the first time?)


If the output is actually identical then that seems to indicate the LinuxCNC hasn't made any changes to the loaded modules and their owners.
It's sometimes a good idea to blacklist lp. I have not noticed parport_serial before. But I may not have been paying attention

Please Log in or Create an account to join the conversation.

More
12 Jun 2015 22:45 #59751 by poofjunior
I've blacklisted lp and ppdev, at which point lsmod returns
parport                35208  0 

Same issue, though where it works once, but not after attempting to restart it (unless I reboot).

Right now, I have both the preinstalled image (since I setup my machine with a liveUSB key) and a clone of the git repo on the joints_axes6 branch.
I built it according to the wiki's instructions:
cd src
 ./autogen.sh       
 ./configure
 make 
 make install-menus
 sudo make setuid

and whenever I run the linuxcnc binary in the scripts folder I first run the rip-environment script:
me@my_pc: . ./rip_environment
me@my_pc: ./linuxcnc

I think the rip-environment script prevents multiple linuxcnc binaries from conflicting with each other, but I could be wrong. Could there be an issue that these two may be conflicting?

Thanks again!

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum