Controlling Motors/Servos via actuator_control Messages from ROS

I tried to control the servo via actuator_control message but it cannot work


I am thinking whether I need to switch to offboard and arm mode beforehand.
However, I tested the servo indoor and there is no GPS.
The offboard mode (default: GPS position) cannot be triggered indoor.

How could I test the servo indoor?
There is my servo.py and mavros_offboard_posctl.py.
The code is written and referenced to the official offboard control python script.

Thank you very much for any suggestion