Some issues about goal reaching event

Hi,

I notice sometimes the _check_goal_reached() function can not detect the goal-reaching event, for example, when I visualize a event:


The ego car (in green) overlaps with the goal (in yellow), but the _check_goal_reached() return false at this event, and when I print the features “distance_goal_long” and “distance_goal_lat” in the observation, it says:
([411.98307045], [-29.27380135])

And a weird thing is when I print the features “distance_goal_long” and “distance_goal_lat” when _check_goal_reached() do return true, they are not closed to zeros either.

So I have two questions:

  1. Why sometimes the _check_goal_reached() cannot detect the goal-reaching event when the visualization suggests it does. Does the visualization in gym.render() can accurately reflect what is happening?
  2. Why the “distance_goal_long” and “distance_goal_lat” are far from zeros when the goal is reached (confirmed by both the gym visualization and the _check_goal_reached() function).

Hoping for your reply,

Thanks,

Galen Liu

Hi Galen,

Did you check how the goal region is defined? For some scenarios, the goal region also contains intervals of velocity and orientation, instead of only a position area. It might be that in your example, the ego vehicle reaches the position of the goal area but the other attributes of the goal region are not reached.

Best,
Xiao