Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update IDL-Parser #74

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from
Open

Update IDL-Parser #74

wants to merge 19 commits into from

Conversation

pablogs9
Copy link
Member

@pablogs9 pablogs9 commented Dec 5, 2023

No description provided.

Copy link
Contributor

@Ryanf55 Ryanf55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to support user-defined array sizes works great!

@srmainwaring
Copy link

@pablogs9, there may be an issue with this change which I had not picked up when using on macOS.

When using the feature/v3 branch to build the ArduPilot AP_DDS library there are errors such as the one below that do not appear in master. On macOS these do not cause the build to fail, and the generated code appears to work as expected. On Ubuntu the error is causing a build failure.

Loading templates...
Processing the file /Users/rhys/Code/ros2/humble/ros2-ardupilot/src/ardupilot/libraries/AP_DDS/Idl/sensor_msgs/msg/BatteryState.idl...
Generating Type definition files...
Adding dependency project /Users/rhys/Code/ros2/humble/ros2-ardupilot/src/ardupilot/libraries/AP_DDS/Idl/sensor_msgs/msg/Header.idl
Processing the file /Users/rhys/Code/ros2/humble/ros2-ardupilot/src/ardupilot/libraries/AP_DDS/Idl/sensor_msgs/msg/Header.idl...
clang: error: no such file or directory: '/Users/rhys/Code/ros2/humble/ros2-ardupilot/src/ardupilot/libraries/AP_DDS/Idl/sensor_msgs/msg/Header.idl'
clang: error: no input files
ERROR<callPreprocessor>: Preprocessor return an error 1
Adding dependency project /Users/rhys/Code/ros2/humble/ros2-ardupilot/src/ardupilot/libraries/AP_DDS/Idl/sensor_msgs/msg/Time.idl
Processing the file /Users/rhys/Code/ros2/humble/ros2-ardupilot/src/ardupilot/libraries/AP_DDS/Idl/sensor_msgs/msg/Time.idl...
clang: error: no such file or directory: '/Users/rhys/Code/ros2/humble/ros2-ardupilot/src/ardupilot/libraries/AP_DDS/Idl/sensor_msgs/msg/Time.idl'
clang: error: no input files
ERROR<callPreprocessor>: Preprocessor return an error 1

@pablogs9
Copy link
Member Author

Could you provide instructions for replicating your issue @srmainwaring ?

@srmainwaring
Copy link

Could you provide instructions for replicating your issue @srmainwaring ?

The message was obtained when building ArduPilot (master branch) with DDS enabled, and this patch applied to the build of microxrcegen that is use in the build process. After following the usual ArduPilot setup instructions (https://ardupilot.org/dev/docs/building-the-code.html) the command to build is:

./waf configure --board sitl --enable-dds
./waf build

On macOS the errors are raised but the build continues. On the Ubuntu 22.04.03 arm64 server (docker) I was using to cross compile for RPi4. the build errors cause the build to fail.

@pablogs9
Copy link
Member Author

@srmainwaring check 8bf8689, also you will need to add the root include path of your IDLs folder using using the argument -I [your include path]

@srmainwaring
Copy link

srmainwaring commented Feb 16, 2024

@pablogs9 - thanks for the patch. It has fixed the issue as far as I can tell.

The attached archive contains two docker files I used for testing in addition to running on macOS. The first is a base image, the second builds ArduPilot with DDS and applies the patch to the microxrcegen and runs that with a branch of ArduPilot using the new feature. Instructions for building in the docker files.

Dockerfiles.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants