Connecting a servo motor for controlling forward facing camera. help needed

Hi, In order to make an autonomous drone, I need to implement a one-axis gimbal for the camera. Can pixhawk 2.4.8 (with px4 > 1.9.0) do this automatically? I can’t buy and put available gimbals since they are heavy and costly.
I’ll also have a companion computer onboard (Jetson Nano or raspberry pi) so should I implement it using ROS (my project already involves using ROS and some other libraries). Has anyone done something similar? Can you share your answers with me?

Hello! I am doing such thing now.
px4 can control servo gimbal through AUX ports. Related params is
And here some docs

Thanks a lot. Your help is appreciated.