CamView for Wheesy and Jessie

More
14 Sep 2017 01:31 #98928 by Gene1934
Dropping back in quite late, as my isp's mailserver has been constipated since early this morning.

When I was trying to follow along with lchGucksLive this morning, I was fighting with a machine that needed rebooting, but was giving me zero hints.

To summerize, uptodate wheezy, linuxcnc-2.8-pre using axis, and after a powerdown reboot, qv4l2 can find and display the camera just fine now. The original link to the program kit is dead, but I have collected what I believe to be a 1 or 2x updated version of it, but I'd like to confirm that I do indeed have the most recently updated stuffs.

So if an uptodate list of these files needed exists, I'd be most gratefull.

I'll be out of pocket the next 2 days, tomorrow they use a backhoe in my mouth to get the remains of a molar we root canal'd 30 years ago out, and the next day I'm trading vehicles. But should be able to do whatever Saturday, on my side of the pond. :)

Thank you all.

Cheers, Gene1934

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

More
29 Sep 2017 23:10 #99650 by newbynobi
Hallo,

I am not on my development computer, so I can not check what files are the latest.
Please note also, that CamView was only a proof of concept!

Norbert

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

More
30 Sep 2017 00:57 #99654 by Gene1934
Its mostly working, until I grab the lcnc window and make it bigger. The camera disappears about the time the control buttons below the backplot window start to come into view. But it survives a full screen click. Go figure...The emcfiles.zip with the stuff that makes it useful is a mess, and as I have time I'm working on that. First button is now an alternate action, so I'll nuke the second one in due time, but the camstore I will make work only when its at the camera position, just to reduce the confusion. The last 2 I think can work in either mode. But I've been busy on house maintenance and haven't played with it in 4 days or so.

So that's where I am with it. Sty tuned, or blow the horn and pass. :)

Take care Norbert.

Cheers, Gene1934

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

More
12 Dec 2017 13:37 #102993 by Gene1934
There have been some updates to ncam, that when done, will require the setup.py file to be repeated. I have also added to my .xml and postgui.hal files so that the centering function work to move it back and forth and tally the number of points recorded. Today I am going to complete the same treatment for the "align" kit that lets you do pcb's from eagle without making a customized pallet to hold the pcb accurately enough for double sided boards.
The 2nd running of the setup.py also seems to have fixed the disappearing act but the default size of the lcnc window has the camera image dancing like a bowl of jello, but that shaking effect disappears when the lcnc window is expanded a bit. Good stuff you two, and thank you both.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

More
12 Dec 2017 13:42 #102995 by ikkuh
great!

Looking forward to the updates.

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

More
14 Jun 2018 11:29 #112353 by tuxcnc
Hi.
I'm trying to migrate from old configuration.
This is panel with camera preview and few buttons to set zero and coordinates.
It works well.
The files :
1. campins.hal
#CamView pins

loadrt oneshot names=forOn,forOff
addf forOn servo-thread
addf forOff servo-thread [attachment=15053]camview-emc-files.tar[/attachment] [attachment=15053]camview-emc-files.tar[/attachment]
setp forOn.width .1
setp forOff.width .1
setp forOff.falling 1
setp forOff.rising 0
net forOnNet camview.hal_checkbutton1 => forOn.in forOff.in
net cam1 forOn.out => halui.mdi-command-00
net cam2 forOff.out => halui.mdi-command-01
net cam3 camview.hal_button1 => halui.mdi-command-02
net cam4 camview.hal_button2 => halui.mdi-command-03
net cam5 camview.hal_button3 => halui.mdi-command-04

# align pins

#net align-start halui.mdi-command-05 <= pyvcp.align-start
#net a#file name campins.hal
#CamView pins

loadrt oneshot names=forOn,forOff
addf forOn servo-thread
addf forOff servo-thread
setp forOn.width .1
setp forOff.width .1
setp forOff.falling 1
setp forOff.rising 0
net forOnNet camview.hal_checkbutton1 => forOn.in forOff.in
net cam1 forOn.out => halui.mdi-command-00
net cam2 forOff.out => halui.mdi-command-01
net cam3 camview.hal_button1 => halui.mdi-command-02
net cam4 camview.hal_button2 => halui.mdi-command-03
net cam5 camview.hal_button3 => halui.mdi-command-04

