Skip to content

mission syntax validation#639

Open
EthanMBoos wants to merge 8 commits intoUbuntu-24.04from
mission-file-validation
Open

mission syntax validation#639
EthanMBoos wants to merge 8 commits intoUbuntu-24.04from
mission-file-validation

Conversation

@EthanMBoos
Copy link
Copy Markdown
Collaborator

No description provided.

@EthanMBoos EthanMBoos force-pushed the mission-file-validation branch from 7bfa9e0 to c9688ee Compare April 7, 2026 21:26
@EthanMBoos EthanMBoos self-assigned this Apr 7, 2026
@EthanMBoos EthanMBoos force-pushed the mission-file-validation branch from c9688ee to 6f06262 Compare April 8, 2026 17:07
}

// autonomy0, autonomy1, ...
for (int i = 0; ; ++i) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we're doing validation work on these items can we also store them with the plugin's real name instead of autonomy0? Might require you to go a bit higher up in the parsing structure but a struct of some kind that holds: Plugin name, plugin order, and any other metadata would be a good thing to store for plugins in general. We have another system that parses this and edits params and right now plugin params are changes by adding a param to "autonomy0, 1, etc" which is not ideal since the ordering of plugins affects that name. If we can standardize by a guaranteed unique identifier then we're one step closer to breaking out of that paradigm

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

You sneaky man. I thought this was a simple front-end "check some syntax" easy-peasy quality of life improvement.

I went off the deep end and just did the whole refactor. The higher up I went, the more there was to change... all hardcoded autonomy0,1 control0,1 ...

@EthanMBoos EthanMBoos force-pushed the mission-file-validation branch from 54250f0 to 6bd69da Compare April 10, 2026 19:09
@EthanMBoos EthanMBoos force-pushed the mission-file-validation branch 2 times, most recently from 331c542 to 8af217c Compare April 10, 2026 19:09
@EthanMBoos
Copy link
Copy Markdown
Collaborator Author

EthanMBoos commented Apr 10, 2026

I removed the ability to override plugins at runtime through GenerateEntity. If you try to set autonomy or controller via entity_param, it'll warn you and ignore it now. I didn't see any usage in the Scrimmage repo — the only real usage was for things like color, not plugin names. The docs made it look like it worked, but it was dead code adding complexity. If you need different plugin setups, just make separate entity templates.

<!-- Fast version -->
<entity tag="fast_uav">
  <count>0</count>
  <autonomy speed="30">Straight</autonomy>
  <controller>SimpleAircraftControllerPID</controller>
  ...
</entity>

<!-- Slow version -->
<entity tag="slow_uav">
  <count>0</count>
  <autonomy speed="10">Straight</autonomy>
  <controller>SimpleAircraftControllerPID</controller>
  ...
</entity>

Set count=0 so they don't spawn automatically

msg->data.set_entity_tag("fast_uav");  // spawns the fast one
// or
msg->data.set_entity_tag("slow_uav");  // spawns the slow one

@EthanMBoos EthanMBoos force-pushed the mission-file-validation branch 2 times, most recently from ab988dd to 48603b3 Compare April 11, 2026 09:52
@EthanMBoos EthanMBoos force-pushed the mission-file-validation branch from 48603b3 to e7e5c69 Compare April 11, 2026 09:52
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.

2 participants