Horus on Debian / Camera missing exposure controls

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.

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/Documentation#build-custom-opencv

https://github.com/bqlabs/horus/blob/develop/doc/installation/debian.md

-Jeff

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.

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

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 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

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.




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

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.

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:

>>> 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.


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).


Although it still returns this error:

>>> 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.

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.


Attached is the first set of data that made any sense.
raw_out.stl (84 Bytes)

Wait, I exported the .ply as an .stl and It’s not showing up. Hmmmmm…

Were you using MeshLab to rebuild the mesh? If so, you have to build a mesh before you can export it or you’ll end up with an empty STL.

nah, blender. maybe it wasn’t selected when I exported it or something.

I’m going to try and do something like this with some of the data I’ve got right now.

The part I’m testing with is a pretty challenging geometry… It’s over-molded and has thermal insert studs, and would be tricky to design by hand if you wanted to reproduce it (which I do, since mine was broken a long time ago).





imported all the ply files, clicked align (the little yellow circle at the top), selected the first mesh, clicked “glue here mesh”, selected the second mesh and clicked “point based gluing” and now i suppose I should choose some points.

some alignment points, double click to put them in, one on the left, one on the right. You want to space these out as much as possible.

Not perfect, but not too bad. I bet if I trimmed the data before I aligned it it would be better, but let’s see what happens without first. I’ll go ahead and do the other 5 datasets real quick.

I should mention, it’s important that you don’t put alignment points such that they are colinear. Even 5 spaced out colinear points won’t make for a good alignment.

looks… interesting, we will see what the data looks like after processing the alignment.

Note: It’s not possible to rotate the view while the alignment tool is open afaict., which would be nice.