Horus on Debian / Camera missing exposure controls

A forum dedicated to the development of Free Software, Libre Innovation, and Open Source Hardware (FLO) 3D Scanners
Electron752
Posts: 21
Joined: Tue Feb 03, 2015 4:05 am

Horus on Debian / Camera missing exposure controls

Post by Electron752 » Thu Sep 03, 2015 9:08 am

I was able to get Horus to run on Mac OS X, but I can't get it to work on debian. When I run horus from the command prompt/terminal I get some debug spew errors about missing exposure controls for the camera from video for linux. Horus then pops up the infamous invalid camera ID error even though I only have one camera.

Has anybody gotten horus to work on debian? I've tried it on jessie, stretch, and sid. All have the same problems.

I might try ubuntu later, but I don't use ubuntu very often.

Thanks.

jebba
Site Admin
Posts: 689
Joined: Mon Mar 25, 2013 4:11 pm

Re: Horus on Debian / Camera missing exposure controls

Post by jebba » Thu Sep 03, 2015 12:03 pm

If you are getting errors about exposure control, it is most likely because you aren't using their custom version of OpenCV.

https://github.com/bq/horus/wiki/Docume ... tom-opencv

https://github.com/bqlabs/horus/blob/de ... /debian.md

-Jeff

Electron752
Posts: 21
Joined: Tue Feb 03, 2015 4:05 am

Re: Horus on Debian / Camera missing exposure controls

Post by Electron752 » Thu Sep 03, 2015 2:42 pm

I missed the OpenCV step. That seems to have fixed my problem.

I noticed a new version of Horus was just released today. I tried the new version as well, but I'm getting python runtime errors when running calibration. The older 0.1.2.4-260 version seems to be working through.

jebba
Site Admin
Posts: 689
Joined: Mon Mar 25, 2013 4:11 pm

Re: Horus on Debian / Camera missing exposure controls

Post by jebba » Fri Sep 04, 2015 7:57 am

Feel free to post the full error to the new Horus here.

Electron752
Posts: 21
Joined: Tue Feb 03, 2015 4:05 am

Re: Horus on Debian / Camera missing exposure controls

Post by Electron752 » Fri Sep 04, 2015 5:13 pm

Here is the error. This is version horus_0.2-264-release-bq1~trusty1_amd64.deb.

It's a good thing I kept the old version since the old version appears to have been deleted off the distribution site.

>>> Horus 0.2 <<<
>>> Connecting camera 0
>>> Done
>>> Connecting board /dev/ttyUSB0 115200
>>> Done
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 14665, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "/usr/lib/python2.7/dist-packages/horus/src/horus/gui/wizard/calibrationPage.py", line 136, in afterCalibration
ret, result = response
TypeError: 'type' object is not iterable

rufu5
Aleph Objects | LulzBot
Posts: 249
Joined: Wed Apr 10, 2013 12:25 am

Re: Horus on Debian / Camera missing exposure controls

Post by rufu5 » Tue Sep 08, 2015 6:25 pm

Getting a wrong camera error and it even asked me to disconnect and then reconnect teh camera, then kept asking me to connect the camera, even though it was connected. disconnecting and reconnecting the camera again didn't seem to change anything.

I'm going to install that custom opencv and give it another shot.



Code: Select all

