motional / nuplan-devkit

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

i know lidar_pc token;how to get traffic_light_status.status #230

Open betterqiang opened 1 year ago

betterqiang commented 1 year ago

i know lidar_pc token;how to get traffic_light_status.status

patk-motional commented 1 year ago

Hi @betterqiang,

Can you provide more context, please? Code examples would be very helpful.

ycool commented 1 year ago
        SELECT  CASE WHEN tl.status == "green" THEN 0
                     WHEN tl.status == "yellow" THEN 1
                     WHEN tl.status == "red" THEN 2
                     ELSE 3
                END AS status,
                tl.lane_connector_id,
                lp.timestamp AS timestamp
        FROM lidar_pc AS lp
        INNER JOIN traffic_light_status AS tl
            ON lp.token = tl.lidar_pc_token
        WHERE lp.token = ?