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

Dds goal pub scripting dependency #29014

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Ryanf55
Copy link
Collaborator

@Ryanf55 Ryanf55 commented Jan 5, 2025

#29009 (comment)

Tests Performed:

./waf configure --board sitl --enable-dds --disable-scripting
nice ./waf plane

A bit back on master, specifically on commit 87b0de7, if you tried that, you got:
image

Now, it compiles as expected.

@@ -176,6 +176,8 @@ class AP_Vehicle : public AP_HAL::HAL::Callbacks {
virtual bool start_takeoff(const float alt) { return false; }
// Method to control vehicle position for use by external control
virtual bool set_target_location(const Location& target_loc) { return false; }
// Get target location for use by external control
virtual bool get_target_location(Location& target_loc) { return false; }
Copy link
Collaborator Author

@Ryanf55 Ryanf55 Jan 5, 2025

Choose a reason for hiding this comment

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

Every function called by DDS that was only enabled by scripting should always be moved into this block.
Otherwise, if you disable scripting and enable DDS, you can't compile. The reason it wasn't moved earlier was oversight. We could catch this in a build with scripting disabled and DDS enabled.

@peterbarker
Copy link
Contributor

I was expecting to see a patch to AP_DDS_config.h such that AP_DDS_GOAL_PUB_ENABLED defaults to "off" if !AP_SCRIPTING_ENABLED.

Without that patch this is not NFC. Is that intentional?

@Ryanf55
Copy link
Collaborator Author

Ryanf55 commented Jan 6, 2025

to see a patch t

The PR today was not following our previous patterns. Upon further inspection, I realized this is the proper patch IF we want to follow the current patterns.

DDS does not depend on scripting. They should always be independent, and AP should compile with neither enabled, with either enabled, or both enabled.

I do not think making DDS depend on scripting is a good idea.

Copy link
Contributor

@srmainwaring srmainwaring left a comment

Choose a reason for hiding this comment

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

Changes also required to AP_DDS_Client.h and AP_DDS_Topic_Table.h.

See: https://github.com/srmainwaring/ardupilot/tree/dds-goal-pub-scripting-dependency.

(tried force pushing changes but permission denied).

Looks ok with the additional change. Tested build and execution on esp32empty with DDS enabled.

@Ryanf55 Ryanf55 force-pushed the dds-goal-pub-scripting-dependency branch from ba5cfe1 to 778604e Compare January 6, 2025 15:50
Copy link
Contributor

@srmainwaring srmainwaring left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants