Drone Camera Hardware Encoding Error in Gazebo

Hi,

I’m using PX4 with ROS2 Humble and Gazebo Harmonic on Ubuntu 22.04. My GPU is an RTX 4060Ti. I’ve been able to successfully stream images from the simulated camera on the x500_gimbal, but whenever I launch the gazebo simulation using:

PX4_GZ_MODEL_POSE=“200, 265, 0, 1.15, 0, 0” PX4_GZ_WORLD=baylands make px4_sitl gz_x500_gimbal

I get:

[Err] [GstCameraSystem.cpp:285] NVIDIA H.264 encoder not available, falling back to software encoder

I understand this is technically a ‘non-issue’ since everything ‘works’, but I just want to make sure I’m not doing anything wrong here. I know it’s an issue specific to the camera drones because the regular x500 doesn’t produce this error message.

Any insight would be greatly appreciated!

This message should probably be a warning and not an error. It’s just a warning to users that the hardware encoder is not being used.

Gotcha, thanks! Is there any way to use it? Not that I need to necessarily but I’d like to know more.

You need to have the nvh264enc gstreamer element available on your system. You can use gst-inspect to see if you have it

Seems like something I can’t install? I’ve downloaded the Nvidia Codec SDK and I think it’s supposed to be part of the gst-plugins-bad but I can’t get it to install to where gst-inspect-1.0 | grep nvenc recognizes it.

Might not work if your PC isn’t using your nvidia graphics card. It works on my machine

jake@jake:~$ gst-inspect-1.0 | grep nvh264enc
nvcodec:  nvh264enc: NVENC H.264 Video Encoder
jake@jake:~/code/jake/PX4-Autopilot$ prime-select query
nvidia

I’m really not sure what happened, but after running those two commands I got the same output and now the error has disappeared. Thank you so much!