motional / nuplan-devkit

The devkit of the nuPlan dataset.
https://www.nuplan.org
Other
682 stars 131 forks source link

Drawing route roadblocks as linestrings #375

Closed gsg213 closed 5 months ago

gsg213 commented 6 months ago

Hello,

I've tried to draw route roadblocks as linestring in a raster map but I get the error: Error: 'NuPlanRoadBlock' object has no attribute 'baseline_path' when I use ROADBLOCK and ROADBLOCK_CONNECTOR as features to get the layers coords.

I managed to draw it as polygon but I need it as linestring, is there a way around to achieve this?

or is it possible to match a route_roadblock_id with a lane_id(lane_connector_id)?

Thanks!

DanielDauner commented 6 months ago

Hi @gsg213

Roadblocks and roadblock connectors are a set of lanes or lane connectors. Thus, they don’t have a single baseline path. Each roadblock (or connector) includes all lanes (as property interior_edges). For each interior lane, you can then retrieve the baseline_path property.

Maybe this function is interesting for you.

Best, Daniel.

gsg213 commented 5 months ago

Hey @DanielDauner,

Thanks for the explanation, I suspected lanes and roadblocks were linked but didn't know exactly how. I managed to draw the linestrings I needed.

Thank you for your help!

Best, Gustavo.