Questions regarding the observation space

Hi Xiao,

I have three questions about the observation space in the CommonRoad environment.

(1) In the paper about CommonRoad-RL you describe that the lateral and longitudinal goal distances are measured in a Frenet frame aligned with the centerline of the lane occupied b the ego vehicle. If the ego vehicle is traveling on a straight multi-lane road, my understanding would be that the lateral distance to the goal must change abruptly when the ego vehicle makes a lane change. However, in my data I see a continuous progression of this parameter. The documentation states that it is the relative lateral distance. Is the variable to be considered in the global coordinate system rather than in a Frenet frame?
(2) What exactly do the variables distance_goal_long advance and distance_goal_lat_advance denote? They differ in their values from distance_goal_long and distance_goal_lat, but in the documentation all have the same description.
(3) The COmmonRoad-RL paper says that the distance between the ego vehicle and the obstacles is relative in lane based detection, by this I understand an euclidean distance. In the documentation the distance is described as longitudinal distance. Which is correct? And by local ccosy is meant a coordinate system that moves with the ego vehicle and its orientation?

I also noticed that the documentation has the number of outputs in the action space backwards, at least for the single-track kinematic model.

Best,
Annabel

Dear Annabel,

Thanks for the questions.

  1. We changed to use two Frenet frames, one is global (created from the initial state to goal area), one is local (created using centerline of the current ego lane). The goal distances are computed using the global Frenet frame. The distances to surrounding vehicles are computed using the local Frenet frame. This change is exactly to tackle the problem you mentioned regarding the jumping values.

  2. The distance_goal_long_advance and distance_goal_lat_advance are the difference between the distance at current time step and the distance at previous time step.

  3. If you enable the fast_distance_calculation flag here, the lane-based detection of surrounding vehicles use only the longitudinal distance between two vehicle centers, since the lateral is already incorporated in the neighboring relationships. If this flag is disabled, it computes the Euclidean distance between two vehicle shapes, as shown in the code here. We implemented these two ways since the functions in shapely to compute the distance between two shapes are quite slow and in most scenarios using the longitudinal distances already suffice for the agent to learn collision avoidance.

Thanks for your hints about the documentations. We will improve them in the next release.

Best,
Xiao