Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Fixes in unstructured constellation polygon creation#87

Merged
berndgassmann merged 1 commit intomasterfrom
fix_and_cleanup_unstructured
Oct 16, 2020
Merged

Fixes in unstructured constellation polygon creation#87
berndgassmann merged 1 commit intomasterfrom
fix_and_cleanup_unstructured

Conversation

@fpasch
Copy link
Copy Markdown
Contributor

@fpasch fpasch commented Oct 15, 2020

  • Add several parameters to adjust polygon calculation
  • Rename parameters:
    vehicleFrontIntermediateRatioSteps -> vehicleFrontIntermediateYawRateChangeRatioSteps
    vehicleBackIntermediateRatioSteps -> vehicleBackIntermediateYawRateChangeRatioSteps
  • code refactoring (pedestrian and vehicle calculations now use common functions)

This change is Reviewable

@fpasch fpasch force-pushed the fix_and_cleanup_unstructured branch 4 times, most recently from df8df1d to 1a7df03 Compare October 16, 2020 06:53
Copy link
Copy Markdown
Contributor

@berndgassmann berndgassmann left a comment

Choose a reason for hiding this comment

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

Reviewed 30 of 30 files at r1.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @fpasch)


ad_rss/impl/src/unstructured/TrajectoryCommon.cpp, line 72 at r1 (raw file):

  int idx = 0;
  for (auto it = step.left.cbegin(); (it != step.left.cend()) && result; ++it)

result not actually used in the loop


ad_rss/impl/src/unstructured/TrajectoryCommon.cpp, line 113 at r1 (raw file):

    boost::geometry::convex_hull(frontPtsLeft, hullLeft);
    boost::geometry::convex_hull(frontPtsRight, hullRight);
    result = combinePolygon(hullLeft, hullRight, polygon);

this is the first time result is used, so maybe move the declaration here and clean the code above


ad_rss/impl/src/unstructured/TrajectoryCommon.cpp, line 175 at r1 (raw file):

  //-------------
  // front

where exactly is the difference between the computation between back and front? Looks like I am blind, but somehow I don't spot the difference... shouldn't the results be identical?


ad_rss/impl/src/unstructured/TrajectoryPedestrian.cpp, line 277 at r1 (raw file):

    }
    auto previousRight = std::move(continueForwardFront.right);
    continueForwardFront.right = right;

This is an more efficient version of the below one, correct?
continueForwardFront.right.insert(continueForwardFront.right.begin(),right.begin(), right.end())


ad_rss/impl/src/unstructured/TrajectoryVehicle.cpp, line 120 at r1 (raw file):

  backSide.right.reserve(vehicleState.dynamics.unstructuredSettings.vehicleBackIntermediateYawRateChangeRatioSteps + 1);
  auto result
    = getResponseTimeTrajectoryPoints(vehicleState, vehicleState.dynamics.alphaLon.accelMax, ratioDiffBack, backSide);

are you sure you want to use accelMax here, not brakeMax? otherwise front and back are the same... and while response time one also is allowed to brake, brakeMax <= a <= accelMax
Rather copy/paste error while restructuring.


