1

I'm working on a project with the NAO6 robot, Choregraph 2.8.7.4 and naoqi 2.8.7.4 in python.

The objective is to perform computer vision related operations on what the robot sees from the frontal camera (mainly body posture tracking) on real time, while he's doing his normal activities (autonomous mode has to stay on). The stream has to be sent to a server running on the local network that performs the body posture tracking.

My problem is that I'm unable to easily access the camera stream with a correct image quality and framerate.

The official documentation of naoqi only let me get images and not a stream, using the getimagelocal or getimageremote functions, which gives a very poor framerate.

I found some other ways to achieve it maybe using a ROS, or execute gstream on the robot. As the program is to be used by non IT and non Dev people, i'm looking for something they can use in Choregraph (even if it is a python box i have to make for them).

Does anyone know how i could achieve it ?

Thank you for your time.

fluxt
  • 11
  • 2

1 Answers1

0

Try with GStreamer like explained here.

Call the commands from a Choregraphe box with os.spawnvp.

Make sure to kill the child process as the box unloads.

Why spawnvp and not subprocess.Popen? Because subprocess.Popen does an os.execvpe and by doing so it replicates the states of the mutexes of the current process (the big interpreter of the Choregraphe behaviors!) in the new process, and by doing so may create a new process that is in a deadlock at birth. Sometimes - rarely - it results in zombie child processes that don't work at all.

Victor Paléologue
  • 2,025
  • 1
  • 17
  • 27
  • Hello, thanks for your answer. Unfortunately this only works for the camera in nao's mouth and not the one on his forhead that i need to use as it is always busy (probably used by autonomous mode of nao, that's why they disable it in the example you cited) – fluxt Jun 08 '23 at 13:25