Unable to directly access motor controls using Actuator Control (Gazebo classic)

Hi, I’m doing a research on quadcopter control system and trying to simulate a quadcopter by directly injecting actuator_control_0 to the simulation to evaluate a controller model.

Currently I’m using the latest version of PX4-Autopilot I can find on github and able to do a simulation smoothly with gazebo-classic using manual control by joystick. And I’m also able to receive some uORB topics to ROS2 with micro XRCE Agent

The problem is, whenever I’m trying to publish VEHICLE_CMD_DO_SET_ACTUATOR from VehicleCommand (using /fmu/in/vehicle_command topic), the motor won’t do anything even though I have set all the control index to 1. I have tried to arm the vehicle first using the same message, the propeller spins, but not reacting to the actuator signal I’ve sent, which indicates that the motor only react to arm commands.

I have tried to publish actuator control to other topics, such as /fmu/in/actuator_motors with the maximum value of 1. The result is still the same, motors are unable to spin faster.

The problem keeps getting weird once I tried using QGroundControl to simulate actuator testing that directly access the nsh command from PX4-Autopilot/src/systemcmds/actuator_test/actuator_test.cpp at d25938698715dbb6a10e0891471c33a08687bf85 · PX4/PX4-Autopilot · GitHub , the motor won’t even move a bit, with or without arming.

Does anyone have any idea to control actuator control directly? I don’t mean PWM outputs, just a pure control output which ranges from -1 to 1 in roll, pitch, yaw, and thrust format.

Thanks

1 Like