OS: Debian 8.1 jessie
Kernel: x86_64 Linux 3.16.0-4-amd64
Uptime: 1d 8h 56m
Packages: 1938
Shell: bash 4.3.30
Resolution: 1366x768
WM: GNOME Shell
WM Theme: Adwaita
CPU: Intel Core i5-2467M CPU @ 2.3GHz
RAM: 1249MB / 3908MB
         `Y$$b.                 
            `"Y$b._             
                `""""          

~$ horus
>>> Horus 0.1.2.4 <<<
>>> Connecting camera 0
>>> Done
HIGHGUI ERROR: V4L: Property Exposure(15) not supported by device
HIGHGUI ERROR: V4L2: Unable to get property Exposure(9963793) - Invalid argument
HIGHGUI ERROR: V4L: Exposure control in V4L is not supported
>>> Disconnecting camera 0
>>> Done
>>> Connecting camera 1
>>> Done
select timeout
select timeout
>>> Disconnecting camera 1
>>> Done
>>> Connecting camera 1
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
>>> Connecting camera 1
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
>>> Done
VIDIOC_QBUF: No such device
select timeout
HIGHGUI ERROR: V4L: Property Exposure(15) not supported by device
HIGHGUI ERROR: V4L2: Unable to get property Exposure(9963793) - Invalid argument
HIGHGUI ERROR: V4L: Exposure control in V4L is not supported
HIGHGUI ERROR: V4L2: Failed to set control "9963776": Input/output error (value 2)
HIGHGUI WARNING: Setting property 9963776 through v4l2 failed. Trying with v4l1.
HIGHGUI ERROR: V4L: Unable to set video informations
HIGHGUI ERROR: V4L2: Unable to get property Brightness(9963776) - Bad file descriptor
>>> Disconnecting camera 1
Unable to stop the stream.: Bad file descriptor
>>> Done
>>> Connecting camera 0
>>> Done
HIGHGUI ERROR: V4L: Property Exposure(15) not supported by device
HIGHGUI ERROR: V4L2: Unable to get property Exposure(9963793) - Invalid argument
HIGHGUI ERROR: V4L: Exposure control in V4L is not supported
>>> Disconnecting camera 0
>>> Done
>>> Connecting camera 0
>>> Done
HIGHGUI ERROR: V4L: Property Exposure(15) not supported by device
HIGHGUI ERROR: V4L2: Unable to get property Exposure(9963793) - Invalid argument
HIGHGUI ERROR: V4L: Exposure control in V4L is not supported
>>> Disconnecting camera 0
>>> Done
>>> Connecting camera 1
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
>>> Connecting camera 1
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
>>> Connecting camera 1
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
>>> Connecting camera 1
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
>>> Connecting camera 1
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
>>> Connecting camera 1
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
>>> Connecting camera 1
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
HIGHGUI ERROR: V4L: device /dev/video1: Unable to query number of channels
Last edited by rufu5 on Sun Sep 27, 2015 11:12 pm, edited 1 time in total.

Electron752
Posts: 21
Joined: Tue Feb 03, 2015 4:05 am

Re: Horus on Debian / Camera missing exposure controls

Post by Electron752 » Thu Sep 10, 2015 3:49 am

Rufu5:

That's the error I got before installng the custom openvc. The custom openvc is required on debian, otherwise horus doesn't work at all.

Like I said, the older version works but the latest stuff doesn't because of python runtime errors.

rufu5
Aleph Objects | LulzBot
Posts: 249
Joined: Wed Apr 10, 2013 12:25 am

Re: Horus on Debian / Camera missing exposure controls

Post by rufu5 » Sun Sep 27, 2015 11:11 pm

K cool, got the custom openCV, everything is set up, i can open the program, connect, etc. During the auto-check and calibration steps of the wizard, the platform moves, but the lasers do not turn on. In the final step of the wizard, "scanning"

I get this error message:

Code: Select all

>>> Horus 0.1.2.4 <<<
>>> Connecting camera 0
>>> Done
>>> Connecting board /dev/ttyUSB1 115200
>>> Done
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/horus/src/horus/gui/util/openglGui.py", line 263, in _OnGuiPaint
    self.OnPaint(e)
  File "/usr/lib/python2.7/dist-packages/horus/src/horus/gui/util/sceneView.py", line 507, in OnPaint
    self._init3DView()
  File "/usr/lib/python2.7/dist-packages/horus/src/horus/gui/util/sceneView.py", line 412, in _init3DView
    aspect = float(size.GetWidth()) / float(size.GetHeight())
ZeroDivisionError: float division by zero
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/horus/src/horus/gui/welcome.py", line 72, in onClose
    self.EndModal(wx.ID_OK)
  File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_windows.py", line 809, in EndModal
    return _windows_.Dialog_EndModal(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "Assert failure" failed at ../src/gtk/dialog.cpp(201) in EndModal(): either wxDialog:EndModal called twice or ShowModal wasn't called
Also there seems to be a (possibly unrelated) error message after I complete the wizard.
laserflail.png
horuserrorz.png

rufu5
Aleph Objects | LulzBot
Posts: 249
Joined: Wed Apr 10, 2013 12:25 am

Re: Horus on Debian / Camera missing exposure controls

Post by rufu5 » Sun Sep 27, 2015 11:27 pm

I restarted the program, and it calibrated this time. (edit: I don't think it was restarting that made it calibrate, it was the different position of the calibration plate).
calibration_sucess.png
Although it still returns this error:

Code: Select all

>>> Horus 0.1.2.4 <<<
>>> Connecting camera 0
>>> Done
>>> Connecting board /dev/ttyUSB1 115200
>>> Done
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/horus/src/horus/gui/welcome.py", line 72, in onClose
    self.EndModal(wx.ID_OK)
  File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_windows.py", line 809, in EndModal
    return _windows_.Dialog_EndModal(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "Assert failure" failed at ../src/gtk/dialog.cpp(201) in EndModal(): either wxDialog:EndModal called twice or ShowModal wasn't called
Also new fun rainbow lines. These seem important, but I'm not sure what they do yet exactly.

I put my object on and clicked play. This is the data that I came up with, which is not quite what I was expecting.
tastydata.png
Last edited by rufu5 on Mon Sep 28, 2015 11:53 pm, edited 1 time in total.

rufu5
Aleph Objects | LulzBot
Posts: 249
Joined: Wed Apr 10, 2013 12:25 am

Re: Horus on Debian / Camera missing exposure controls

Post by rufu5 » Mon Sep 28, 2015 11:43 pm

Finally got some data that makes some sense!

I think last time, the scanner calibrated off the back of the plate, instead of the front resulting in bogus data. It turns out, it is important to put the calibration plate in the right spot, facing just slightly away from the camera.

I wonder why there is checker pattern on both sides. It seems like it only uses the front, and the back only causes errors in calibration.
horus9000.png
calibration success
data.png
data acquisition success

Post Reply