PX4 Neural Network Module

Hello everyone,

I am trying to train my own network for multicopter neural control module. Is it possible to use the data in ulog files? In the documentation, it says, “All the inputs gathered from the aerial gym simulator are transformed from the NED representation to the ENU one.” So this translational difference would create a problem?

Best regards.

Hi

Yes, ulog data can be used for training a neural network controller — it contains all relevant signals (sensor data, estimated states, control inputs).

PX4 uses NED (North-East-Down), while some tools (e.g. Aerial Gym) use ENU (East-North-Up). This is just a frame convention issue. As long as you convert consistently, it won’t be a problem.

Thanks for your answer.
However, I didn’t understand a point. If I train the model in an environment that uses NED frame representation and then simulate at the same environment, won’t the frame difference create a problem? Because the module will try to convert frame representation from ENU to NED which is already NED.

No problem — the ENU→NED conversion is only applied when the source data is ENU. If your training and simulation are both in NED, no conversion happens, so the network sees consistent frames. Just make sure you don’t apply the conversion twice.

Hi, there is no problem training a network in a NED environment, so the network uses NED observations. The module however, tranforms the NED observations from PX4 into ENU before feeding it to the neural network. So you would have to change this function in your firmware to feed NED observations directly.

If you have any trouble with this please reach out to me: sindre.hegre@gmail.com. I could add a parameter to the module to choose what representation to feed into the neural network, but the module is most a demonstration of how you could do it, so my guess was that most people would want different inputs to their neural network anyways. So they should just change the relevant functions themselves.

Good luck!

This is not exactly correct, the conversion happens in the PX4 module when taking the NED observations from PX4 and transforming them into ENU before feeding them to the neural network. So if the input function is not changed it will probably cause a problem

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.