I’m building my own px4 module for Pixhawk 2 and I’m using the Firmware version 1.8.0.
I have added a px4 module to include in the flight stack my own controller. The module contains C++ code obtained from code generation starting from a Simulink model and then modified by hand to link those scripts to uORB. When I proceed to build the customized source code, the process fails when the executable (px4) is linked to the module I added.
Looking at the CMake scripts everything looks correct, since the added module is seen during the configuration, the .a library is created: it seems my module is treated as the default ones. The error redirects to /Firmware/build/platforms/posix/apps.cpp.
The aim is to perform Software in the Loop testing (with jmavsim configured as specified in the .vscode folder you provided in the 1.9.0 version) using as IDE Visual Studio Code.
Where am I wrong?
I’m using posix_sitl_default configuration modified adding my module, and I let CMake decide the kit in VS Code.
Did you manage to solve your problem of module ? I want to add a new module but it doesn’t work. Here is my situation:
I am a student and I am currently working on Dynamic Soaring with PX4 Gazebo.
In order to simulate dynamic soaring, I created a new module named fw_dynamic_soaring in which I compute the energy and the wind gradients. It is just the beginning of the work and I don’t know if it will work after. However, before doing the rest to really do dynamic soaring, I tested if my code is working or not.
So, I launched px4 and I see in the files build/px4_sitl_default/boardconfig that the line “CONFIG_MODULES_FW_DYNAMIC_SOARING=y” has been added and in the file build/px4_sitl_default/px4_boardconfig.h, that the line “#define CONFIG_MODULES_FW_DYNAMIC_SOARING 1” has also been added.
However, in the console, when I write “help”, I don’t see “fw_dynamic_soaring”. And when I type in the MAVLink Console “help”, the command “fw_dynamic_soaring’“ does not appear.
So, I think I missed something but I really don’t understand what. I checked the files Kconfig, fw_dynamic_soaring.cpp and the CmakeLists.txt and everything seems to be good (it is very similar to other modules like “fw_lateral_longitudinal_control”) while it does not seem to be recognized. Does someone have an idea to solve it or have had the same issue ?