Regression in 2.1.4 regarding External Module Messages ?

30 views
Skip to first unread message

benjamin....@u-space.fr

unread,
Oct 7, 2022, 11:23:48 AM10/7/22
to Basilisk Forum
Hello all, 

First, I would like to give a huge thanks to the BSK team in boulder for their 2.1.4 release. The build is now twice as fast on my laptop. However there appears to be a snag in the messaging system regarding the inclusion of external modules, and I'm not sure whether the CMakeLists.txt is as minimal as it would need to be :


1. Custom messages defined from ExternalModules/msgPayloadDefC are no longer wrapped in Python. I believe this is due to the new CMakeLists.txt in src/architecture/messaging that doesn''t seem to account for the existence of the custom definitions. Is this a feature of 2.1.4 or a regression?

2. Commenting out add_message_headers() in CMakeLists.txt doesn't appear to change anything to the BSK build outcome. Is this function and its use effectively deprecated ?

Thanks, 
Ben

Hanspeter Schaub

unread,
Oct 7, 2022, 9:34:51 PM10/7/22
to Basilisk Forum
Mm, you are correct that I didn't think of checking external modules being included. That was certainly not intentional and is a regression.  I'm heading out on international travel until later next week though.  If you see what change broke this feature in the mean time, please let me know.  

Shucks....  I did test this a bunch across all three platforms, just didn't think to check with external modules :-(

Chris Roscoe

unread,
Oct 8, 2022, 1:48:06 AM10/8/22
to Basilisk Forum
Ben and HP,

I was just now investigating that behavior and found the same issue. I've been experimenting with a fix and was able to resolve it as follows (in Windows using Visual Studio 2022, I have not tested in Linux yet):

In src\architecture\messaging\CMakeLists.txt, change line 51 to

  COMMAND ${PYTHON_EXECUTABLE} generatePackageInit.py "${CMAKE_BINARY_DIR}/Basilisk/architecture/messaging/" "../../msgPayloadDefC/" "../../msgPayloadDefCpp/" "${EXTERNAL_MODULES_PATH}/msgPayloadDefC/" "${EXTERNAL_MODULES_PATH}/msgPayloadDefCpp/"

insert after line 29

        include_directories("${EXTERNAL_MODULES_PATH}/")

insert after line 23

            "-I${EXTERNAL_MODULES_PATH}/"

replace line 9 with

    file(GLOB_RECURSE message_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/" "../${searchDir}/*Payload.h"
                                                                            "${EXTERNAL_MODULES_PATH}/${searchDir}/*Payload.h")


In src\architecture\messaging\newMessaging.ih change lines 33-35 to (ie remove "architecture/")

#include "folder/messageTypePayload.h"
%}
%include "folder/messageTypePayload.h"


(this is necessary because the external module messages are not nested under the "architecture" folder)

Cheers,

Chris Roscoe
Ten One Aerospace, LLC

Hanspeter Schaub

unread,
Oct 8, 2022, 11:40:57 AM10/8/22
to Basilisk Forum
Howdy Chris,
Thanks for this fix. I just pushed it to `develop`.

Hanspeter Schaub

unread,
Oct 9, 2022, 6:08:16 PM10/9/22
to Basilisk Forum
Pushed another fix that corrected issues with the external module path not being define.  Should be working again now.

Clément Jonglez

unread,
Oct 10, 2022, 4:28:11 AM10/10/22
to Basilisk Forum
Thanks a lot for the fix, the build time for release is now much faster on my Linux computer (7 minutes vs 15-20 before).

However the last fix about the path to ExternalModules/msgPayloadDefC introduced a regression for me: I don't have any messages defined (yet) in my ExternalModules folder, so I don't have a ExternalModules/msgPayloadDefC folder nor a ExternalModules/msgPayloadDefCpp folder. Creating two empty folders with the proper names did the trick, but maybe it's something that could be checked in the CMakeFiles.

Traceback (most recent call last):
  File "generatePackageInit.py", line 17, in <module>
    for filePre in os.listdir(headerInputPath):
FileNotFoundError: [Errno 2] No such file or directory: '/media/yzokras/ssd/git/tubix20-lib/adcs/basilisk/msgPayloadDefC/'
make[2]: *** [architecture/messaging/CMakeFiles/swigtrick.dir/build.make:73: Basilisk/architecture/messaging/__init__.py] Error 1
make[2]: *** Deleting file 'Basilisk/architecture/messaging/__init__.py'
make[1]: *** [CMakeFiles/Makefile2:11191: architecture/messaging/CMakeFiles/swigtrick.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....


Cheers
Clément
Reply all
Reply to author
Forward
0 new messages