No xming view and problem when running aruco_test.py


#1

i followed the tutorial, calibrated the camera successfully and everything is fine up to running aruco_tester.py
i get this message instead of the x,y,z position.
also the xming video does not turn on

aruco%2072%20returned


#2

ok i found the problem
there is a mistake in the code cloned from your github
my solution:
Vim aruco_tester.py
and changed: id_to_find from 129 to 72, marker_size from 40 to 19
and it worked fine
Aruco%20test


#3

Thanks for the update!

I will adjust the repository, since the course does use Aruco 72 before 129. Of note, you will have to change it back to 129 and 40cm when you get to that point.


#5

Unknown Error

pi@raspberrypi:~/pidronescripts/camera$ python aruco_tester.py

VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV

Showing video feed if X11 enabled.
Script will run until you exit.

Traceback (most recent call last):
File “aruco_tester.py”, line 53, in
gray_img = cv2.cvtColor(frame_np,cv2.COLOR_BGR2GRAY)
TypeError: src data type = 17 is not supported


#6

@Huang

Hmm that is odd.

  1. Are you converting the image to a np array right before line 53?
  2. Did you confirm with the mjgp_streamer that the camera is actually working? If the camera isn’t returning an actual image I bet the code would error at that point.