Skip to content

Conversation

@afsafzal
Copy link
Member

Generates missions based on provided template. The template is provided as a str which is a list of command templates separated by -. A command template has the following format:

<COMMAND_NAME>(<FIXED PARAMETERS>)^<NUMBER OF REPEATS>

Example:

TAKEOFF(alt: 5.2)^2

Which represents two TAKEOFF commands with parameter alt set to 5.2.
Providing the parameters are optional. If not provided they will be generated by random.
Providing the number of repeats is optional. If not provided it will be set to 1. If set to * it means number of repeats could be determined dynamically and could be between 0 to maximum allowed.
If command name is set to . the template considers all possible commands.

A full template example:

TAKEOFF(alt:4.2)-.^*-LAND-.^1-LOITER(lon:0.0, lat:0.0)-.^*"

A single TAKEOFF command with parameter alt set to 4.2 is followed by 0 or more commands, followed by a single LAND command (with random parameters), followed by a single command (picked randomly from all possible commands), followed by a single LOITER command with two fixed parameters, and finally followed by 0 or more random commands.

@coveralls
Copy link

coveralls commented Jul 31, 2019

Coverage Status

Coverage decreased (-0.1%) to 44.959% when pulling a11b09b on afsafzal:templatebased-mission-generator into 088cb52 on squaresLab:master.

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