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

refactor(multi_object_tracker): define motion model class #6587

Merged

chore: cleanup unused members

08f3741
Select commit
Loading
Failed to load commit list.
Merged

refactor(multi_object_tracker): define motion model class #6587

chore: cleanup unused members
08f3741
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Mar 13, 2024 in 35s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 16 findings(s) 🚩
  • Improving Code Health: 21 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):

  • Code Duplication bicycle_motion_model.cpp
  • Code Duplication ctrv_motion_model.cpp
  • Complex Method multi_object_tracker_core.cpp: MultiObjectTracker::sanitizeTracker
  • Large Method unknown_tracker.cpp: UnknownTracker::UnknownTracker
  • Primitive Obsession bicycle_motion_model.cpp
  • Primitive Obsession ctrv_motion_model.cpp
  • Primitive Obsession cv_motion_model.cpp
  • Complex Method multi_object_tracker_core.cpp: MultiObjectTracker::publish
  • Excess Number of Function Arguments cv_motion_model.cpp: CVMotionModel::initialize
  • Excess Number of Function Arguments cv_motion_model.cpp: CVMotionModel::updateStatePoseVel
  • Excess Number of Function Arguments ctrv_motion_model.cpp: CTRVMotionModel::initialize
  • Excess Number of Function Arguments bicycle_motion_model.cpp: BicycleMotionModel::setMotionParams
  • Excess Number of Function Arguments bicycle_motion_model.cpp: BicycleMotionModel::initialize
  • Excess Number of Function Arguments ctrv_motion_model.cpp: CTRVMotionModel::updateStatePoseHeadVel
  • Excess Number of Function Arguments ctrv_motion_model.cpp: CTRVMotionModel::setMotionParams
  • Excess Number of Function Arguments bicycle_motion_model.cpp: BicycleMotionModel::updateStatePoseHeadVel

✅ Improving Code Health:

  • Large Method big_vehicle_tracker.cpp: BigVehicleTracker::BigVehicleTracker
  • Large Method normal_vehicle_tracker.cpp: NormalVehicleTracker::NormalVehicleTracker
  • Large Method bicycle_tracker.cpp: BicycleTracker::BicycleTracker
  • Large Method pedestrian_tracker.cpp: PedestrianTracker::PedestrianTracker
  • Large Method big_vehicle_tracker.cpp: BigVehicleTracker::getTrackedObject
  • Large Method normal_vehicle_tracker.cpp: NormalVehicleTracker::getTrackedObject
  • Large Method bicycle_tracker.cpp: BicycleTracker::getTrackedObject
  • Large Method pedestrian_tracker.cpp: PedestrianTracker::getTrackedObject
  • Overall Function Size bicycle_tracker.cpp
  • Complex Method bicycle_tracker.cpp: BicycleTracker::measureWithPose
  • Bumpy Road Ahead bicycle_tracker.cpp: BicycleTracker::measureWithPose
  • Overall Code Complexity bicycle_tracker.cpp
  • Complex Method big_vehicle_tracker.cpp: BigVehicleTracker::measureWithPose
  • Bumpy Road Ahead big_vehicle_tracker.cpp: BigVehicleTracker::measureWithPose
  • Overall Code Complexity big_vehicle_tracker.cpp
  • Complex Method normal_vehicle_tracker.cpp: NormalVehicleTracker::measureWithPose
  • Bumpy Road Ahead normal_vehicle_tracker.cpp: NormalVehicleTracker::measureWithPose
  • Overall Code Complexity normal_vehicle_tracker.cpp
  • Complex Method pedestrian_tracker.cpp: PedestrianTracker::measureWithPose
  • Overall Code Complexity pedestrian_tracker.cpp
  • Complex Method unknown_tracker.cpp: UnknownTracker::measureWithPose

Annotations

Check notice on line 155 in perception/multi_object_tracker/src/tracker/model/bicycle_tracker.cpp

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

✅ Getting better: Large Method

BicycleTracker::BicycleTracker decreases from 92 to 91 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 notice on line 299 in perception/multi_object_tracker/src/tracker/model/bicycle_tracker.cpp

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

✅ No longer an issue: Large Method

BicycleTracker::getTrackedObject is no longer above the threshold for lines of code. 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 notice on line 1 in perception/multi_object_tracker/src/tracker/model/bicycle_tracker.cpp

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

✅ No longer an issue: Overall Function Size

The median function size in this module is no longer above the threshold

Check notice on line 219 in perception/multi_object_tracker/src/tracker/model/bicycle_tracker.cpp

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

✅ No longer an issue: Complex Method

BicycleTracker::measureWithPose is no longer above the threshold for cyclomatic complexity

Check notice on line 219 in perception/multi_object_tracker/src/tracker/model/bicycle_tracker.cpp

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

✅ No longer an issue: Bumpy Road Ahead

