added ChannelConfig message for configuration of multi-actuator setups#80
added ChannelConfig message for configuration of multi-actuator setups#80alexcekay wants to merge 1 commit into
Conversation
|
This is great, definitely needed. Can you provided a concrete example? We'd want to make sure this lands in AM32 at the same time. |
|
@dakejahl for sure. SetupA concrete example for a large fixed-wing with a couple of meters wing-span. Node configurationThe user needs to assign an actuator ID to each PX4 CAN Node. This can be done via a parameter or for example HW switches. As an example:
In addition the user has to set a parameter that states that this CAN Node should listen to Flight-controller configurationOn the flight-controller each output function can be assigned a
LogicThe flight-controller uses its parameters to build the correct
In this case the message is: The PX4 Nodes can use this information to see which Mapping two different functions to exactly the same |
1d2fb24 to
a44e063
Compare
a44e063 to
8411852
Compare
|
Dosn't this just move the conplexity from the nodes on to the main flight controller? Is that exactly the oposite of what we should be trying to do? Why not just change the param on the node? Its is posible that the PX4 actuator config makes this more apealing. I dont think it would add anything for AP. |
|
basically yes, this is mostly a configuration topic. In complex systems with a lot of nodes that are produced in mass it's easier to have the configuration centralized. With this and HW DIP switches on the nodes to set the actuator ID one can have an assembly line that does not require to ever connect to one of the nodes and change its configuration. If later the config should be changed it's only required to map differently on the flight controller. Connecting to the nodes individually to change params does not allow producing systems in a quick and easy to repeat manner for non-technical users. The way presented here is repeatable and easy to use, thus avoids an error-prone manual process. Setting params from the flight-controller is also hard as it requires knowing the NodeID and probing for the correct actuator ID to set the correct indexes a node should listen to. For smaller/hobby users or other projects it's of course possible to simply not use/implement this message. |
|
In production settings why not just bake the config into the firmware so you flash once and are done? Again, its possible that this is easy in AP but not in PX4. |
|
Hi @tridge, @peterbarker would also love to hear your opinion regarding this topic. |

Context
This started off as a specific feature needed by our company but I think others could also benefit from it.
The current
ArrayCommandsetup works great for simple setups or in case one can assign individual actuator IDs to each servo. It already gets hard to use when one has a general CAN to PWM board with multiple output channels. As long as just one is used it is ok, but with multiple boards, one needs to use workarounds like introducing some offset parameter or similar.In bigger setups that are produced at scale all of this does not scale well as changing the setup requires connecting to individual servos or individual CAN to PWM boards. To deploy such setups it is easier to set up all nodes once and only change the configuration on the flight controller.
Solution
A new message
ChannelConfigis introduced which originates from the flight controller and is received by servos / CAN to PWM boards. In it, the flight controller can specify which actuator (using its ID) should handle a Command on which of its channels. All of it is 0-based. For example when ArrayCommand contains two commands, it could specify that actuator 0 should handle Command 0 on its channel 0 and actuator 1 should handle Command 1 on its channel 3.This scales well to more complex setups where one has CAN to PWM boards in each wing and tail of a larger fixed-wing. After assigning actuator IDs to each of the nodes, one can dynamically change which node handles what on which channel.
Compatibility
This message is optional. If the flight controller does not send it or an actuator does not react to it, the current behavior stays unchanged. The idea is that the nodes have a parameter that controls whether they react to this message and only process it when enabled. When enabled, they have to wait for one
ChannelConfigbefore processingArrayCommand. The frequency ofChannelConfigcan be very low as it should not change frequently (or at all) after startup.