#emc-devel | Logs for 2009-09-21

[07:49:29] <micges_work> good morning
[07:50:35] <micges_work> Is there easy way to share some shared memory between rt hal module and let say user python hal module?
[08:34:16] <alex_joni> micges_work: some different memory besides the task/motion interface?
[08:36:31] <micges_work> I think so, idea is to copy large amount of data to rt driver (designing rt_ethernet hal driver)
[10:24:42] <awallin> hi all, was there a recent re-factor of the AXIS opengl code? I've been looking for some easy to use OpenGL bindings for python for a while. Visual (www.vpython.org) seems best so far. But it doesn't have a function for exporting the current view to a file (screenshot). Is this in the AXIS code or would it be easy to add?
[11:59:40] <jepler> micges_work: rtapi has shared memory APIs but they aren't wrapped in Python. putting wrappers in halmodule would be appropriate
[12:05:58] <micges_work> jepler: thanks
[12:07:06] <jepler> awallin: no, there's nothing specific in axis for making screenshots. the opengl function you need for that is glreadpixels, but axis's minigl doesn't wrap it yet. In C it looks like this: http://pastebin.ca/1573875 and I'm sure python-opengl includes a glReadPixels wrapper
[12:11:48] <jepler> bbl
[13:56:11] <awallin> jepler: what files from the emc tree do I need for minigl? I don't have an emc install to work with right now. Or is it just easier to do an emc-install (simulator, since my kernel is non-realtime) ?
[14:17:23] <jepler> awallin: I've made no effort to make those modules stand alone from emc, but you're welcome to try. at a guess you'd need at least the following, two of which are compiled: http://pastebin.ca/1573974
[14:18:42] <awallin> thanks, I will try when I get home later today
[14:28:39] <cradek> jepler: help me with a half-baked idea: I was thinking of trying to isolate touchoff and tool-touchoff so they could be used in multiple guis. They are very complicated because of how the various offsets and active units interact. I wonder if new G10 commands (we have lots of Lxxx available) would do what they do, but more easily because the interp knows those things. If so, the gui part becomes very simple.
[14:30:40] <jepler> cradek: you mean move those ugly calculations out of the gui? I'm sure not against that
[14:30:46] <jepler> of course, you'll introduce at least 2 bugs
[14:31:00] <cradek> oh surely
[14:31:14] <cradek> but yeah, it would make the gui[s] very simple
[14:31:47] <jepler> is l an integer?
[14:31:50] <cradek> G10 L20? P1 X-.1 => change G54 such that X now = -.1
[14:31:54] <cradek> yes I think so
[14:32:12] <cradek> L10? => same for tool table
[14:32:32] <cradek> X is in the current g20/g21 units of course
[14:32:35] <jepler> right
[14:33:55] <cradek> ... current g20/g21/g7/g8 units
[14:35:40] <jepler> now all we need is a non-modal units setting
[14:35:45] <jepler> g20.1 g10 l20 ...
[14:36:24] <jepler> (a UI showing metric when the current distance units setting is inches will have to issue 3 mdi commands)
[14:36:29] <cradek> a modal stack: G[push] G20 G10... G[pop]
[14:36:53] <jepler> urp
[14:41:51] <jepler> looks like someone's biting off more than he could chew
[14:42:07] <cradek> I'm not going to bite either of those
[14:42:41] <jepler> oh, so by "help me", you mean "write me"?
[14:42:45] <cradek> but you're right, if you don't want to disrupt modal interp settings, the gui still has to do the crappy units conversion
[14:42:50] <cradek> no no no
[14:43:19] <cradek> I mean I wasn't going to write G20.1 or G[push]
[14:43:25] <jepler> oh
[14:43:29] <cradek> I just wanted help baking it
[14:43:44] <jepler> I was having trouble figuring out what "either" meant
[14:43:46] <cradek> the units thing makes me sad but I don't see an easy answer
[14:46:40] <cradek> ugh this seemed easy until I looked at the code
[14:58:10] <cradek> oh, it is easy, I just had to draw a picture
[16:25:26] <cradek> I'm struggling to see what it means if you G10 L10 a tool that's not currently loaded
[16:30:23] <jepler> then reject it for now?
[16:32:36] <jepler> seems like schemes where you measure tools off-machine would use G10 L1, not G10 L10
[16:33:37] <cradek> yes that's right
[16:34:29] <cradek> I guess it means "if you would load that tool offset with the machine in this position, the coordinates would become the given numbers"
[16:35:34] <jepler> one possibility: consider tools with depth-setting rings. Load one, touch off its length. Repeat for all tools with the same ring-depth. Why force the operator to load each one?
[16:35:42] <jepler> I think the thing you said would make this work
[16:37:52] <cradek> yes it would
[16:37:53] <SWPLinux> it would be interesting to have a standalone tool-setting application
[16:38:18] <cradek> what would that be?
[16:38:23] <SWPLinux> (assuming the lengths are repeatable with your tool-holding scheme)
[16:39:11] <SWPLinux> a program that uses the motion control and HAL parts of EMC2, but it just asks you for tool numbers and daimeters, and its output is a tool table
[16:39:17] <SWPLinux> diameters
[16:39:56] <jepler> my case is a bit silly -- if I actually trusted the rings, I'd use them as length 0 or length = datasheet ring depth and only touch off non-ringed tools
[16:40:38] <SWPLinux> you should measure a bunch of them and see how close they actually are
[16:49:22] <SWPLinux> time to catch a plane. see you later
[16:57:45] <CIA-7> EMC: 03cradek 07master * r2d49a37167ae 10/src/emc/rs274ngc/ (interp_check.cc interp_convert.cc): G10 L20 to set a G5x coordinate system relative to the current position
[16:58:34] <CIA-7> EMC: 03cradek 07master * rfe0c83145b2b 10/src/emc/rs274ngc/interp_convert.cc: G10 L10 to touch off a tool
[17:02:01] <alex_joni> seems the lynx will be the next LTS
[18:07:55] <jepler> cradek: any idea why git said there were conflicts in your last two commits?
[18:12:39] <cradek> they were cherry-picked from another branch and fixed up
[18:13:00] <cradek> (random toolchange)
[18:13:23] <jepler> ah
[18:13:24] <cradek> hm I should do that too
[18:15:36] <jepler> do what?
[18:16:15] <cradek> put those two commits on random_toolchange so merging master into random_toolchange works correctly in the future
[18:18:30] <jepler> "[Shuttleworth said Ubuntu 10.04] would extend the horizontal server scalability of Debian into cloud computing"
[18:18:38] <cradek> hahaha
[18:18:54] <jepler> if you go horizontally until you reach the clouds, it's actually fog
[18:19:43] <cradek> that is kind of a foggy metaphor
[18:21:03] <CIA-7> EMC: 03cradek 07random_toolchange * r42462fb19fad 10/src/emc/rs274ngc/ (interp_check.cc interp_convert.cc): G10 L20 to set a G5x coordinate system relative to the current position
[18:21:03] <CIA-7> EMC: 03cradek 07random_toolchange * r22e21e484021 10/src/emc/rs274ngc/ (interp_check.cc interp_convert.cc): G10 L10 to touch off a tool
[18:21:04] <CIA-7> EMC: 03cradek 07random_toolchange * r0f5cf0ab3dca 10/ (27 files in 16 dirs): Merge branch 'master' into random_toolchange
[18:21:13] <cradek> yay!
[18:21:49] <cradek> now that it's on seventyteen branches I hope it's right
[18:22:27] <cradek> more and more I'm finding that I know how to get git to do what I want
[18:23:43] <jepler> kick the tires on this before I commit it? http://emergent.unpy.net/files/sandbox/0001-use-new-G10-L10-L20-to-simplify-touch-off-code.patch
[18:24:40] <cradek> I just remembered I forgot to try diameter mode
[18:24:45] <cradek> did you try it?
[18:25:28] <cradek> % git am <0001-use-new-G10-L10-L20-to-simplify-touch-off-code.patch
[18:25:28] <cradek> cat: /usr/local/src/emc2.trunk/.git/rebase-apply/next: No such file or directory
[18:25:31] <cradek> previous rebase directory /usr/local/src/emc2.trunk/.git/rebase-apply still exists but mbox given.
[18:25:34] <cradek> ??
[18:25:39] <cradek> forget what I said about git earlier
[18:26:28] <cradek> you can remove a lot more kruft than that
[18:26:33] <jepler> yeah I think you're right
[18:26:54] <jepler> several vars are now altogether unused
[18:28:36] <jepler> revised patch at the same url
[18:36:45] <cradek> huh, seems to just work
[18:39:36] <CIA-7> EMC: 03jepler 07master * r0c5ebe3f67df 10/src/emc/usr_intf/axis/scripts/axis.py: use new G10 L10/L20 to simplify touch-off code
[18:39:59] <cradek> even diameter works
[18:40:00] <cradek> woo
[18:48:48] <CIA-7> EMC: 03cradek 07random_toolchange * r342b6b27bdd2 10/src/emc/usr_intf/axis/scripts/axis.py: use new G10 L10/L20 to simplify touch-off code
[18:48:49] <CIA-7> EMC: 03cradek 07random_toolchange * r51cd36dc7970 10/src/emc/usr_intf/axis/scripts/axis.py: Merge branch 'master' into random_toolchange