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

feat(perception): simplified configuration for perception index #351

Merged
merged 12 commits into from
Oct 4, 2023

Conversation

kschrab
Copy link
Contributor

@kschrab kschrab commented Sep 13, 2023

Description

Simplifies the configuration of perception indexes.

old config:

{
    "perceptionConfiguration": {
        "vehicleIndex": {
            "type": "VehicleTree",
            "splitSize": 10,
            "maxDepth": 2
        },
        "trafficLightIndex": {
            "type": "TrafficLightTree"
        },
        "wallIndex": {
            "type": "WallTree"
        }
    }
}

new config:

{
    "perceptionConfiguration": {
        "vehicleIndex": {
            "enabled": true,
            "type": "tree",
            "splitSize": 10,
            "maxDepth": 2
        },
        "trafficLightIndex": {
            "enabled": true
        },
        "wallIndex": {
            "enabled": true
        }
    }
}

For a simple configuration with default values this can be used:

{
    "perceptionConfiguration": {
        "vehicleIndex": {
            "enabled": true
        },
        "trafficLightIndex": {
            "enabled": true
        },
        "wallIndex": {
            "enabled": true
        }
    }
}
  • Naive implementations based on for-loops have been removed completely. Instead tree-based implementations are used per default.
  • Configuration classes do not interfere with index implementations anymore.
  • Vehicle index is still exchangeable by choosing between "tree", "grid", or "sumo" implementation.
  • All index implementations can be enabled/disabled per config. They are all disabled per default.
  • Performance measurement option has been removed.
  • Barnim is provided with a example application_config.json showcasing the simple perception configuration.
  • Use parametrized test instead of repeating test methods in SimplePerceptionModuleTest

Issue(s) related to this PR

  • Resolves internal issue #586

Affected parts of the online documentation

Changes in the documentation required?

Yes, will be provided with a separate merge request.

Definition of Done

Prerequisites

  • You have read CONTRIBUTING.md carefully.
  • You have signed the Contributor License Agreement.
  • Your GitHub user id is linked with your Eclipse Account.

Required

  • The title of this merge request follows the scheme type(scope): description (in the style of Conventional Commits)
  • You have assigned a suitable label to this pull request (e.g., enhancement, or bugfix)
  • origin/main has been merged into your Fork.
  • Coding guidelines have been followed (see CONTRIBUTING.md).
  • All checks on GitHub pass.
  • All tests on Jenkins pass.

Requested (can be enforced by maintainers)

  • New functionality is covered by unit tests or integration tests. Code coverage must not decrease.
  • If a bug has been fixed, a new unit test has been written (beforehand) to prove misbehavior
  • There are no new SpotBugs warnings.

Special notes to reviewer

* use separate configuration class instead of inferring index implementations with configuration
* removed simple index implementation based on for-loops, keep tree,grid,sumo as vehicle index implementations
* removed measurement of index performance
* simplified configuration of indexes, e.g. by enabling/disabling them via config option
* use tree implementation for vehicle index by default
* all indexes are disabled by default
* use parametrized test instead of repeating test methods in SimplePerceptionModuleTest

Signed-off-by: Karl Schrab <[email protected]>
Signed-off-by: Karl Schrab <[email protected]>
@kschrab kschrab added the enhancement New feature or request label Sep 13, 2023
@kschrab kschrab requested a review from schwepmo September 13, 2023 14:36
Copy link
Contributor

@schwepmo schwepmo left a comment

Choose a reason for hiding this comment

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

Overall a good quality of life improvement. I added some suggestions and discussions.

Signed-off-by: Karl Schrab <[email protected]>
@kschrab kschrab requested a review from schwepmo September 15, 2023 07:46
Signed-off-by: Karl Schrab <[email protected]>
@kschrab kschrab requested a review from rprotzmann September 19, 2023 14:26
Signed-off-by: Karl Schrab <[email protected]>
@schwepmo schwepmo self-requested a review October 4, 2023 13:06
@schwepmo schwepmo merged commit 3551890 into main Oct 4, 2023
@schwepmo schwepmo deleted the 586-simplify-perception branch October 4, 2023 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants