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

fix: revert accel_brake_map_calibrator #6453

Merged

fix: revert accel_brake_map_calibrator

ac4df24
Select commit
Loading
Failed to load commit list.
Merged

fix: revert accel_brake_map_calibrator #6453

fix: revert accel_brake_map_calibrator
ac4df24
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Feb 19, 2024 in 1m 1s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 53 findings(s) 🚩
  • Improving Code Health: 0 findings(s) ✅
  • Affected Hotspots: 0 files(s) 🔥

Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Conditional accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::timerCallback
  • Complex Method accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::timerCallback
  • Complex Method accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::AccelBrakeMapCalibrator
  • Deep, Nested Complexity calc_utils.py: CalcUtils.create_stat_map
  • Complex Conditional csv_reader.py: CSVReader.removeUnusedData
  • Deep, Nested Complexity new_accel_brake_map_server.py: DrawGraph.view_pedal_accel_graph
  • Deep, Nested Complexity view_plot.py: ViewPlot.view_pedal_accel_graph
  • Lines of Code in a Single File accel_brake_map_calibrator_node.cpp
  • Overall Code Complexity accel_brake_map_calibrator_node.cpp
  • Complex Method accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::updateFourCellAroundOffset
  • Complex Method accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::updateAccelBrakeMap
  • Complex Method new_accel_brake_map_server.py: DrawGraph.get_data_callback
  • Large Method view_statistics.py: ViewPlot.init
  • Complex Method view_plot.py: ViewPlot.view_pedal_accel_graph
  • Complex Method view_plot.py: ViewPlot.init
  • Complex Method new_accel_brake_map_server.py: DrawGraph.view_pedal_accel_graph
  • Complex Method view_plot.py: ViewPlot.load_map
  • Complex Method calc_utils.py: CalcUtils.create_2d_map
  • Complex Method csv_reader.py: CSVReader.removeUnusedData
  • Excess Number of Function Arguments csv_reader.py: CSVReader.removeUnusedData
  • Excess Number of Function Arguments delay_estimator.py: DelayEstimator.plotPedalSpeedAndAccel
  • Excess Number of Function Arguments new_accel_brake_map_server.py: DrawGraph.view_pedal_accel_graph
  • Excess Number of Function Arguments view_plot.py: ViewPlot.view_pedal_accel_graph
  • Primitive Obsession accel_brake_map_calibrator_node.cpp
  • Complex Method new_accel_brake_map_server.py: DrawGraph.load_map
  • Bumpy Road Ahead accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::indexValueSearch
  • Bumpy Road Ahead new_accel_brake_map_server.py: DrawGraph.get_data_callback
  • Excess Number of Function Arguments calc_utils.py: CalcUtils.create_2d_map
  • Bumpy Road Ahead view_plot.py: ViewPlot.view_pedal_accel_graph
  • Bumpy Road Ahead calc_utils.py: CalcUtils.create_2d_map
  • Bumpy Road Ahead calc_utils.py: CalcUtils.create_stat_map
  • Bumpy Road Ahead log_analyzer.py: view_pedal_accel_graph
  • Bumpy Road Ahead accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::updateAccelBrakeMap
  • Bumpy Road Ahead accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::updateTotalMapOffset
  • Bumpy Road Ahead accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::publishMap
  • Bumpy Road Ahead accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::writeMapToCSV
  • Bumpy Road Ahead new_accel_brake_map_server.py: DrawGraph.view_pedal_accel_graph
  • Bumpy Road Ahead new_accel_brake_map_server.py: DrawGraph.load_map
  • Excess Number of Function Arguments calc_utils.py: CalcUtils.lowpass_filter_scipy
  • Bumpy Road Ahead view_plot.py: ViewPlot.load_map
  • Excess Number of Function Arguments plotter.py: Plotter.imshow
  • Excess Number of Function Arguments accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::addLogToCSV
  • Excess Number of Function Arguments plotter.py: Plotter.plot
  • Excess Number of Function Arguments plotter.py: Plotter.scatter
  • Excess Number of Function Arguments plotter.py: Plotter.scatter_color
  • Excess Number of Function Arguments plotter.py: Plotter.plot_text
  • Excess Number of Function Arguments accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::updateEachValOffset
  • Excess Number of Function Arguments accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::updateFourCellAroundOffset
  • Excess Number of Function Arguments accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::executeUpdate
  • Excess Number of Function Arguments accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::calculateEstimatedAcc
  • Excess Number of Function Arguments accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::calculateAccelSquaredError
  • Excess Number of Function Arguments accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::calculateAccelErrorL1Norm
  • Excess Number of Function Arguments accel_brake_map_calibrator_node.cpp: AccelBrakeMapCalibrator::getOccMsg

