Skip to content

crosswalk-parsing fixed PR#478

Open
aaravshar wants to merge 2 commits into
BerkeleyLearnVerify:mainfrom
aaravshar:add-crosswalk-parsing
Open

crosswalk-parsing fixed PR#478
aaravshar wants to merge 2 commits into
BerkeleyLearnVerify:mainfrom
aaravshar:add-crosswalk-parsing

Conversation

@aaravshar

Copy link
Copy Markdown

crosswalk parsing changes to xodr_parser and 1 scenario for pedestrian-vehicle interactions

@dfremont dfremont self-requested a review June 17, 2026 16:31
…rianCrossing for conflicting maneuvers, updated crosswalk scenario to reflect this
from shapely.geometry import GeometryCollection, MultiPoint, MultiPolygon, Point, Polygon
from shapely.ops import snap, unary_union
from scipy.spatial.transform import Rotation as R
from shapely.geometry import GeometryCollection, MultiPoint, MultiPolygon, Point, Polygon, LineString

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

May be a good idea to import Point as ShapelyPoint or something like that, since otherwise we could easily encounter a conflict with Scenic's Point.

dv_du = self.poly.grad_at(u)
local_heading = math.atan2(dv_du, 1)
global_heading = local_heading + self.hdg
while global_heading > math.pi:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You can probably just use normalizeAngle in scenic.core.gometry here.

dv_dp = self.v_poly.grad_at(p)
local_heading = math.atan2(dv_dp, du_dp)
global_heading = local_heading + self.hdg
while global_heading > math.pi:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See above.


def heading_at(self, s):
theta = (self.curv0 * s) + (0.5 * self.curve_rate * s * s) + self.hdg
while theta > math.pi:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See above.


def heading_at(self, s):
heading = self.hdg
while heading > math.pi:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See above.

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