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

Change detection of front entity on path of NPC #45

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gmajrobotec
Copy link
Collaborator

@gmajrobotec gmajrobotec commented Dec 9, 2024

Description

NPC should detect another Entity with see_around even when the Entity does not overlap the center line of the lane which the NPC is on. This change allows to detect another NPC which overlap path of this NPC.

Abstract

This PR changes detection function of front entity in ActionNode.

Details

I've changed getDistanceToTargetEntityPolygon to use boundingBoxRelativeLaneletPose. It calculates relative pose between current NPC and another one. If absolute value of offset is less than half of NPC width it means that it intersects with current NPC path. If so distance to front entity is s of the pose enlarged by half of the length of NPC, as we need distance from the center.

Destructive Changes

--

Known Limitations

--

@gmajrobotec gmajrobotec force-pushed the RJD-1489/NpcCenterLine branch from fad059a to d302390 Compare December 10, 2024 20:48
@gmajrobotec gmajrobotec self-assigned this Dec 11, 2024
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.

a few stylistic changes, let me know what do you think, note: compilable, untested

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.

👍

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.

3 participants