BicycleTracker::measureWithPose is no longer above the threshold for logical blocks with deeply nested code

Check notice on line 1 in perception/multi_object_tracker/src/tracker/model/bicycle_tracker.cpp

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

✅ No longer an issue: Overall Code Complexity

The mean cyclomatic complexity in this module is no longer above the threshold

Check notice on line 171 in perception/multi_object_tracker/src/tracker/model/big_vehicle_tracker.cpp

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

✅ Getting better: Large Method

BigVehicleTracker::BigVehicleTracker decreases from 103 to 102 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 notice on line 394 in perception/multi_object_tracker/src/tracker/model/big_vehicle_tracker.cpp

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

✅ No longer an issue: Large Method

BigVehicleTracker::getTrackedObject is no longer above the threshold for lines of code. 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 notice on line 299 in perception/multi_object_tracker/src/tracker/model/big_vehicle_tracker.cpp

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

✅ No longer an issue: Complex Method

BigVehicleTracker::measureWithPose is no longer above the threshold for cyclomatic complexity

Check notice on line 299 in perception/multi_object_tracker/src/tracker/model/big_vehicle_tracker.cpp

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

✅ No longer an issue: Bumpy Road Ahead

BigVehicleTracker::measureWithPose is no longer above the threshold for logical blocks with deeply nested code

Check notice on line 1 in perception/multi_object_tracker/src/tracker/model/big_vehicle_tracker.cpp

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

✅ No longer an issue: Overall Code Complexity

The mean cyclomatic complexity in this module is no longer above the threshold

Check notice on line 171 in perception/multi_object_tracker/src/tracker/model/normal_vehicle_tracker.cpp

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

✅ Getting better: Large Method

NormalVehicleTracker::NormalVehicleTracker decreases from 103 to 102 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 notice on line 394 in perception/multi_object_tracker/src/tracker/model/normal_vehicle_tracker.cpp

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

✅ No longer an issue: Large Method

NormalVehicleTracker::getTrackedObject is no longer above the threshold for lines of code. 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 notice on line 299 in perception/multi_object_tracker/src/tracker/model/normal_vehicle_tracker.cpp

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

✅ No longer an issue: Complex Method

NormalVehicleTracker::measureWithPose is no longer above the threshold for cyclomatic complexity

Check notice on line 299 in perception/multi_object_tracker/src/tracker/model/normal_vehicle_tracker.cpp

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

✅ No longer an issue: Bumpy Road Ahead

NormalVehicleTracker::measureWithPose is no longer above the threshold for logical blocks with deeply nested code

Check notice on line 1 in perception/multi_object_tracker/src/tracker/model/normal_vehicle_tracker.cpp

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

✅ No longer an issue: Overall Code Complexity

The mean cyclomatic complexity in this module is no longer above the threshold

Check notice on line 147 in perception/multi_object_tracker/src/tracker/model/pedestrian_tracker.cpp

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

✅ Getting better: Large Method

PedestrianTracker::PedestrianTracker decreases from 94 to 85 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 notice on line 279 in perception/multi_object_tracker/src/tracker/model/pedestrian_tracker.cpp

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

✅ No longer an issue: Large Method

PedestrianTracker::getTrackedObject is no longer above the threshold for lines of code. 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 notice on line 198 in perception/multi_object_tracker/src/tracker/model/pedestrian_tracker.cpp

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

✅ No longer an issue: Complex Method

PedestrianTracker::measureWithPose is no longer above the threshold for cyclomatic complexity

Check notice on line 1 in perception/multi_object_tracker/src/tracker/model/pedestrian_tracker.cpp

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

✅ No longer an issue: Overall Code Complexity

The mean cyclomatic complexity in this module is no longer above the threshold

Check warning on line 131 in perception/multi_object_tracker/src/tracker/model/unknown_tracker.cpp

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

❌ New issue: Large Method

UnknownTracker::UnknownTracker has 76 lines, 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 notice on line 182 in perception/multi_object_tracker/src/tracker/model/unknown_tracker.cpp

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

✅ No longer an issue: Complex Method

UnknownTracker::measureWithPose is no longer above the threshold for cyclomatic complexity

Check warning on line 199 in perception/multi_object_tracker/src/tracker/motion_model/bicycle_motion_model.cpp

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

❌ New issue: Code Duplication

The module contains 2 functions with similar structure: BicycleMotionModel::updateStatePoseHead,BicycleMotionModel::updateStatePoseHeadVel. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 1 in perception/multi_object_tracker/src/tracker/motion_model/bicycle_motion_model.cpp

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

❌ New issue: Primitive Obsession

In this module, 84.6% of all function arguments are primitive types, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.

Check warning on line 99 in perception/multi_object_tracker/src/tracker/motion_model/bicycle_motion_model.cpp

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

❌ New issue: Excess Number of Function Arguments

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