usdot-fhwa-stol / carma-platform

CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication. Doxygen Source Code Documentation :
https://usdot-fhwa-stol.github.io/documentation/carma-platform/
404 stars 123 forks source link

findReference is not returning certain valid references #700

Closed MishkaMN closed 4 years ago

MishkaMN commented 4 years ago

Types of Issue

Descriptive summary

Recently added findReference function in autoware/common/lanelet2_extension/utils/query.h is not accounting for the fact that linestrings can be owned by regulatory elements (regem) aside from lanelets and areas. There is an edge case where unregistered primitives, such as a linestring that is owned by a certain regem, would not return the parent regem which is registered in the map. The function would fail to find that relation.

The function will be used by geofence operations in the future and as geofence affects regulatory elements, this could erroneously impact routes. While there is not any logic that uses this function yet and its severity could be low due as the user may never invoke the function as described, this case still should be resolved urgently.

Expected behavior

The function should return primitives that are referenced by unregistered (not directly added to the map) primitives in the map.

Software version this applies to

On carma-develop branch of autoware.ai soon after 3.3.0

Actual behavior

See above.

Steps to reproduce the behavior

Pass a linestring to the function that is owned by a regem, which is registered in the map. The function does not return that regem.

// Pseudocode
Linestring ls                                  // create a linestring
RegulatoryElementPtr regem_ptr(ls)              // create a regem
map.add(regem_ptr)                              // register the regem, ls is not registered directly
ref = findReference(ls, map)                  // findRef
// ref obj does not have regem_ptr 

Related work

Link to related tickets or prior related work here.

TonysCousin commented 4 years ago

@MishkaMN it's not clear what the impact of this problem is, i.e. how severely does it affect Carma operation. Can you please add that to the description.

MishkaMN commented 4 years ago

Added more description about its severity and the fix is merged in with the linked PR.

msmcconnell commented 4 years ago

Closing as resolved by linked PR 103