Hello, Have anybody already tried to use the GPU of the raspberry pi in order to retreive the h264 motion vector and thus achieving optical flow without using any CPU power ?
We have a python script that does it but don’t know how to merge it in the ardupilot code.
If a native C solution already exists, better use it but if not how could we use our code inside ardupilot for it ?
@anemos - very interesting, can you share the script? Would be interesting to see and play around with.
You’re not going to get python merged with the ardupilot code (c++), so it would either have to be translated in c++ or possibly just kept separate in a companion computer.
It was meant to be run in a separate microcomputer, apply a low pass filter to the motion vector result, get the lidar range value and pass the corresponding filtered result to the flight controler for flight stabilisation.
All of that could be greatly simplified if all could be done by ardupilot natively. I don’t know why the python code could not be transformed in C++.
optical flow could be realy more useful if it was able to get podometric value not only on the XY plane but also in the Z direction (vertical axis). This could be achieved if the raspi cam was mounted on a small gimbal.
Hi anemos, have you succeed merging the pi camera code with ardupilot? I am doing the similar task. With the raspi camera code written in C, I want to merge it with ardupilot. Could you tell me how to make it? Thanks!