Reachy Cameras not responding

Hi all,

I’m using the Python SDK to connect to Reachy. Everything seems to work except for getting images from the cameras. The line reachy.left_camera just hangs forever until I press ctrl-c.

>>> from reachy_sdk import ReachySDK
>>> reachy = ReachySDK(host='192.168.1.92')
>>> reachy.left_camera
^CTraceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/gea/code/reachy/sdk/venv/lib/python3.8/site-packages/reachy_sdk/camera.py", line 50, in __repr__
    return f'<Camera side="{self._side}" resolution={self.last_frame.shape}>'
  File "/home/gea/code/reachy/sdk/venv/lib/python3.8/site-packages/reachy_sdk/camera.py", line 56, in last_frame
    self._start_sync_in_bg()
  File "/home/gea/code/reachy/sdk/venv/lib/python3.8/site-packages/reachy_sdk/camera.py", line 141, in _start_sync_in_bg
    self._got_img.wait()
  File "/usr/lib/python3.8/threading.py", line 558, in wait
    signaled = self._cond.wait(timeout)
  File "/usr/lib/python3.8/threading.py", line 302, in wait
    waiter.acquire()
KeyboardInterrupt

Also when I check the ros topic /left_image I get no output. Other topics such as /joint_states give the expected output.

I checked the service log and found thousands of such mesages:

...
mai 21 12:39:20 reachy bash[1315]: [camera_publisher-5] [WARN] [1621593560.217977002] [camera_publisher]: Failed to grab frame!
mai 21 12:39:20 reachy bash[1315]: [camera_publisher-5] [WARN] [1621593560.232502769] [camera_publisher]: Failed to grab frame!
mai 21 12:39:20 reachy bash[1315]: [camera_publisher-5] [WARN] [1621593560.251290342] [camera_publisher]: Failed to grab frame!
mai 21 12:39:20 reachy bash[1315]: [camera_publisher-5] [WARN] [1621593560.266012650] [camera_publisher]: Failed to grab frame!
mai 21 12:39:20 reachy bash[1315]: [camera_publisher-5] [WARN] [1621593560.284451766] [camera_publisher]: Failed to grab frame!
mai 21 12:39:20 reachy bash[1315]: [camera_publisher-5] [WARN] [1621593560.299126919] [camera_publisher]: Failed to grab frame!
...

Does anyone know what the issue here might be?

Found the solution:

the systemctl services run as the reachy user and not the root user, which means that by default the services don’t have access to the /dev/video devices. Add the reachy user to the video group:

sudo usermod -a -G video reachy

5 Likes