# align pins

#net align-start halui.mdi-command-05 <= pyvcp.align-start
#net align-y halui.mdi-command-06 <= pyvcp.align-y
#net align-x halui.mdi-command-07 <= pyvcp.align-x
#net clear-offset halui.mdi-command-08 <= pyvcp.clear-offset

net cam6 camview.hal_button4 => halui.mdi-command-05
net cam7 camview.hal_button5 => halui.mdi-command-06
net cam8 camview.hal_button6 => halui.mdi-command-07
net cam9 camview.hal_button7 => halui.mdi-command-08lign-y halui.mdi-command-06 <= pyvcp.align-y
#net align-x halui.mdi-command-07 <= pyvcp.align-x
#net clear-offset halui.mdi-command-08 <= pyvcp.clear-offset

net cam6 camview.hal_button4 => halui.mdi-command-05
net cam7 camview.hal_button5 => halui.mdi-command-06
net cam8 camview.hal_button6 => halui.mdi-command-07
net cam9 camview.hal_button7 => halui.mdi-command-08
2. togle-caa.ui
<?xml version="1.0"?>
<interface>
  <!-- interface-requires gladevcp 0.0 -->
  <!-- interface-requires gtk+ 2.12 -->
  <!-- interface-naming-policy project-wide -->
  <object class="GtkAlignment" id="vcp1">
    <property name="visible">True</property>
    <property name="xalign">0</property>
    <property name="yalign">0</property>
    <child>
      <object class="GtkTable" id="table1">
        <property name="visible">True</property>
        <property name="n_rows">3</property>
        <property name="n_columns">4</property>
        <child>
          <object class="HAL_CheckButton" id="hal_checkbutton1">
            <property name="label" translatable="yes">G43H99</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">False</property>
            <property name="draw_indicator">True</property>
          </object>
          <packing>
            <property name="left_attach">1</property>
            <property name="right_attach">2</property>
            <property name="x_options">GTK_SHRINK</property>
            <property name="y_options">GTK_SHRINK</property>
          </packing>
        </child>
        <child>
          <object class="HAL_Button" id="hal_button1">
            <property name="label" translatable="yes">Save XYZ</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
          </object>
          <packing>
            <property name="left_attach">2</property>
            <property name="right_attach">3</property>
            <property name="x_options">GTK_SHRINK</property>
            <property name="y_options">GTK_SHRINK</property>
          </packing>
        </child>
        <child>
          <object class="HAL_HScale" id="hal_hscale1">
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="adjustment">adjustment_circle</property>

            <property name="restrict_to_fill_level">False</property>
            <property name="digits">0</property>
            <property name="value_pos">right</property>
          </object>
        </child>
        <child>
          <object class="HAL_HScale" id="hal_hscale2">
            <property name="visible">True</property>
            <property name="can_focus">True</property>  
            <property name="adjustment">adjustment_angle</property>
          
            
            <property name="restrict_to_fill_level">False</property>
            <property name="value_pos">right</property>
          </object>
          <packing>
            <property name="top_attach">1</property>
            <property name="bottom_attach">2</property>
          </packing>
        </child>
        <child>
          <object class="HAL_Button" id="hal_button2">
            <property name="label" translatable="yes">Center3</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
          </object>
          <packing>
            <property name="left_attach">3</property>
            <property name="right_attach">4</property>
            <property name="x_options">GTK_SHRINK</property>
            <property name="y_options">GTK_SHRINK</property>
          </packing>
        </child>
        <child>
          <object class="HAL_Button" id="hal_button3">
            <property name="label" translatable="yes">Center4</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
          </object>
          <packing>
            <property name="left_attach">4</property>
            <property name="right_attach">5</property>
            <property name="x_options">GTK_SHRINK</property>
            <property name="y_options">GTK_SHRINK</property>
          </packing>
        </child>
	<child>
          <object class="HAL_Button" id="hal_button4">
            <property name="label" translatable="yes">Clear Offset</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
          </object>
          <packing>
            <property name="left_attach">1</property>
            <property name="right_attach">2</property>
            <property name="top_attach">1</property>
            <property name="bottom_attach">2</property>
            <property name="x_options">GTK_SHRINK</property>
            <property name="y_options">GTK_SHRINK</property>
          </packing>
        </child>
	<child>
          <object class="HAL_Button" id="hal_button5">
            <property name="label" translatable="yes">Align Start</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
          </object>
          <packing>
            <property name="left_attach">2</property>
            <property name="right_attach">3</property>
            <property name="top_attach">1</property>
            <property name="bottom_attach">2</property>
            <property name="x_options">GTK_SHRINK</property>
            <property name="y_options">GTK_SHRINK</property>
          </packing>
        </child>
	<child>
          <object class="HAL_Button" id="hal_button6">
            <property name="label" translatable="yes">Align Y</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
          </object>
          <packing>
            <property name="left_attach">3</property>
            <property name="right_attach">4</property>
            <property name="top_attach">1</property>
            <property name="bottom_attach">2</property>
            <property name="x_options">GTK_SHRINK</property>
            <property name="y_options">GTK_SHRINK</property>
          </packing>
        </child>
	<child>
          <object class="HAL_Button" id="hal_button7">
            <property name="label" translatable="yes">Align X</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
          </object>
          <packing>
            <property name="left_attach">4</property>
            <property name="right_attach">5</property>
            <property name="top_attach">1</property>
            <property name="bottom_attach">2</property>
            <property name="x_options">GTK_SHRINK</property>
            <property name="y_options">GTK_SHRINK</property>
          </packing>
        </child>
      </object>
    </child>
  </object>
  <object class="GtkAdjustment" id="adjustment1">
    <property name="upper">100</property>
    <property name="step_increment">0.10000000000000001</property>
    <property name="page_increment">10</property>
  </object>
  <object class="GtkAdjustment" id="adjustment2">
    <property name="upper">100</property>
    <property name="step_increment">0.10000000000000001</property>
    <property name="page_increment">10</property>
  </object>
