Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ximea.xiapi read camera image sometimes crush #16

Open
CarlDegio opened this issue Jul 31, 2023 · 12 comments
Open

ximea.xiapi read camera image sometimes crush #16

CarlDegio opened this issue Jul 31, 2023 · 12 comments

Comments

@CarlDegio
Copy link

I use showimage and show3d in ros2. Current gsdevice code use:

from ximea import xiapi
self.cam = xiapi.Camera(self.dev_id)
self.cam.read()

this sometimes occur:

global cap_v4l.cpp:1119 tryIoctl VIDEOIO(V4L2:/dev/video2): select() timeout.
ERROR! reading image from camera!

it seems that the problem is read image from camera failed. Is there any solution? Such as read image by opencv?

@debrashure
Copy link
Contributor

I am in the process of updating the repository to only support the GelSight Mini device.
I plan to check the code in tonight. I will test the ros2 example.
Are you using the Mini on Linux? If so, it shouldn't be using the ximea api.

@CarlDegio
Copy link
Author

yes, I use mini on linux. I have push a ros2 package version: https://github.com/CarlDegio/gelsight_ros2. two nodes use gsdevice so ximea api is used by default.

@debrashure
Copy link
Contributor

I just updated the repository and none of the code uses ximea. If you update and reinstall gelsight, the issue should go away.

@CarlDegio
Copy link
Author

Thank you! I will try it later

@CarlDegio
Copy link
Author

the change seems good. But the crush is still exist. And it just happened randomly and frequently. just like this:

ERROR! reading image from camera!
...
AttributeError: 'NoneType' object has no attribute 'shape'
[ WARN:[email protected]] global cap_v4l.cpp:872 requestBuffers VIDEOIO(V4L2:/dev/video2): failed VIDIOC_REQBUFS: errno=19 (No such device)

Do you have any suggestions for this, like the frequency to read, or the usb cable.

@CarlDegio
Copy link
Author

At present, I found that it is likely that the usb plug is not in good status.

@debrashure
Copy link
Contributor

If the lights are not staying on all the time, that would indicate a USB problem.

@CarlDegio
Copy link
Author

If the lights are not staying on all the time, that would indicate a USB problem.

Yes, I believe I have found the reason. The mini usb on gelsight is not tight. Some contact will lead it offline.

@debrashure
Copy link
Contributor

Please send an email to [email protected] with the serial number of the Mini and a short description of the problem.
You can cc me at [email protected] to make sure we take care of the issue.

Thank you,
Debbie

@debrashure
Copy link
Contributor

@CarlDegio were able to resolve your issue ???

@CarlDegio
Copy link
Author

Yes, Basically solved. I found that as long as I don't touch it during running (such as fixed), it basically functions normally. But maybe the miniUSB lock strength on the sensor still needs to be strengthened.

@debrashure
Copy link
Contributor

Yes, you are correct, the USB connection needs to be reinforced. We are working on making it better.
If you should run into any issues going forward, please don't hesitate to reach out.
Thanks again for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants