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

Rjd 1278/fix line segment #35

Merged
merged 31 commits into from
Sep 3, 2024
Merged

Conversation

robomic
Copy link

@robomic robomic commented Aug 21, 2024

Abstract

This PR contains combined fixes for issues tier4#1343 and tier4#1344.

Details

Additionally:

  1. This PR introduces 4 additional const-fields for LineSegment class, namely length, length_2d, vector and vector_2d. These constants are frequently used and can be easily calculated during construction.
  2. Function getIntersection2DSValue has been renamed to get2DIntersectionSValue. In my opinion, in previous version it was unclear if 2D refers to Intersection or SValue.
  3. Both isIntersect2D and getIntersection2D had a duplicate. This was simplified.
  4. Function getSlope has been renamed to get2DVectorSlope, now it throws an error if division by 0 occurs.

Background

Please see tier4#1343 and tier4#1344 for detailed explanations of the bugs.

/// The term "2D" in the function name specifically refers to the intersection point, not the SValue.
/// Therefore, the intersection is determined by disregarding the z-coordinate, hence the term "2D."
/// After finding the intersection, we calculate its position using a proportion.
/// Finally, we multiply this proportion by the actual 3D length to obtain the total SValue.

Choose a reason for hiding this comment

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

🤗

@dmoszynski dmoszynski self-requested a review August 23, 2024 07:27
Copy link

@dmoszynski dmoszynski left a comment

Choose a reason for hiding this comment

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

👍

@robomic robomic self-assigned this Aug 23, 2024
@github-actions github-actions bot deleted the RJD-1278/fix-line-segment branch September 3, 2024 00:31
@robomic robomic merged commit e6d412b into RobotecAI:master Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants