NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Using LinuxCNC AXIS Another tab for WebCam

Welcome, Guest
Username: Password: Remember me

TOPIC: Another tab for WebCam

Re:Another tab for WebCam 29 Apr 2012 02:57 #19616

  • strykerg
  • strykerg's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 49
  • Karma: 1
strykerg wrote:
psha wrote:
Hm, my fault. emc2 package name changed to linuxcnc so dependencies are a bit broken

psha did u manage ?

I've been playing a bit around with glade and with the use of the camera i managed to make a function i really wanted: rotate the program to reflect the rotated workpiece (i need it for double sided pcb's).

at first i tried to rotate and offset x and y at the same time but i am getting a small offset which i couldnt get rid off (maybe cuz g10 l2 rotates at machine origin?)

so by modifying the files i downloaded from wiki.linuxcnc.org/cgi-bin/wiki.pl?Axis_Embed_Video i made two functions. one to find rotation from four points (two on backplot and two on actual workpiece) and execute. g10 l2 p0 r

the other one simply does g10 l20 which offsets the saved pos to current pos.

tonight or tomorrow i will try and post everything here. in the meantime i have a couple of questions to the gurus here:

through glade, is it possible that a checkbox turns on and off the camera? (same as in control) i want to turn it off because when the camera is on, my cpu gets hogged at 100%.

is there a function i can do to reload the current program (ctrl-r) (this needs to be done after offsetting)

This attachment is hidden for guests. Please log in or register to see it.

here are the files. As i said its just a modified version of the ones found in wiki.linuxcnc.org/cgi-bin/wiki.pl?Axis_Embed_Video
what I did and how it works:

changed the way camon and cam off works so that it just does a relative move, with an offset which has been saved previously (meant to be used with a fixed camera)
MARK-CO: after performing a mark with the actual tool on the workpeice, this button is pressed to save current coordinates
CALIB-CO: with the camera centred on the above mark, pressing this will save the offsett between the tool and the camera
CAM checkbox: toggling this moves the axis so that the camera is in the place of the tool, or vice versa (performs a positive/negative g90 g0 with the saved offset)
SAVE XYZ wroks the same as before just added a debug so it shows the saved coord.

how to perform rotational offset:
load nc file and install workpeice. make sure there are no rotational offsets are present in the current coordinate system (G10 L2 P0 R0)
move to first reference point (lower leftish) on the backplot and press SAVE XYZ
move to the same point on the actual workpeice with camera and SAVE XYZ
move to the second reference point (upper rightish) on the backplot and SAVE XYZ
move to the same point on the actual workpeice with camera and SAVE XYZ
press ROTATE and then reload the program (CTRL+R) << cant find a way to do this automatically in the subroutine

performing X-Y offset
move to a reference point on the backplot and SAVE XYZ (point A)
move to the same reference point with the camera on the actual workpeice.
uncheck the CAM checkbox so that the tool will move in-place of the camera
press OFFSET and reload the program

i've known glade and oword routines for like 2days now so comments on any mistakes or suggesstions would be greatly appreciated.
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
The administrator has disabled public write access.

Re:Another tab for WebCam 11 Jun 2012 23:30 #20835

  • austin.mn
  • austin.mn's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 51
  • Karma: 0
Adding a webcam to my plasma machine is something I definitely want to do, but it seems the instructions for getting it set up apply to EMC2 and not Linuxcnc. If I try and get things working for me, I seem to be constantly running into trouble. Is there any instructions I can use to get my table set up with a webcam and keep my current configuration of linuxcnc?
The administrator has disabled public write access.

Re:Another tab for WebCam 12 Jun 2012 05:40 #20838

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4138
  • Thank you received: 141
  • Karma: 130
austin.mn wrote:
Adding a webcam to my plasma machine is something I definitely want to do, but it seems the instructions for getting it set up apply to EMC2 and not Linuxcnc. If I try and get things working for me, I seem to be constantly running into trouble. Is there any instructions I can use to get my table set up with a webcam and keep my current configuration of linuxcnc?

I think the existing instructions ought to work, but with occasional substitution of "linuxcnc" for "emc2"
The administrator has disabled public write access.

Re:Another tab for WebCam 12 Jun 2012 08:36 #20845

  • ArcEye
  • ArcEye's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1336
  • Thank you received: 102
  • Karma: 129
Hi

I think the root of the problem is the .deb dependencies of the packages, requiring now deprecated files since the switch to linuxcnc.
Looks like the files in pshas /pool dir of his repository were last updated in Nov 2010

If you are comfortable with it, you can either use dpkg --force-depends options or simply download the packages and manually install the elements from them.

A .deb file in common with many others (.ipk etc) is simply a glorified .tar.gz. With a decent file manager like mc you can open it and transfer what you want from it to your system.

If that goes a bit beyond your comfort zone, you might have to wait for psha to update the packages.
He is a very busy chap in the development of Linuxcnc.

regards
Last Edit: 12 Jun 2012 08:39 by ArcEye.
The administrator has disabled public write access.

Re:Another tab for WebCam 12 Jun 2012 09:19 #20846

  • ArcEye
  • ArcEye's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1336
  • Thank you received: 102
  • Karma: 129
Hi

Just thought I would check my take on the dependency issues and can confirm it.

Below are the dependencies lists from the packages /DEBIAN/control files

Package: camunits
Depends: libcamunits6, libcamunits6-dev, camunits-utils, libcamunits-gtk6, libcamunits-gtk6-dev, camview, camunits-plugins-dc1394

Package: camunits-plugins-dc1394
Depends: libc6 (>= 2.4), libdc1394-22

Package: camunits-utils
Depends: libc6 (>= 2.3.6-6~), libcamunits6, libglib2.0-0 (>= 2.12.0)

Package: camview
Depends: libatk1.0-0 (>= 1.29.3), libc6 (>= 2.4), libcairo2 (>= 1.2.4), libcamunits-gtk6, libcamunits6, libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.2.1),
libglib2.0-0 (>= 2.16.0), libgtk2.0-0 (>= 2.10.0), libpango1.0-0 (>=1.14.0)

Package: libcamunits-gtk6-dev
Depends: libcamunits-gtk6 (= 0.2.0-7~lucid), libcamunits6-dev, libc6-dev
Conflicts: libcamunits-gtk5-dev
Replaces: libcamunits-gtk5-dev
Provides: libcamunits-gtk-dev

Package: libcamunits-gtk6
Depends: libatk1.0-0 (>= 1.29.3), libc6 (>= 2.4), libcairo2 (>= 1.2.4), libcamunits6, libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.2.1), libglib2.0-0 (>= 2.16.0), libgtk2.0-0 (>= 2.18.0), libpango1.0-0 (>= 1.14.0)
Recommends: camview
Conflicts: libcamunits-gtk6
Replaces: libcamunits-gtk6

Package: libcamunits6-dev
Depends: libcamunits6 (= 0.2.0-7~lucid), libc6-dev
Conflicts: libcamunits5-dev
Replaces: libcamunits5-dev
Provides: libcamunits-dev

Package: libcamunits6
Depends: libc6 (>= 2.11), libgl1-mesa-glx | libgl1, libglib2.0-0 (>= 2.14.0), libjpeg62, libv4l-0 (>= 0.5.0)
Recommends: camunits-utils, libcamunits-gtk6
Suggests: camunits-plugins-dc1394
Conflicts: libcamunits5
Replaces: libcamunits5

Package: camunits-plugins-emc-cv
Depends: camview

Package: camunits-plugins-emc-misc
Depends: libc6 (>= 2.4), libcv4, libfreeimage3 (>= 3.10.0), camview

Package: camunits-plugins-emc
Depends: emc2-sim, freeglut3, libc6 (>= 2.4), libgl1-mesa-glx | libgl1, libglu1-mesa | libglu1, camview

Package: camview-emc
Depends: camview, python-camunits, python-xlib, camunits-plugins-emc-misc (= 0.0.37~lucid)
Recommends: camunits-plugins-emc-cv

Package: emc2-fake-sim
Depends: emc2
Conflicts: emc2-sim
Provides: emc2-sim

Package: emc2-fake
Depends: emc2-sim
Conflicts: emc2
Provides: emc2


camview itself is unproblematic, but you can see when it gets to camview-emc, there is a circular dependency upon emc2 rather than linuxcnc.

As per previous, you can get around it if you know what you are doing.
Alternately if you haven't upgraded to 2.5 or installed from the latest LiveCD, you can probably still use the packages as per the instructions.

regards
Last Edit: 12 Jun 2012 09:20 by ArcEye.
The administrator has disabled public write access.

Re:Another tab for WebCam 12 Jun 2012 10:07 #20849

  • psha
  • psha's Avatar
  • OFFLINE
  • Moderator
  • Posts: 107
  • Karma: 22
I've updated packages agains current linuxcnc2.5 repository but have not tested them.
Only changed part is emc2-fake package and emc-camunits.

upd
Sorry for such long delay
Last Edit: 12 Jun 2012 10:08 by psha.
The administrator has disabled public write access.
Time to create page: 1.807 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.