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(simple_planning_simulator): add VGR sim model #8415

Merged
merged 4 commits into from
Aug 22, 2024

add const

3696f5f
Select commit
Loading
Failed to load commit list.
Merged

feat(simple_planning_simulator): add VGR sim model #8415

add const
3696f5f
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Aug 20, 2024 in 49s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.26 (8.12 -> 7.85)

  • Declining Code Health: 9 findings(s) 🚩

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Large Method simple_planning_simulator_core.cpp: SimplePlanningSimulator::SimplePlanningSimulator
  • Large Method test_simple_planning_simulator.cpp: TEST_P
  • Large Method simple_planning_simulator.launch.py: launch_setup
  • Complex Conditional sim_model_actuation_cmd.cpp: SimModelActuationCmd::getActuationStatus
  • Complex Method simple_planning_simulator_core.cpp: SimplePlanningSimulator::initialize_vehicle_model
  • Bumpy Road Ahead simple_planning_simulator_core.cpp: SimplePlanningSimulator::initialize_vehicle_model
  • Bumpy Road Ahead sim_model_actuation_cmd.cpp: SimModelActuationCmd::getActuationStatus
  • Complex Method sim_model_actuation_cmd.cpp: SimModelActuationCmd::calcModel
  • Complex Method sim_model_actuation_cmd.cpp: SimModelActuationCmd::getActuationStatus

Annotations

Check warning on line 113 in simulator/simple_planning_simulator/launch/simple_planning_simulator.launch.py

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Large Method

launch_setup increases from 91 to 92 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check warning on line 357 in simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

SimplePlanningSimulator::initialize_vehicle_model increases in cyclomatic complexity from 14 to 18, 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.

Check warning on line 179 in simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Large Method

SimplePlanningSimulator::SimplePlanningSimulator increases from 104 to 109 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check warning on line 357 in simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

SimplePlanningSimulator::initialize_vehicle_model 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.

Check warning on line 301 in simulator/simple_planning_simulator/src/simple_planning_simulator/vehicle_model/sim_model_actuation_cmd.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

SimModelActuationCmd::calcModel increases in cyclomatic complexity from 11 to 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.

Check warning on line 391 in simulator/simple_planning_simulator/src/simple_planning_simulator/vehicle_model/sim_model_actuation_cmd.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Method

SimModelActuationCmd::getActuationStatus 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.

Check warning on line 361 in simulator/simple_planning_simulator/src/simple_planning_simulator/vehicle_model/sim_model_actuation_cmd.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Conditional

SimModelActuationCmd::getActuationStatus has 1 complex conditionals with 2 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.

Check warning on line 391 in simulator/simple_planning_simulator/src/simple_planning_simulator/vehicle_model/sim_model_actuation_cmd.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

SimModelActuationCmd::getActuationStatus 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.

Check warning on line 342 in simulator/simple_planning_simulator/test/test_simple_planning_simulator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Large Method

TEST_P increases from 80 to 95 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.