Hello!
I’m new on the forum, please tell me if my topic exists already.
I started this year to use the poppy-ergojr for a project in class.
I didnt meet any difficulties in using the motors for all of the moving functionalities, but i need to set the camera as ‘dummy’ before using the robot. As i would like to use the camera to recognize a face or read a qr code, how or where can i set the camera?
I used ‘poppy-configure ergo-jr m1’ to configure the motors, but dont know how to configure the camera.
Thanks for reading
Bonjour!
Je suis nouveau sur le forum, je vous prie de m’indiquer si mon sujet existe déjà.
J’ai commencé à utiliser le poppy ergo jr cette année pour un projet en classe.
Je n’ai pas rencontré de difficulté en utilisant les moteurs pour toutes les fonctionalitées de déplacement, mais j’ai besoin de mettre la caméra en ‘dummy’ avant d’utiliser le robot. Etant donné que j’aimerai utiliser la caméra pour reconnaitre un visage ou lire un qr code, comment ou où puis je configurer la camera?
J’ai utilisé ‘poppy-configure ergo-jr m1’ pour configurer les moteurs, mais je en sais pas comment configurer le moteur.
Every sensors defined on the robot configuration file is needed to start the robot. As the camera is a sensor, it is needed to start the robot. To be able to start the robot even if the camera is not wired, we added another argument on the Robot class camera, which can be set to `dummy’ to spoof a fake camera sensor.
If you have a working camera (Raspberry Pi camera or any USB camera) wired on the robot you don’t need to worry about camera='dummy' ; the camera will be started with the robot.
Sorry for my delayed, i’m not working alone on the PoppyErgoJr and i was overwhelmed when i got it.
First of all thanks for your answer, it gave me the way to solve it.
I tested with another raspberry pi camera and it didnt detect it. But poppy detected my webcam usb wired.
I talked to some people working on poppy about this problem, and they explained to me that the raspberry pi 2 cant detect the rasp camera, only the pi 3 can.
Anyways thanks for the links, i used a lot the camera to recognize somebody and it worked.
The Raspberry Pi camera works on Pi 1, 2 & 3. You have to avoid to plug in if the Raspberry is running, you can cause short-circuits and break the camera.
I was trying out the “Discover your Ergo Jr” notebook, and I came across this part when you get to see the image from the camera:
img = poppy.camera.frame
imshow(img)
I get the following error:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
in ()
1
2 img = poppy.camera.frame
----> 3 imshow(img)
NameError: name 'imshow' is not defined
I tried out your code (importing matplotlib.pyplot) and the error is gone, but what I get is:
<matplotlib.image.AxesImage at 0x63ff77f0>
And not an actual image. Do you know what it could be?