• AutonomousHansen's avatar
    Adds method for simulation CLI arguments to the `AppLauncher` class (#160) · 39f95498
    AutonomousHansen authored
    # Description
    
    Adds `add_app_launcher_args` function to the `AppLauncher` class, which
    can be used to add AppLauncher-specific arguments to an existing
    ArgumentParser instance.
    
    Because everything we pass is then passed to SimulationApp as a config,
    the MR also adds the `check_config()` function. This compares the key
    values of a dict and raises a ValueError in the following cases:
    * if they have a key reserved for a SimulationApp config parameter but
    incorrect value types
    * if the value type is correct, it informs the user if a dict item they
    passed will be interpreted as a SimulationApp config parameter.
    Non-SimulationApp relevant keys are cleaned from the dict before it is
    passed to SimulationApp.
    
    Also separated out the giant `AppLauncher.__init__` function into a few
    sub-functions to make things more readable.
    
    ## Type of change
    
    - New feature (non-breaking change which adds functionality)
    
    ## Checklist
    
    - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
    `./orbit.sh --format`
    - [x] I have made corresponding changes to the documentation
    - [x] My changes generate no new warnings
    - [x] I have added tests that prove my fix is effective or that my
    feature works
    - [x] I have updated the changelog and the corresponding version in the
    extension's `config/extension.toml` file
    
    ---------
    Signed-off-by: 's avatarAutonomousHansen <50837800+AutonomousHansen@users.noreply.github.com>
    Co-authored-by: 's avatarMayank Mittal <mittalma@leggedrobotics.com>
    39f95498
CHANGELOG.rst 23.4 KB