Actuator Controls - Clarification

Hi, I have my own simulation software which I am passing HITL data to a PX4 operating in SITL mode. According to this website Simulation · PX4 Developer Guide I am passing the required HITL_* message to the PX4 via UDP/MAVLink.

For configuration I am using an Octocopter-X mixer and Ive set SYS_AUTOSTART to 8001 in the parameters file. This is read by the SITL PX4.

I receive back actuator controls over UDP in my own simulator and therefore the actuator controls. I have two questions:

  1. Do the actuator outputs match the airframe reference for 8001 here if I’m using ROMFS/px4fmu_common/mixers/octo_x.main.mix and setting SYS_AUTOSTART to 8001?

  2. Can someone explain to me in depth the -1 to 1 range for actuator outputs? I realize somewhere in the PX4 software that it is converted to PWM, but I need to do the same thing in my engine model, or at least map it to RPMs. Is -1 spinning the rotor in reverse, 0 neutral, 1 spinning rotor in normal direction? The MAVLink definition is not very helpful (http://mavlink.org/messages/common#HIL_ACTUATOR_CONTROLS)

Appreciate any clarification.

Hi,

Here is the mixer file: https://github.com/PX4/Firmware/blob/84c79c403a15edbbd294972135b508ba89c88d68/src/lib/mixer/mixer_multirotor.cpp#L159-L159

Yes, thank you. That file only shows how mixer values are calculated and bounded with settings from the *.mix file you give in the parameters file.

I’m interested in getting those values converted to PWM signals and how they map to the motors based on the airframe references.

Does the mixer assume the engine can turn both clockwise and counter-clockwise?

Ah sorry, I generally work on a code base that handles these things completely differently. Is this closer to what you are looking for?