The action_publisher is the bridge between the RL policy and MAVROS. The policy produces an action tensor (typically normalized 3-DOF velocity in body frame); this node maps it into a geometry_msgs/Twist message and publishes to /mavros/setpoint_velocity/cmd_vel_unstamped. It’s a thin layer, but it’s where action-space conventions are enforced — clipping, scaling, and the body-vs-world-frame choice all live here.
Current status: the node lives in the simulation/src/drone_sim/drone_sim/action_publisher.py file in the source tree. The reference page is intentionally short — most of the implementation detail is in the RL training stack, not in this node.
Inputs:
- Policy action (NumPy array, shape (3,), range [-1, 1]) — published on
/policy/actionby the inference node. - Drone state (for safety clipping) —
/mavros/state,/mavros/local_position/pose.
Outputs:
/mavros/setpoint_velocity/cmd_vel_unstamped(geometry_msgs/Twist) — body-frame velocity command.
Where to go next
- Takeoff node v7 — the FSM that decides when the action publisher’s output is even valid
- MAVROS theory — what
setpoint_velocitymeans on the ArduPilot side - Setpoint vs takeoff rules — why velocity commands have phase dependencies