</interface>
The old config was :
EMBED_TAB_NAME = CAM_View 
EMBED_TAB_COMMAND = camview-emc -C camviewcfg -g togle-caa.ui -H campins.hal -w {XID}
I can run camera preview by :
EMBED_TAB_COMMAND = gladevcp -x {XID} camview.glade
But I can't run toggle-caa.ui in any way.
Could anyone help me ?
Attachments:

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

More
01 Jul 2018 02:05 #113150 by Happymacer
Hi all, this is just in case it helps someone. I'm running 2.8.0-pre1-3747 (july 2018). Thanks for all the work folks!

I followed the instructions in camPY by bogie6040, and it worked once. Couldn't get it working again (in LinuxCNC, it worked fine in v4l2). Eventually I substituted the original camPY.py file from newbynobi, reran the setup script, and it works! I dont understand the code, so no idea whats different!

I also found bogie6040's Wiki file and I will attempt to update that.

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

More
01 Jul 2018 22:03 #113191 by Gene1934
I am in that same leaky rowboat. Runing master on wheezy, I could get it to work once, until I tried to upsize the axis screen to a backplot size that matched the camera, 640x480, but at that point the video disappeared until the next reboot of the machine.

I have quite a bit of cruft here, and I would appreciate a repost of the camPY.py file you are referring to as it may also solve my problem.

Thank you very much.

Cheers, gene1934

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

More
02 Jul 2018 13:29 #113226 by Happymacer
Hi Gene I'm attaching a new zip file that should have all the files. I tried it again this evening,and worked first time. Ive changed cameras too, tried a cheap sonix, and a Logitech HD camera, with success.

However, when using the sonix camera running from terminal (ie: python camview.py) I get a frame rate of about 8FPS, and about half that when running inside LCNC. The HD camera gets a much higher frame rate but inside LCNC it drops about half.

I am running on a eMachines EL1600 with 2MB memory (freebie!!) and the latest LCNC update. Am using Axis Gui.

In regards the video size, I'm having success with starting LCNC, change to Camera tab in Axis, then click maximise window button, then autosize - results in a nice big image.

Good luck, hope it works for you!
Cheers Happy

File Attachment:

File Name: CamPY_Happy.tar.gz
File Size:16 KB
Attachments:

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

More
02 Jul 2018 14:41 #113232 by Gene1934
Thanks, I'll give it a shot later today. And let you know how it works.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

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

Moderators: HansU
Time to create page: 0.122 seconds
Powered by Kunena Forum