I integrated ROS2 layer in imx93 yocto build and I am running below python script from ROS2 that stream fix video im rviz, But I am getting lagging in playing video on RVIZ, If I am doing same thing from x86 and run same file, I am not getting lag,
Here I am attaching my python script that is streaming on rviz on particular topic, Can anyone tell me reason of lagging, As per my understanding most probably it is using more CPU(RAM) that I checked by taking ssh, but after running script cpu usage goes upto 53% and than ssh stuck. Can I optimize script or what can I update so I can smoothly play on rviz.
Hello @dhruvinrajpura
I hope you are doing very well.
As you know, the i.MX93 has not GPU/VPU to do a hardware acceleration, so, instead using FFmpeg with software decode, and it will take a lot of CPU.
You can try to reduce the resolution. Time ago I did a test reproducing Video on the i.MX93 in 1080p but it takes a lot of CPU and video played with "LAG" (about of 3 fps).
Reducing the video to 360p or 480p I could get 30 FPS.
Please try it and share your results.
Best regards,
Salas.
Thanks for answer @Manuel_Salas
Can you provide me updated script?