How to auto run modules on startup?

Hello everyone.

I am new to the PX4 platform and I have a (very basic, probably) question:

  • When I add a module to the cmake file, it is included in the build process, but how do I make it run automatically on startup?

The thing is, I am trying to add two modules. The first one advertises a new topic and publishes some information asynchronously; and the second one should subscribe to such topic to get such information. I would like to run both modules and to test them using the NuttShell, and this is why I think I need to start both modules on startup. How can I do this?

Thanks in advance!

Have you seen this?

1 Like

Great, that is what I was looking for. Thank you.

Resurrecting this thread. If I want to make the PX4 to start a module by default, but don’t want to upload a ‘extras.txt’ file to the microsd, how shall it be done? How to make it work both for SITL and when running on the board? Thanks!