Thinklab-SJTU / Bench2DriveZoo

BEVFormer, UniAD, VAD in Closed-Loop CARLA Evaluation with World Model RL Expert Think2Drive
Other
145 stars 9 forks source link

How to obtain x/y_command_near and x/y_command_far during evaluation? #34

Closed huangzehao closed 2 months ago

huangzehao commented 2 months ago

Dear Bench2Drive Developers, The annotations in the Bench2Drive dataset provide the following items:

- x_command_far  # farther waypoint x in world coordinates
- y_command_far  # farther waypoint y in world coordinates
- command_far    # the command to farther waypoint
- x_command_near # nearby waypoint x in world coordinates
- y_command_near # nearby waypoint y in world coordinates
- command_near   # the command to nearby waypoint

I am wondering how to obtain these items in the agent. I can only find the definition of near_node and near_command in the agent code (https://github.com/Thinklab-SJTU/Bench2DriveZoo/blob/uniad/vad/team_code/uniad_b2d_agent.py#L289). When checking the location of near_node during closed-loop evaluation, I noticed that the distance between the ego vehicle and near_node is larger than the distance between the ego vehicle and x/y_command_near in the annotations. Can I consider that the near_node in the agent code is actually equivalent to x/y_command_far in the annotations?

The motivation behind my question is that I want to use the target_point information when training the agent. However, I'm unsure which item from the annotations I should use to ensure consistency with the information available during evaluation.

jayyoung0802 commented 2 months ago

you can set custom RoutePlanner. For data collect, we use RoutePlanner(4.0, 50, lat_ref=self.lat_ref, lon_ref=self.lon_ref) # near RoutePlanner(7.5, 25.0, lat_ref=self.lat_ref, lon_ref=self.lon_ref) # far

huangzehao commented 2 months ago

Thanks for your quick reply! What about the value of sample_factor when calling downsample_route in set_global_plan? I notice the value of sample_factor will affect the value of near_node. According to the code here https://github.com/Thinklab-SJTU/Bench2Drive/blob/main/leaderboard/leaderboard/autoagents/autonomous_agent.py#L132, it is set to 50. But I am not sure the value used during data collect is also 50.

jiaxiaosong1002 commented 2 months ago

@huangzehao This is our agent: https://github.com/Thinklab-SJTU/Bench2Drive/blob/main/tools/data_collect.py

huangzehao commented 2 months ago

thanks.