Annotations

Check warning on line 113 in vehicle/accel_brake_map_calibrator/scripts/calc_utils.py

See this annotation in the file changed.

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

❌ New issue: Complex Method

CalcUtils.create_2d_map 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.

Check warning on line 113 in vehicle/accel_brake_map_calibrator/scripts/calc_utils.py

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

CalcUtils.create_2d_map 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 151 in vehicle/accel_brake_map_calibrator/scripts/calc_utils.py

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

CalcUtils.create_stat_map 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 151 in vehicle/accel_brake_map_calibrator/scripts/calc_utils.py

See this annotation in the file changed.

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

❌ New issue: Deep, Nested Complexity

CalcUtils.create_stat_map 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.

Check warning on line 68 in vehicle/accel_brake_map_calibrator/scripts/calc_utils.py

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

CalcUtils.lowpass_filter_scipy has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 113 in vehicle/accel_brake_map_calibrator/scripts/calc_utils.py

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

CalcUtils.create_2d_map has 9 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 104 in vehicle/accel_brake_map_calibrator/scripts/csv_reader.py

See this annotation in the file changed.

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

❌ New issue: Complex Method

CSVReader.removeUnusedData has a cyclomatic complexity of 16, 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 94 in vehicle/accel_brake_map_calibrator/scripts/csv_reader.py

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

CSVReader.removeUnusedData 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.

Check warning on line 104 in vehicle/accel_brake_map_calibrator/scripts/csv_reader.py

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

CSVReader.removeUnusedData has 11 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 132 in vehicle/accel_brake_map_calibrator/scripts/delay_estimator.py

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

DelayEstimator.plotPedalSpeedAndAccel has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 230 in vehicle/accel_brake_map_calibrator/scripts/log_analyzer.py

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

view_pedal_accel_graph 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.

Check warning on line 238 in vehicle/accel_brake_map_calibrator/scripts/new_accel_brake_map_server.py

See this annotation in the file changed.

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

❌ New issue: Complex Method

DrawGraph.get_data_callback has a cyclomatic complexity of 17, 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 326 in vehicle/accel_brake_map_calibrator/scripts/new_accel_brake_map_server.py

See this annotation in the file changed.

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

❌ New issue: Complex Method

DrawGraph.view_pedal_accel_graph 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.

Check warning on line 355 in vehicle/accel_brake_map_calibrator/scripts/new_accel_brake_map_server.py

See this annotation in the file changed.

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

❌ New issue: Complex Method

DrawGraph.load_map 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.

Check warning on line 238 in vehicle/accel_brake_map_calibrator/scripts/new_accel_brake_map_server.py

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

DrawGraph.get_data_callback 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.

Check warning on line 326 in vehicle/accel_brake_map_calibrator/scripts/new_accel_brake_map_server.py

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

DrawGraph.view_pedal_accel_graph 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 355 in vehicle/accel_brake_map_calibrator/scripts/new_accel_brake_map_server.py

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

DrawGraph.load_map 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 326 in vehicle/accel_brake_map_calibrator/scripts/new_accel_brake_map_server.py

See this annotation in the file changed.

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

❌ New issue: Deep, Nested Complexity

DrawGraph.view_pedal_accel_graph 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.

Check warning on line 326 in vehicle/accel_brake_map_calibrator/scripts/new_accel_brake_map_server.py

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

DrawGraph.view_pedal_accel_graph has 11 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 44 in vehicle/accel_brake_map_calibrator/scripts/plotter.py

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

Plotter.plot has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 47 in vehicle/accel_brake_map_calibrator/scripts/plotter.py

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

Plotter.scatter has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 51 in vehicle/accel_brake_map_calibrator/scripts/plotter.py

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

Plotter.scatter_color has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 86 in vehicle/accel_brake_map_calibrator/scripts/plotter.py

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

Plotter.plot_text has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 106 in vehicle/accel_brake_map_calibrator/scripts/plotter.py

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

Plotter.imshow has 8 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 231 in vehicle/accel_brake_map_calibrator/scripts/view_plot.py

See this annotation in the file changed.

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

❌ New issue: Complex Method

ViewPlot.view_pedal_accel_graph 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.