SherifN / peak_cam

A Linux ROS C++ Node that wraps the driver API for IDS vision cameras using IDS peak software.
Other
8 stars 13 forks source link

Not able to set "Continuous" ExposureAuto #11

Closed gerni17 closed 3 years ago

gerni17 commented 3 years ago

First of all thank you for the great work!

However I have some problems runnig the node.

Setup Description

I am able to run this repo together with an IDS camera with an Ethernet interface. he IDS peakversion is: ids-peak-linux-x86-1.2.1.0-64 I use Ubuntu 18.04 LTS and ROS Melodic. I use the camera with an ethernet2usb adapter(my computer has no ethernet port). I can run the default parameters settings and it works flawlessly. I can open the IDS Cockpit and change the exposure time to continuous.

Issue Description

As soon as I change the \textit{ExposureAuto: "continuous" } the node does not work, see log.txt. I cannot run the node as root, the error message is: [ERROR] [1617974045.478066204]: [PEAK_CAM]: Device at port 4103654576 not connected or must run as root!

Additional details / screenshot

Thank you for your reply.

attachments.zip

flynneva commented 3 years ago

hi @gerni17, thank you for attaching the log file!

it looks to me like we are missing an "unlock exposure time" setting somewhere in the source code. ill dig into this today to see what I can find.

flynneva commented 3 years ago

so im not sure if this will fix your problem...but if you could try it out and print out the results thatd be great!

https://github.com/flynneva/peak_cam/tree/fix/exposure_auto

the old code would check and see if ExposureAuto was set to Continous and if so, it would try and set the ExposureTime based on the AcquisitionFrameRate value. I'm not sure this is necessary....so I went ahead and commented it out.

gerni17 commented 3 years ago

Dear @flynneva Thank you for the fast response. This works! Thank you very much. However, as soon as I kill the node, I cannot relaunch it unless I reboot the camera. I am not sure whether this has already been an issue before. Do you know where this could come from? I again attached a log file.

Best logs.txt

flynneva commented 3 years ago

hi @gerni17, the error you're getting now looks like something to do with the framerate:

[ERROR] [1617995501.573771710]: [PEAK_CAM]: EXCEPTION: Error-Code: 12 (PEAK_RETURN_CODE_OUT_OF_RANGE) | Error-Description: Value 10.000000 must be smaller than or equal 9.999135. : OutOfRangeException thrown in node 'AcquisitionFrameRate' while calling 'AcquisitionFrameRate.SetValue()' (file 'FloatT.h', line 89)

not sure about this but have you tried to close the terminal completely and restart from a different terminal? i think i've experienced similar problems....the shutdown of this node still is not that clean so it might be dangling in the background. that could be your problem as well...not sure.

flynneva commented 3 years ago

i would close this issue though and start a new one if your problem persists

gerni17 commented 3 years ago

Yes, I will further test this issue. Thank you for your great support 😊