ad_rss/impl/src/unstructured/TrajectoryVehicle.cpp, line 227 at r1 (raw file):

    {
      currentTime = duration;
      timeStep = physics::Duration(

why not add this before currentTime = duration; line:
timeStep = duration - currentTime;
or did I understand it wrong what's happening here within the last step

@fpasch fpasch force-pushed the fix_and_cleanup_unstructured branch from 1a7df03 to 6fbe8ff Compare October 16, 2020 09:24
- Add several parameters to adjust polygon calculation
- Rename parameters:
  vehicleFrontIntermediateRatioSteps -> vehicleFrontIntermediateYawRateChangeRatioSteps
  vehicleBackIntermediateRatioSteps -> vehicleBackIntermediateYawRateChangeRatioSteps
- code refactoring (pedestrian and vehicle calculations now use common functions)
@fpasch fpasch force-pushed the fix_and_cleanup_unstructured branch from 6fbe8ff to ebb69a4 Compare October 16, 2020 10:22
@fpasch fpasch marked this pull request as ready for review October 16, 2020 10:23
Copy link
Copy Markdown
Contributor Author

@fpasch fpasch left a comment

Choose a reason for hiding this comment

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

Reviewable status: 16 of 31 files reviewed, 6 unresolved discussions (waiting on @berndgassmann)


ad_rss/impl/src/unstructured/TrajectoryCommon.cpp, line 72 at r1 (raw file):

Previously, berndgassmann wrote…

result not actually used in the loop

Done.


ad_rss/impl/src/unstructured/TrajectoryCommon.cpp, line 113 at r1 (raw file):

Previously, berndgassmann wrote…

this is the first time result is used, so maybe move the declaration here and clean the code above

Done.


ad_rss/impl/src/unstructured/TrajectoryCommon.cpp, line 175 at r1 (raw file):

Previously, berndgassmann wrote…

where exactly is the difference between the computation between back and front? Looks like I am blind, but somehow I don't spot the difference... shouldn't the results be identical?

Done.


ad_rss/impl/src/unstructured/TrajectoryPedestrian.cpp, line 277 at r1 (raw file):

Previously, berndgassmann wrote…

This is an more efficient version of the below one, correct?
continueForwardFront.right.insert(continueForwardFront.right.begin(),right.begin(), right.end())

yes


ad_rss/impl/src/unstructured/TrajectoryVehicle.cpp, line 120 at r1 (raw file):

Previously, berndgassmann wrote…

are you sure you want to use accelMax here, not brakeMax? otherwise front and back are the same... and while response time one also is allowed to brake, brakeMax <= a <= accelMax
Rather copy/paste error while restructuring.

Done.


ad_rss/impl/src/unstructured/TrajectoryVehicle.cpp, line 227 at r1 (raw file):

Previously, berndgassmann wrote…

why not add this before currentTime = duration; line:
timeStep = duration - currentTime;
or did I understand it wrong what's happening here within the last step

Done.

Copy link
Copy Markdown
Contributor

@berndgassmann berndgassmann left a comment

Choose a reason for hiding this comment

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

Reviewed 15 of 15 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@codecov-io
Copy link
Copy Markdown

codecov-io commented Oct 16, 2020

Codecov Report

Merging #87 into master will increase coverage by 0.13%.
The diff coverage is 25.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
+ Coverage   61.55%   61.68%   +0.13%     
==========================================
  Files         132      132              
  Lines        4120     4119       -1     
  Branches     1813     1803      -10     
==========================================
+ Hits         2536     2541       +5     
- Misses        582      595      +13     
+ Partials     1002      983      -19     
Impacted Files Coverage Δ
ad_rss/impl/src/unstructured/Geometry.cpp 44.00% <0.00%> (-9.66%) ⬇️
...rss/impl/src/unstructured/TrajectoryPedestrian.cpp 0.46% <0.00%> (-0.01%) ⬇️
...rss/impl/src/unstructured/TrajectoryPedestrian.hpp 0.00% <ø> (ø)
ad_rss/impl/src/unstructured/TrajectoryVehicle.hpp 100.00% <ø> (ø)
ad_rss/impl/src/unstructured/TrajectoryVehicle.cpp 31.07% <27.09%> (+3.10%) ⬆️
ad_rss/impl/src/unstructured/TrajectoryCommon.cpp 32.03% <30.33%> (-10.82%) ⬇️
ad_rss/impl/src/unstructured/TrajectoryCommon.hpp 61.11% <62.50%> (-1.39%) ⬇️
...ated/include/ad/rss/world/UnstructuredSettings.hpp 95.94% <100.00%> (+2.46%) ⬆️
..._rss/impl/include/ad/rss/unstructured/Geometry.hpp 35.89% <0.00%> (+0.48%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d6d7a0...ebb69a4. Read the comment docs.

@berndgassmann berndgassmann merged commit f748a0f into master Oct 16, 2020
@fabianoboril fabianoboril deleted the fix_and_cleanup_unstructured branch December 7, 2020 07:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants