poppy-project / poppy-ergo-jr

🤖 Poppy Ergo Jr is an open-source robotic arm based on modular 3D printed conception and low-cost XL-320 motors.
183 stars 79 forks source link

Select timeout error --> Segmentation fault #36

Closed matthieu-lapeyre closed 7 years ago

matthieu-lapeyre commented 8 years ago

We have a strange issue with a standard Ergo Jr kit (Pixl, rapsberry pi, pypot v2.11.1).

The robot instanciation raises this error:

Python 2.7.10 |Continuum Analytics, Inc.| (default, Oct 28 2015, 19:48:38) 
Type "copyright", "credits" or "license" for more information.

IPython 4.0.0 An enhanced Interactive Python.

In [1]: import poppy_ergo_jr

In [2]: poppy = poppy_ergo_jr.PoppyErgoJr()
select timeout
select timeout
Segmentation fault

Communication with motors seems ok:

import pypot.dynamixel
dxl = pypot.dynamixel.Dxl320IO('/dev/ttyAMA0')
dxl.scan(range(10))
>> [1, 2, 3, 4, 5, 6]

But not the camera ...

poppy@poppy:~ $ raspistill -o cam.jpg
mmal: No data received from sensor. Check all connections, including the Sunny one on the camera board
matthieu-lapeyre commented 8 years ago

Ok so same setup with a new camera does not raise the error and the ergo seems to work fine.

If it is indeed a problem with broken or nearly broken camera, maybe should we add more explicit error and start the ergo with the camera disabled ?

pierre-rouanet commented 8 years ago

Explanation here: https://www.raspberrypi.org/forums/viewtopic.php?t=35689&p=300710

The problem is that this segfault is not so easy to try/catch. I think we should at least explain this in the FAQ.

I'll try to see if we can do better.

lpierron commented 7 years ago

I have the same problem now. The camera worked fine this morning and stop working, now I have the "select timeout" error. I tried the explanations from https://www.raspberrypi.org/forums/viewtopic.php?t=35689&p=300710 but I do not have the same system module, I am not sure what can I do. I reinitialize the camera raspi-config, seemed to sound OK but always 'select timeout' after reboot. The camera red light lights for some seconds and stops.

Help @pierre-rouanet please

pierre-rouanet commented 7 years ago

Hi @lpierron,

You should check if the cable is still plugged correctly. We also had a lot of issue with camera burning :(

Unfortunately from a software point of view, there is not much that can be done. It's directly the camera driver that crashes.

lpierron commented 7 years ago

Thanks @pierre-rouanet the cable was unplugged !