feat(carla_autoware): add interface to easily use CARLA with Autoware #6859
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Code Health of new files: 7.35
- Declining Code Health: 28 findings(s) 🚩
Details
🚩 Declining Code Health (highest to lowest):
- Low Cohesion carla_data_provider.py
- Lines of Code in a Single File carla_data_provider.py
- Complex Conditional carla_data_provider.py: CarlaDataProvider.request_new_actors
- Overall Code Complexity carla_data_provider.py
- Deep, Nested Complexity carla_data_provider.py: CarlaDataProvider.request_new_actors
- Complex Method carla_ros.py: carla_ros2_interface.init
- Large Method carla_wrapper.py: SensorWrapper.setup_sensors
- Complex Method carla_data_provider.py: CarlaDataProvider.request_new_actors
- Complex Method carla_data_provider.py: CarlaDataProvider.create_blueprint
- Complex Method carla_autoware.py: InitializeInterface.load_world
- Complex Method carla_data_provider.py: CarlaDataProvider.request_new_actor
- Complex Method carla_data_provider.py: CarlaDataProvider.handle_actor_batch
- Complex Method carla_data_provider.py: CarlaDataProvider.on_carla_tick
- Complex Method carla_data_provider.py: CarlaDataProvider.register_actor
- Complex Method carla_data_provider.py: CarlaDataProvider.request_new_batch_actors
- Bumpy Road Ahead carla_data_provider.py: CarlaDataProvider.create_blueprint
- Bumpy Road Ahead carla_data_provider.py: CarlaDataProvider.request_new_actors
- Complex Method carla_data_provider.py: CarlaDataProvider.cleanup
- Bumpy Road Ahead carla_autoware.py: InitializeInterface.load_world
- Bumpy Road Ahead carla_data_provider.py: CarlaDataProvider.request_new_batch_actors
- Bumpy Road Ahead carla_ros.py: carla_ros2_interface.init
- Bumpy Road Ahead carla_autoware.py: InitializeInterface.run_bridge
- Excess Number of Function Arguments carla_data_provider.py: CarlaDataProvider.request_new_actor
- Excess Number of Function Arguments carla_data_provider.py: CarlaDataProvider.request_new_batch_actors
- Bumpy Road Ahead carla_data_provider.py: CarlaDataProvider.get_road_lanes
- Bumpy Road Ahead carla_data_provider.py: CarlaDataProvider.request_new_actor
- Bumpy Road Ahead carla_data_provider.py: CarlaDataProvider.cleanup
- Excess Number of Function Arguments carla_data_provider.py: CarlaDataProvider.create_blueprint
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
InitializeInterface.load_world has a cyclomatic complexity of 11, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
InitializeInterface.load_world has 3 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
InitializeInterface.run_bridge has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
carla_ros2_interface.__init__ has a cyclomatic complexity of 10, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
carla_ros2_interface.__init__ has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Lines of Code in a Single File
This module has 602 lines of code, improve code health by reducing it to 600. The number of Lines of Code in a single file. More Lines of Code lowers the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Low Cohesion
This module has at least 10 different responsibilities amongst its 50 functions, threshold = 4. Cohesion is calculated using the LCOM4 metric. Low cohesion means that the module/class has multiple unrelated responsibilities, doing too many things and breaking the Single Responsibility Principle.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
CarlaDataProvider.request_new_actors has a cyclomatic complexity of 21, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
CarlaDataProvider.create_blueprint has a cyclomatic complexity of 20, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
CarlaDataProvider.request_new_actor has a cyclomatic complexity of 13, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
CarlaDataProvider.handle_actor_batch has a cyclomatic complexity of 12, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
CarlaDataProvider.on_carla_tick has a cyclomatic complexity of 11, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
CarlaDataProvider.register_actor has a cyclomatic complexity of 11, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
CarlaDataProvider.request_new_batch_actors has a cyclomatic complexity of 10, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
CarlaDataProvider.cleanup has a cyclomatic complexity of 9, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
CarlaDataProvider.request_new_actors has 2 complex conditionals with 4 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
CarlaDataProvider.create_blueprint has 4 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
CarlaDataProvider.request_new_actors has 4 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
CarlaDataProvider.request_new_batch_actors has 3 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
CarlaDataProvider.get_road_lanes has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
CarlaDataProvider.request_new_actor has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
CarlaDataProvider.cleanup has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 4.06 across 50 functions. The mean complexity threshold is 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Deep, Nested Complexity
CarlaDataProvider.request_new_actors has a nested complexity depth of 4, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Excess Number of Function Arguments
CarlaDataProvider.create_blueprint has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.