eric-ai-lab / Aerial-Vision-and-Dialog-Navigation

Codebase of ACL 2023 Findings "Aerial Vision-and-Dialog Navigation"

Home Page:https://sites.google.com/view/aerial-vision-and-dialog/home

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Find teacher altitude

qiaogh97 opened this issue · comments

Can you give me some ideas about the finding teacher altitude code? I don't know what they really mean.

teacher_a[i][1] = float((np.linalg.norm(obs[i]['gt_path_corners'][closest_step_index][0] -\
obs[i]['gt_path_corners'][closest_step_index][1])\
*11.13*1e4 -40 )/ (400-40))

Sure. The teacher_a is the ground truth action (ground truth waypoint) for the simulated drone at the current_pos. The teacher_a[i] (the ground truth action for the i-th sample in the batch) is a list of two. teacher_a[i][0] represents the latitude and longitude of the ground truth waypoint. teacher_a[i][1] represents the altitude of the ground truth waypoint.

teacher_a[i][1] is a value between 0-1 and note that we set our simulated drone to fly in the height range of 40m to 400m. We calculate teacher_a[i][1] based on the ground truth size of the view area annotated by the annotators because the larger the view area size, the higher the simulated drone flies. In the code earlier, we find the closest view area recorded during annotation (obs[i]['gt_path_corners'][closest_step_index]). Then in this piece of code, we first calculate the view area size (distance between the diagonal corners): (np.linalg.norm(obs[i]['gt_path_corners'][closest_step_index][0] -\ obs[i]['gt_path_corners'][closest_step_index][1]) and then convert it from longitude/latitude unit to meter unit by *11.13*1e4. Finally, we convert this ground truth height from meter to a value between 0-1.

Let me know if you have further questions.

So why can the view area size equal ground truth height?

We define the view angle is 90 degrees from left to right (same from top to bottom), so the altitude of the simulated drone will be the same as the width of the view area.

Sorry I closed the issue by accident, let me know if you have further questions.

Don't mind. I have no question more. Your explanation was very clear and timely. Thank you!!!!! I will close this issue.