Do trajectories have global or “local” (relative) positioning in the road network?
Bugzilla Link | 4237 |
Created on | Dec 04, 2019 14:00 |
Version | unspecified |
Extended Description
Global trajectories are positioned with absolute coordinates in the road network, when an entity reaches such a trajectory, it follows its exact path as given by the global coordinates (i.e. global shape).
A use case for global trajectories is crossing a junction or entering a road from the outside (e.g. parking lot).
Local trajectories are (or should be) given with regards to the entity that is about to execute (follow) such a trajectory. It could be said such a trajectory is mapped onto the road network directly in front of the vehicle that is about to try and “follow” it.
A use case for local trajectories is following (executing) a shape regardless of vehicle’s exact position in the road network, e.g., a U-turn in the middle of the road.
Furthermore, having local trajectories would simplify the problem of remapping trajectories onto different road networks.
Since a trajectory is a catalog element, it should be transferrable between road networks. However, since its control points (or vertices, depending on the shape) are given as OSCpositions, it will be very hard to remap them to another road network. OSCpositions given as (road, s, t) tuples may not exist on another road network or could be in a totally different part of the road, hundreds of meters away, which is just as bad. That would disfigure the trajectory. On the other hand, for positions given as (x, y, z) we will end up with a trajectory that does not align with the new road network or is simply translated to an unrelated part of the coordinate system.
“Local” trajectories would be applied in front of the vehicle at the moment it starts executing FollowTrajectory action, regardless of its position on the road network. We could still retain global trajectories specific to the road network.
Even if we do not handle remapping trajectory on a different road network, the question of what should the vehicle do when it starts executing FollowTrajectory action for a trajectory that is in a completely different part of the road network remains.